Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL.1 CSE 4100 The SQL Database Grammar BNF Grammar for SQL /* The grammar rules that follow have been taken from */ /* "System R", Appendix II, M.M. Astrahan,

Similar presentations


Presentation on theme: "SQL.1 CSE 4100 The SQL Database Grammar BNF Grammar for SQL /* The grammar rules that follow have been taken from */ /* "System R", Appendix II, M.M. Astrahan,"— Presentation transcript:

1 SQL.1 CSE 4100 The SQL Database Grammar BNF Grammar for SQL /* The grammar rules that follow have been taken from */ /* "System R", Appendix II, M.M. Astrahan, et al., ACM Trans. */ /* on Database Systems, Vol. 1, No. 2, June */ /* The rules given below in BNF have the following assumptions: */ /* (1) all non-terminals are in lower-case, */ /* (2) all terminals (recognized by LEX/lex.yy.c) are in upper-case, */ ::= | ::= | ::= FROM ::= SELECT ::= | MULT-OP ::= | COMMA ::=

2 SQL.2 CSE 4100 The SQL Database Grammar ::= | COMMA ::= | WHERE ::= | LPAR RPAR ::= | GROUP BY | ORDER BY ::= INSERT INTO COLON ::= | LPAR RPAR ::= | COMMA ::= | COMMA ::=

3 SQL.3 CSE 4100 The SQL Database Grammar ::= DELETE ::= UPDATE ::= ::= SET EQ ::= | OR ::= | AND ::= ::= EQ | ::= |

4 SQL.4 CSE 4100 The SQL Database Grammar ::= ALL |ANY ::= IN |NOT IN ::= NE |RWEDGE |GE |LWEDGE |LE ::= | ::= | LPAR RPAR ::= | LWEDGE RWEDGE ::= | COMMA ::= | ADD-OP ::= | MULT-OP ::= ::= |ADD-OP ::= AND |OR

5 SQL.5 CSE 4100 The SQL Database Grammar ::= | LPAR RPAR | ::= | DOT ::= AVG |MAX |MIN |SUM |COUNT ::= QUOTE QUOTE | INTEGER ::= IDENTIFIER |VALUE ::= IDENTIFIER ::= EPSILON

6 SQL.6 CSE 4100 The SQL Database Grammar ::= ::= CREATE TABLE COLON ::= | COMMA ::= LPAR RPAR ::= CHAR LPAR INTEGER RPAR | INT LPAR INTEGER RPAR | FLOAT LPAR INTEGER RPAR ::= | COMMA NONULL


Download ppt "SQL.1 CSE 4100 The SQL Database Grammar BNF Grammar for SQL /* The grammar rules that follow have been taken from */ /* "System R", Appendix II, M.M. Astrahan,"

Similar presentations


Ads by Google