Version 24 of Metakit

Updated 2005-12-19 18:14:09

http://www.equi4.com/images/metakit.gif

MetaKit is a C++ database library, and is used as the persistence engine underneath WiKit. If it works as intended, you'll never have to deal with any of it, because one of its goals is to help you stay out of trouble.

The homepage of MetaKit is: http://www.equi4.com/metakit.html

alove -- Documentation for using MetaKit with the TCL extension Mk4tcl is at: http://www.equi4.com/metakit/tcl.html

RLH - A tutorial by Mark Roseman is at: http://www.markroseman.com/tcl/

DDG: Tiny SQL for Metakit provides tsql4mk.

It was developed, and is actively supported, by jcw.

See MetaKit Tips and Tricks for useful code snippets.


CMcC Err, what happened to the old page? Ah, found what I was after here: mk4too

09nov05 jcw - There were two pages called "Metakit" in this wiki, due to some old renaming glitches. I've manually adjusted things to resolve this (the "lost" copy was on page 478). Below is the original text.


Metakit has its own (now closed, read-only) Wiki [L1 ] and home page [L2 ].


Metakit is the persistence engine for Wikit, of course.

The Metakit File Format.

The Tcl binding to Metakit is named Mk4tcl.

It was claimed here that Mk4tcl is part of the ActiveTcl Batteries included release. This does not appear to be the case as of 8.4.2, 9 May 2003 - Roy Terry. Metakit is included in lib/mk4tcl as of tcl 8.4.4, but without documentation, it seems (Hof).


DGP For what it's worth, here are the points I found most useful in the Roseman intro:

  • Use properties that define as small a unit of information as possible.
  • Creating more views is a good thing. Do that, don't muck up a single view with special cases.
  • Moving data to/from a Tcl array is easy and familiar to Tclers.
  • Emphasis that restructuring of a view layout means you can continue revising your data model as you go. Just start coding; you can change it later.
  • Some discussion when subviews are good vs. additional views.

"... many of the integrity checks required in traditional database use are not required in Metakit, because Metakit offers nested views -- a cleaner way to represent the relationships often enforced by integrity constraints."


"cleaner" is a matter of opinion, ask a relational database theorist. I don't want to start those arguments here, just point out that if you use Metakit for a complex system, you should design first, and be very careful. - EMJ

DKF: "You should design first"? That's actually true of any non-trivial program, you know... ;^) An ounce of thought saves a ton of effort.


MetaKit Viewer

See also dgmkviewer, a metakit viewer/editor in Tcl


Ruffy

Having trouble with Metakit. The SELECT example of Roseman's draft doesn't work with me. I get the error, "view index is out of range". As in, e.g.

 foreach i $rownums {
     puts [mk::get $i name]
 }

And were I to follow the SELECT statement with:

 puts [mk::view size $rownums]

I get a result of zero.

What am I doing wrong?


Category Database

Category Package ]