Re: a simple DBMS and SQL Engine parser

From: Bill Thompson (billt61_at_rgv.rr.com)
Date: 11/06/04


Date: Sat, 6 Nov 2004 09:39:28 -0600


"mahaa" <mahaa@discussions.microsoft.com> wrote in message
news:F35DEEB5-6969-4188-96C4-4F8E4C31DC94@microsoft.com...
> Hi guys;
> i'm about to start an interesting c++ project described below...what i
need
> is some links; resources and help on how i can get started...thanks for
> helping
>
>
>
> Assignment:
> In a nutshell, this assignment asks you to create a parse-tree for sample
> test SQL statements and actually create the underlying data structures to
> hold the data i.e. you are creating an extremely rudimentary SQL Engine
> (front-end parser) and a DBMS (back-end data structures). Our SQL Engine
can
> be thought of as a bare-bone compiler. To test the SQL Engine and the
DBMS,
> you will create a sample database. Finally (non-programming part), you
will
> read up on the ODBC driver.
> Note that a real compiler and a DBMS have functionality that is way beyond
> what I am going to ask you to implement. In fact, your DBMS software
creation
> may disregard issues regarding efficiency - those that couple the DBMS to
the
> OS i.e. page buffering, blocking, concurrency, etc. Ours will be a
> data-centric view i.e. we will only focus on how best to save the user
data.
> Treat this as DBMS-101 (It is more like DBMS-1.01).
>
> Functionality:
> Your SQL-Engine/DBMS software must offer the following capability-
> Data: You must design data structures that will allow me to create tables
> and delete (drop) tables, insert tuples into tables, delete tuples from
the
> tables and modify tuples values in tables possibly based on some criteria.
> Querying of course is the most important and frequently performed
activity,
> but do NOT worry about joining tables or complicated queries. Data
> Serialization is of course implied by retrieval.
> Meta-Data/Data Dictionary: In addition, I should be able to look up names
of
> all tables that exist or the table definitions that exist and so on.
> Future Requirements: I am being vague on this so that I may or may not add
> some small functionality later.
>
> Software Components:
> SQL Engine: Create a basic parser. Your parser should be able to parse the
> limited SQL statements that have been provided in Appendix A.
> § Include the test cases you used for the parser. Software Architecture
and
> Implementation documents should also be attached.
> § Have the parser create parse trees for the sample SQL statements in
> accordance with your proposed grammar. The input could come from
command-line
> or a stored file.
> § Print the parse trees (In-order and Pre-order) for sample input to
present
> proof of correctness.
> § That completes the front-end of our SQL-engine.
> DBMS: Propose a data structure, which will house the actual database. The
> back-end of the program will "walk" the parse tree and create/fill in the
> data-structures in the back-end DBMS accordingly.
> § Data Dictionary - meta-data details. I.e. lists details about tables and
> fields.
> § Data Definition - creation of tables.
> § Data Manipulation - update/modify, storage and retrieval of records.
> § Disregard issues regarding efficiency - those that couple the DBMS to
the
> OS i.e. page buffer, blocking, etc.
> §
> Database: Create a sample database to test your SQL/DBMS software. You
must
> attach database schemas, tables with inserted values in your final
submission.
>

I would iamgine you could use Yacc and an existing SQL grammar.

This sure looks like homework, it's to trivial to be industrial.



Relevant Pages

  • Re: MV and SQL
    ... >> perform enquiries on it using the query language then, again, how the ... > Are you sure that a column in Pick is equivalent to a column in an SQL table ... If you had some bizarre need to do this in a Pick DBMS though, ... > Besides the query language of Pick what other ways do ...
    (comp.databases.theory)
  • Re: MV and SQL
    ... >> perform enquiries on it using the query language then, again, how the ... > Are you sure that a column in Pick is equivalent to a column in an SQL table ... If you had some bizarre need to do this in a Pick DBMS though, ... > Besides the query language of Pick what other ways do ...
    (comp.databases.theory)
  • Re: MV and SQL
    ... >> perform enquiries on it using the query language then, again, how the ... > Are you sure that a column in Pick is equivalent to a column in an SQL table ... If you had some bizarre need to do this in a Pick DBMS though, ... > Besides the query language of Pick what other ways do ...
    (comp.databases.theory)
  • Re: MV and SQL
    ... >>> Are you sure that a column in Pick is equivalent to a column in an SQL ... > You can also change the type from varchar to array if your SQL DBMS support ... > for variables that store the data retrieved from the database. ... >>> SQL is not the only language. ...
    (comp.databases.theory)
  • Re: choices regarding where to place code - in the database or middle tier
    ... Sure, the DBMS is a good place for simple referential integrity constraints, ... to 4 separately-running-but-pipelined stored procedures, ... A typical user would enact a 100 or so business functions per day. ... own stored procedures' by storing the SQL for every business query in the DBMS ...
    (comp.lang.java.databases)