You are on page 1of 1

2 Chapter 1: Creating

Table 1-1 describes the symbols used in BNF notation.


Table 1-1. BNF notation
Symbol Description
::= This means is defined as.
<name> An item that is defined by a ::= production.
| A vertical bar means or as in <color> ::= RED | ORANGE |
YELLOW.
{ items } Curly braces mean zero or more repetitions of items.
( items ) Parentheses means pick one of the alternative items.
[ items ] Square brackets means these items are optional.
WORD A keyword that appears as is.
"," A punctuation mark or special character that appears as is, without
double quotes.
words A free-form description, bending the rules of BNF to make it even
more concise.
-- words A comment.

The BNF in this book is different from the notation in the Help. This is done on
purpose: If you dont understand the Help for some particular command, per-
haps you will find the BNF easier. And vice versa if some piece of BNF
confuses you, then maybe the Help will be helpful. Be careful of the little differ-
ences, though; for example, curly braces in this book mean zero or more
repetitions whereas curly braces in the Help mean pick one of these items.
BNF can be awkward to read at first. Here is an example of a very common
construction in SQL, a comma-separated list:
<user_name_list> ::= <identifier> { "," <identifier> }
A strict interpretation of this production is a <user_name_list> is defined as an
<identifier> followed by zero or more commas each followed by an <identi-
fier>. With practice you will see it simply as a comma-separated list of
identifiers.
The full BNF used in this book also appears in HTML format on the com-
panion CD, with hypertext links between all the <items> and their definitions.

1.2 Codds 12 Rules for Relational Databases


Table is another word for relation, from the Relational Model of Data first
proposed by E. F. Codd in the 1970s. The word relation is used when speaking
of the theoretical basis for relational databases, and the word table is used when
speaking of actual implementations, such as SQL Anywhere 9.
Codd laid down strict rules for what is, and what isnt, a true relational
database:

You might also like