Looking for minimal SQL
olli at haluter.fromme.com
Thu Jul 1 14:13:51 CEST 2004
Marco Aschwanden <PPNTWIMBXFFC at spammotel.com> wrote:
> The next step would be to use the least common denominator of all sql
> dialects and do without all the sql goodies that the dialects offer... and
> for this part I am wondering if anyone has a link / hint / book that
> assembled this minimum sql.
Then you will have a _very_ limited subset of SQL, especially
when you take mysql into account, which is not very standard-
ANSI-SQL compatible, as far as I know. For example, the
operator "||" is string-concatenation in standard SQL, while
it means logical OR in mysql. Double-quotes are used for
quoted identifiers in standard SQL, while they're used to
enclose strings in mysql. etc. etc.
> Table/DB Design: always use lowercase letters, ...
You will also have to be careful to avoid the reserved words
of _all_ SQL dialects. Not easy. Also, don't make your
identifiers longer than 20 characters.
> The focus is actually limited to SELECT / INSERT / UPDATE / DELETE (I
> don't think that GRANT / CREATE XXX / ... statements are very portable).
Both GRANT and CREATE are specified in standard SQL, and I
believe all the major databases conform to it (I don't know
if mysql does, though).
Maybe the PostgreSQL documentation is helpful for you:
For each SQL command, it contains a description of its
standard SQL conformance. Here's the URL:
If you stick to that, your SQL code will most probably also
work with Oracle, Sybase and other "serious" databases.
PS: When I say "standard SQL", I mean ANSI SQL92 and SQL99.
Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany
``All that we see or seem is just a dream within a dream.''
(E. A. Poe)
More information about the Python-list