Re: Textbooks on SQL compilation

Torsten Grust <Torsten.Grust@uni-konstanz.de>
31 Mar 1997 15:23:30 -0500

          From comp.compilers

Related articles
Textbooks on SQL compilation kwatkins@odi.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 root@candle.pha.pa.us (1997-03-31)
Re: Textbooks on SQL compilation edi-c@algonet.se (Kurt Svensson) (1997-04-02)
Re: Textbooks on SQL compilation creedy@mitretek.org (1997-04-03)
Re: Textbooks on SQL compilation derek@knosof.co.uk (1997-04-06)
| List of all articles for this month |
From: Torsten Grust <Torsten.Grust@uni-konstanz.de>
Newsgroups: comp.databases.theory,comp.compilers
Date: 31 Mar 1997 15:23:30 -0500
Organization: Database Research Group, U Konstanz (Lake Constance)
References: 97-03-161
Keywords: SQL

Kevin Watkins <kwatkins@odi.com> 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/
          Flora: http://rodin.inria.fr/demos/optimizer/
          CROQUE: http://wwwdb.informatik.uni-rostock.de/~jo/CROQUE.engl.html
          Kleisli: http://sdmc.iss.nus.sg/kleisli/MoreInfo.html




Good luck,
--Teggy


--
    | Torsten Grust mailto:Torsten.Grust@uni-konstanz.de |
    | http://www.informatik.uni-konstanz.de/~grust |
    | Database Research Group, University of Konstanz (Lake Constance/Germany) |
--


Post a followup to this message

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