Re: Bulding a query engine

From: <quanunique_at_my-deja.com>
Date: 2000/01/22
Message-ID: <86atdg$t1a$1_at_nnrp1.deja.com>#1/1


In article <38822496.A11FF724_at_nospam.com>,   NoSpam <spam_at_nospam.com> wrote:
> I am attempting to write an SQL front-end to a custom database for a
> final year university project. Obviously this involves parsing the
> language and then query planning & execution. Does anyone have any
> experience of this, know what approach to take or know where to find
> appropriate information and resources? Any help would be appreciated.
>
> Cheers,
>
> Conan.
>
>

I built an OQL ( very similar to SQL syntactically)) query engine for my research project. Here is what I think it might take:

(1) Parser: A parser that interepts a SQL query into relational algebraic expression. An expression can be think of a tree with nodes representing operators such as join, selection; with edge representing the data flow among operators.

(2) Optimizer: query planning is a complicated process. One typical approach is to build some transformation rules to generate the equivalent expressions that hopefully contains more efficient one than the original expression derived by the parsing phase. The optimizer will pick the expression that is expected to be the best as the optimal plan.

(3) Evaluator: the evaluator includes the physical relational operators using specific algorithms. Example of such operators are hash join, sort merge join, index-filter.

I think you can find discussion on (2) and (3) in most database texts, such as Ullman's , or Date's. Papers discussing these issues can be searched in DBLP bibliograph site ( http://www.acm.org/sigmod/dblp/db/ )

Quan.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Jan 22 2000 - 00:00:00 CET

Original text of this message