Re: Dreaming About Redesigning SQL

From: Seun Osewa <seunosewa_at_inaira.com>
Date: 7 Oct 2003 02:19:36 -0700
Message-ID: <ba87a3cf.0310070119.94a1d3f_at_posting.google.com>


What do you think about the so-called "Associative Model of Data"

"The associative model divides the real-world things about which data is to be recorded into two sorts: Entities are things that have discrete, independent existence. An entity's existence does not depend on any other thing. Associations are things whose existence depends on one or more other things, such that if any of those things ceases to exist, then the thing itself ceases to exist or becomes meaningless."

Whitepaper(its ok to skip over the hype): http://www.lazysoft.com/docs/other_docs/amd_whitepaper.pdf

==Unrelated to the above, but somewhat motivated by it== I am beginning to think there may a place for a database model that consists of the most commonly used subset of relational, SQL or aiming-to-be-relational databases. For example, I may want to make a generalization of the observation that so many tables begin with CREATE TABLE XXX (ID INT AUTO_INCREMENT PRIMARY KEY ... ) unless there is a natural unique key, and that those that don't are often used merely to indicate many-to-many relationships: CREATE TABLE COUPLES
(MAN_ID INT REFERENCES MEN, WOMAN_ID INT REFERENCES WOMEN).
Now even in the case where there is a natural primary key for a table
(hope my terminology is right) e.g. a social security number for a
PERSONS table, a product part number (like METPLAS012A) for a PRODUCT_PARTS table, etc, if we can figure a way to generate an integer primary key (from 0 to 2^32 or 2^64 or as the case may be), then its easy to think of a technique related to hashing that eliminates the need for another index on the "natural primary key" and makes lookups/joins for the table using the "natural" key as fast as operations using the "meaningless" integer key.

Sometimes I think that, while the the separation of logical from physical model is a nice concept, it should not prevent those who understand the underlying physical implementation and the data access patterns of their target application from tweaking things to achieve acceptable performance... things they would not have to tweak if their performance was ok by default. I want to compare it to things like C++ inline keyword, which help to make things faster in the case where the programmer knows a little bit more than the compiler. I want to say if the application designer knows a lower-level way to get his applications to run faster, give him the chance, that a good language should give power to the user who wants to go the extra mile.

So pls help me point out any flaws there might be in my logic!

A million thanks,

Seun Osewa. Received on Tue Oct 07 2003 - 11:19:36 CEST

Original text of this message