3.1 SQL Core

This section introduces the language components supported by MonetDB/SQL. It is not intended to be exhaustive, but illustrates the features using programming snippets. Details can be found in the SQL standard or books dedicated towards learning the language.

Where appropriate the SQL syntax is summarized in extended BNF. Alternative constructs are separated by | and grouped by parentheses. Optional parts are marked with square brackets. A repetition is marked with either '+' or '*' to indicate at least once and many times, respectively. Lexical tokens are illustrated in capitals. The syntax is displayed as text enclosed by a box.

Currently we have partial support for SQL-2003. Features are added when (enough) users express their interest in these. Some of the features currently not supported include the concept of cursors, because the underlying engine is not based on record iterators. Asserts, domains, collate, character sets and user defined types may be supported in a future release.

The remainder of this chapter provides an overview of the functionality provided. In most cases it is sufficient to construct complex information systems, and be competitive with other solutions.