MetaKit SQL sneak preview


Februari 11, 2000

Technology preview: a Tclodbc-compatible interface to the MkSQL demo is in mksql_tcl.zip. It lacks things like '?'-processing and real prepared statements. All comments below apply.

To run this, unpack all files and run test-mksql.tcl from a stub-enabled version of Tcl (tested with 8.2.2). This does not currently work with TclKit due to a package name clash with the built-in MetaKit code. The "data.mk" file contains a small testset (the same as used in the MkSQL standalone demo below.


Februari 7, 2000

The proof-of-concept demo is in mksql_pre.zip. It contains a standalone executable called "mksql_pre.exe", as well as a small sample dataset, shamelessly stolen from the drinkers example by Aaron Watters (author of Gadfly). The sample tables are called "frequents", "likes", and "serves" (type carefully, MkSQL currently bails out when given incorrect table names).

With both extracted, you can launch mksql_pre.exe and type things like:

	select * from frequents;
Terminate each statement with a semicolon.

Alternately, the demo will create an empty "data.mk" file if none is present.

The following was extracted from some of Gordon McMillan's notes about MkSQL:

Implemented to various states of completeness:
 CREATE TABLE
 INSERT
 SELECT
 COMMIT
For SELECT
 Multi-way joins work as long as column names are the same.
 GROUP BY works
 INTERSECT, UNION, EXCEPT work
 SUM, AVG, COUNT work
 correlated subqueries work (EXISTS and IN (?))
 "...column in (  )" works
 ORDER BY works (by name or number) but not DESC
 HAVING works as long as the conditions are on names, not calculations,
   so "SELECT bar, sum(quantity) from serves
         GROUP BY bar
         HAVING sum(quantity)>500" will NOT work,
   while "SELECT bar, sum(quantity) as total from serves
         GROUP BY bar
         HAVING total>500" WILL work.
 "x*y" (or other arithmetic op) may or may not work,
   depending on where it occurs.
 If a join condition is not top-level (or in a top-level AND)
   it may do entertaining things. 
 No UPDATE or DELETE yet.
Please don't draw conclusions from the above, you are looking at work in progress.

That's all there is as documentation for now...