From: Jonah H. Harris <jonah.harris@gmail.com>
To: Peter Michaux <petermichaux@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: writing a simple sql parser and database program
Date: Tue, 7 Nov 2006 07:32:03 -0500
Message-ID: <36e682920611070432ke5d17d3m26be8036e6c6d033@mail.gmail.com> (raw)
In-Reply-To: <3cbaf1c80611062302q7d07a661qc4c3eb3e89105572@mail.gmail.com>
References: <3cbaf1c80611062302q7d07a661qc4c3eb3e89105572@mail.gmail.com>
On 11/7/06, Peter Michaux <petermichaux@gmail.com> wrote:
> I would like to learn how to write a simple SQL parser and database
> program ... Is there a link or book that explains the basics of how a
> database parses SQL and how it then operates on the data?
For a fairly good learning resource, you can check out LEAP
(http://leap.sourceforge.net/); it doesn't use SQL and instead, has
it's own relational language... but it's a good place to start if you
want to learn how this stuff works. You can also check out pql
(http://www.ibiblio.org/pub/Linux/apps/database/sql/pql-0.8.1.src+bin.tgz),
which uses a SQL-ish language, or SQLite for a little more advanced
example (http://www.sqlite.org)
Of course, there's a lot of fairly simple and easy-to-understand Java
databases like hsql or McKoi too. Most Java databases are going to be
using ANLTR or JavaCC for their parsers while C/C++-based databases
use Bison, ANTLR/PCCTS, or a hand-written SQL parser.
A Java database is going to be a lot easier to understand the concepts
of than one in C.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jonah.harris@gmail.com, petermichaux@gmail.com
Subject: Re: writing a simple sql parser and database program
In-Reply-To: <36e682920611070432ke5d17d3m26be8036e6c6d033@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox