body { margin:0px; background-color:#fff } img { margin:0px; border-style:none } button { margin:0px; border-style:none; padding:0px; background-color:transparent; vertical-align:top } p:first-child { margin-top:0px } table { empty-cells:hide } .f-sp { font-size:1px; visibility:hidden } .f-lp { margin-bottom:0px } .f-x1 { } .f-x2 { } .f-x3 { } a:visited { color:#8b0000; text-decoration:underline } .capsub { color:#808080; font-weight:bold; text-transform:uppercase; letter-spacing:2.4px } .style7 { color:#000; font-style:italic } .bold { color:#00f; font-weight:bold } .bulletlist { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0.1px } .style18 { color:#000; font-style:italic; font-weight:bold } .style17 { color:#000 } .rightaligned { margin-left:0px; margin-right:0px; text-align:right; margin-top:0px; margin-bottom:0.1px } .footer { color:#808080; font-size:90% } .FWExtra { } .FWExtra a:link { text-decoration: none; } .FWExtra a:active { text-decoration: none; } .FWExtra a:visited { text-decoration: none; } .FWExtra a:hover { text-decoration: underline; } -->
Equi4 Softwaremetakit

top pages

 

Metakit
Tclkit
Starkit
CatFish

 

Soapbox

 

Blog
Musings

Tclers' Wiki
The SAX

Company

 

About
Services
Contact info
Support

 

Site map

Metakit's "View" model

Metakit is based on a carefully chosen mix of relational and hierarchical concepts. The core model is most definitely relational. For a number of reasons, Metakit uses a somewhat different terminology, i.e. not relations, tables, records, or fields.

vcellsViews

A view is an NxM matrix. It has N rows (numbered 0..N-1) and M columns (these are referred to by name, not by position). On the right is a view with 5 rows, 6 columns.

Views have a number of important properties:

  • all cells in a column have the same type, i.e. columns are homogenous
  • each of the cells in one row can have different types: int, string, float, etc
  • in addition, there is one special type: "subviews" ...

The most important difference between Metakit and purely relational databases, is that it supports nesting of views:

vsub

This nesting is somewhat similar to "repeating fields" in some database systems.

vrowsTraditionally, databases are organized in a row-like fashion, as shown here on the left. It is usually not just the conceptual model, but also the way data is stored on disk, i.e. all data belonging to a single row is stored in a contiguous range of bytes. Fetching a row then gives access to all the data in the row.
 

vcolscolumns

In Metakit, this approach has been turned on its head - literally. This "inverted" design puts the data belonging to one row all over the disk. Instead, everything is stored in a column-wise format.

This has far-reaching implications!

For one, it's considerably harder to insert and delete "rows" in a column-wise world. Each column of the view needs to be changed, with bytes inserted or removed, and moving potentially large amounts of data to make space or fill up the space.

The reason this makes sense at all, is the insight that performance only matters in cases which are done frequently. Which almost always means inside tight loops. And tight loops tend to iterate over rows, not columns!

Continued...

metakit index

Intro / News

Overview

Documentation

Licensing

Download

Mailing lists

To-do list

Acknowledgements

Quotes

Links