dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]GNU.RDF


From: Peter Minten
Subject: Re: [DotGNU]GNU.RDF
Date: Wed, 19 Mar 2003 17:30:53 +0100

James Michael DuPont wrote:
> 
> Looks good peter.
> There are a couple of things that you might want to think about.
> 
> Isolation and abstraction.

Could you explain that please?

> The design of Database Tables are going to have to abstracted a bit.
> Maybe you will want to hold values, integers, uris in the tables.

Here's a new attempt:

TABLE triples
{
        subject: unsigned long; //refers to table strings
        predicate: unsigned long; //refers to table strings
        object: unsigned long; //refers to a data table
        objecttype: char[1]; //tells what is the type of the object
        //'s' = string, 'i' = integer
}
INDEX ON (subject) AND (subject AND predicate);

TABLE strings
{
        pkey: unsigned long;
        value: text;
}


Note that if object type is 'i' I use a little trick to improve efficiency: the
first 32 bits of object are taken and placed into a signed integer using a
simple bit copy. If I would place integers in a separate table that wouldn't
make much sense since I would require 2 unsigned longs as foreign key/primary
key while the actual value is only an integer.

Also note that this model can be expanded for other data types. But this is the
general setup.

> I would like to try and help out on this.

Great. What do you think of my new model?

Greetings,

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]