pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
writing a simple sql parser and database program
2+ messages / 2 participants
[nested] [flat]

* writing a simple sql parser and database program
@ 2006-11-07 07:02 Peter Michaux <petermichaux@gmail.com>
  2006-11-07 12:32 ` Re: writing a simple sql parser and database program Jonah H. Harris <jonah.harris@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter Michaux @ 2006-11-07 07:02 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I would like to learn how to write a simple SQL parser and database
program. This is for an embeded situation where I can't use a database
program like postgre. Jumping into the postgre source code seems a
little overwelming as I don't have a general understanding of how this
is done. Is there a link or book that explains the basics of how a
database parses SQL and how it then operates on the data?

Thank you,
Peter



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: writing a simple sql parser and database program
  2006-11-07 07:02 writing a simple sql parser and database program Peter Michaux <petermichaux@gmail.com>
@ 2006-11-07 12:32 ` Jonah H. Harris <jonah.harris@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jonah H. Harris @ 2006-11-07 12:32 UTC (permalink / raw)
  To: Peter Michaux <petermichaux@gmail.com>; +Cc: pgsql-sql

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/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-11-07 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-07 07:02 writing a simple sql parser and database program Peter Michaux <petermichaux@gmail.com>
2006-11-07 12:32 ` Jonah H. Harris <jonah.harris@gmail.com>

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