Re: Views for denomalizing
Date: Fri, 04 Feb 2005 07:51:49 GMT
Message-ID: <pQFMd.5658$Nn1.3745_at_newsread1.news.pas.earthlink.net>
Section 11.3 of ISO/IEC 9075-2:2003 <table definition> contains the BNF:
<table definition> ::=
CREATE [ <table scope> ] TABLE <table name> <table contents
source>
[ ON COMMIT <table commit action> ROWS ]
<table contents source> ::=
<table element list>
| OF <path-resolved user-defined type name> [ <subtable
clause> ] [ <table element list> ]
| <as subquery clause>
<table scope> ::= <global or local> TEMPORARY
<global or local> ::= GLOBAL | LOCAL
<table commit action> ::= PRESERVE | DELETE
<table element list> ::= <left paren> <table element> [ {
<comma> <table element> }... ] <right paren>
<table element> ::=
<column definition> | <table constraint definition> | <like clause> | <self-referencing column specification> | <column options>
<self-referencing column specification> ::= REF IS
<self-referencing column name> <reference generation>
<reference generation> ::= SYSTEM GENERATED | USER GENERATED |
DERIVED
<self-referencing column name> ::= <column name>
<column options> ::= <column name> WITH OPTIONS <column option
list>
<column option list> ::= [ <scope clause> ] [ <default clause>
] [ <column constraint definition>... ]
<subtable clause> ::= UNDER <supertable clause>
<supertable clause> ::= <supertable name>
<supertable name> ::= <table name>
<like clause> ::= LIKE <table name> [ <like options> ]
<like options> ::= <identity option> | <column default option>
<identity option> ::= INCLUDING IDENTITY | EXCLUDING IDENTITY
<column default option> ::= INCLUDING DEFAULTS | EXCLUDING DEFAULTS
<as subquery clause> ::= [ <left paren> <column name list>
<right paren> ] AS <subquery> <with or without data>
<with or without data> ::= WITH NO DATA | WITH DATA
That's not very legible. There's a gzipped tar file at
http://home.earthlink.net/~jleffler/JLSS/SQL/sql-bnf.tgz
which contains both raw (text) BNF and HTML (heavily hyperlinked, and very large) versions of the grammars for SQL-92, SQL-99 and SQL-2003 (9075-2:2003, aka SQL/Foundation).
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/Received on Fri Feb 04 2005 - 08:51:49 CET