|Textbooks on SQL compilation email@example.com (Kevin Watkins) (1997-03-27)|
|Re: Textbooks on SQL compilation Torsten.Grust@uni-konstanz.de (Torsten Grust) (1997-03-31)|
|Re: Textbooks on SQL compilation firstname.lastname@example.org (1997-03-31)|
|Re: Textbooks on SQL compilation email@example.com (Kurt Svensson) (1997-04-02)|
|Re: Textbooks on SQL compilation firstname.lastname@example.org (1997-04-03)|
|Re: Textbooks on SQL compilation email@example.com (1997-04-06)|
|From:||Torsten Grust <Torsten.Grust@uni-konstanz.de>|
|Date:||31 Mar 1997 15:23:30 -0500|
|Organization:||Database Research Group, U Konstanz (Lake Constance)|
Kevin Watkins <firstname.lastname@example.org> writes:
> 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.
I'm afraid that you'll have a hard time to find such a book. The
point is that it is not at all clear what the target you compile
``code'' for looks like.
Actually, SQL is based on the relational calculus (with bits from
relational algebra), so many DBMS query processors compile queries
into a calculus representation, normalizing these, and taking the
calculus as a starting point to generate execution plans for the
underlying DB engine.
Since the above approach is often said to be inefficient (I personally
don't subscribe that)---i.e. yielding ``nested loop'' execution
plans---another family of approaches compiles SQL into some sort of
relational algebra, featuring operators like project, select, all
sorts of joins, groupings, etc.
To get it straight, your DB engine is the compilation target. There's
no ``standard'' DB engine nor a standard language (like P-Code, say)
to map SQL to. There have been workshops that strived for a standard
query processing environment but the output is sparse until today.
I'd suggest to have a look at one of the following URLs and employ the
ideas and expertise of the DBMS commnunity as a starting point for the
compilation of SQL (resp. ODMG's OQL):
EREQ Project: http://www.cse.ogi.edu/DISC/projects/ereq/ereq.html
COKO KOLA: http://www.cs.brown.edu/software/cokokola/
| Torsten Grust mailto:Torsten.Grust@uni-konstanz.de |
| http://www.informatik.uni-konstanz.de/~grust |
| Database Research Group, University of Konstanz (Lake Constance/Germany) |
Return to the
Search the comp.compilers archives again.