Re: Textbooks on SQL compilation (Derek M Jones)
6 Apr 1997 22:22:27 -0400

          From comp.compilers

Related articles
Textbooks on SQL compilation (Kevin Watkins) (1997-03-27)
Re: Textbooks on SQL compilation (Torsten Grust) (1997-03-31)
Re: Textbooks on SQL compilation (1997-03-31)
Re: Textbooks on SQL compilation (Kurt Svensson) (1997-04-02)
Re: Textbooks on SQL compilation (1997-04-03)
Re: Textbooks on SQL compilation (1997-04-06)
| List of all articles for this month |

From: (Derek M Jones)
Newsgroups: comp.databases.theory,comp.compilers
Date: 6 Apr 1997 22:22:27 -0400
Organization: Knowledge Software Ltd
References: 97-03-161 97-04-010
Keywords: SQL, parse


Kevin Watkins <> wrote:
  > Does anyone know of any text books dealing with the parsing/processing
  > of SQL? I'm thinking of something like the book by Holub on compiler
  > design, but targeted at SQL rather than a programming language like C. "Kurt Svensson" writes:
> In the book "Understanding the new SQL, Melton & Simon,
> Morgan-Kaufman, 1993" there is a complete BNF grammar of SQL/92 (the

This is a very good book. The grammar from the SQL/2 standard is also
on-line (sorry have lost the address). The primary site of the SQL
Standards Archive is located at: You might
like to have a look here.

> proposed new SQL language). The book also describes what each

"new SQL"? SQL/3 is just being finalised. So the 1992 standard will
soon be the old standard.

> statement and clause is supposed to do.
> [Parsing it is easy enough, it's what to do once you've parsed it that's
> hard. -John]

Actually parsing is quite hard. It took me nearly a month to get a
grammar for SQL/2 that did not have an excessive number of conflicts
(got it down to one shift/reduce).

If anybody is interested in the old old standard (1987) check out

This is an implementation of the 'original' SQL standard (it processes
Embedded SQL and turns it into C function calls) done by a group of
Russians. I had a quick play. It looks like it could turn into
something serious.

Given than many large, commercial, DBMS vendors don't support much
beyond the 1987 standard I wouldn't worry about the lack of support
for 1992 features.


Derek M Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd
Applications Standards Conformance Testing

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.