My 2 cents:

create table Objects(id integer primary key, name text);
create table Attributes(id integer primary key, name text);
create table ObjectAttributes(objectID integer, attributeID integer, order integer, type integer, value text, version text);

----- Original Message ----- From: "Michael Ruck" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Friday, April 20, 2007 10:10 PM
Subject: [sqlite] DB design questions


Hello,

I'm currently modelling and designing a new database according the following specifications. The general idea is the ability to store arbitrary objects,
which have attributes of various kinds. The attributes themselves may be
multivalued. The objects being stored need to be versioned, so that there's
a way to go back to previous versions of an object. The objects represent
metadata of media files and the data itself comes from various automated
sources and manual editing by a user.

My current idea was the following:

- CREATE TABLE objects (id TEXT, version TEXT)
- CREATE TABLE attributes (object_id TEXT, version TEXT, name TEXT, order
INT, type INT, value TEXT)

Is there anyone who has experience with this kind of design, do you have
better ideas on modelling this kind of data?

Thanks,
Mike


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------





-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to