[RDF] Multiple models
Jonas Liljegren
jonas@rit.se
16 Nov 2000 11:20:02 +0100
Fixed some bugs with deleting resources, and with the working model.
Sessions is in place. DB-connections is reused. The server seems
stable.
I am thinking about how I am storing the statements in memory and in
the database.
There is now three "layers" of object storage:
1. Each IDS has it's own objects (for the same resource).
2. The resorce bundles some data, not stored as statements, combining
multipple models.
3. The DBI stores one record for a specific resource for each model.
The method of storage for 2 and 3 shouldn't interfere with eachother.
The simplest model would be to just store each statement as a
statement. But my thoughts here was to optimize for the common case.
It's possible that two models define the same statement with the same
URI but with diffrent {p,s,o}. That would be unusual, but possible.
We could also have the content of a literal diffrent in diffrent
models.
The resouce object has data that defines a number of implicit
statements. It includes the statement triple, model, literal value,
lable and some other things.
There is a list of models coupled with the resource object. The
implicit statements is thought to be contained in all those modles.
If any of the modles differ for those statements, those statements
should be extracted from the object and stored explicitely as extra
statements.
The consequence is that almost everything will have to handle the list
of models and check that new statements match the old statements. We
can't ad one statement at a time because that would force them to be
made explicit.
And we can't change the content of a literal if the existing literal
is bound to another model.
(On top of that, every change will have to expire the same resorce
object in all other IDS. ... And it get's more complicated to update
the DBI.)
There is an assumption here that it's common to have identical
statements in many diffrent models. I'm starting to doubt that all
the work is worth it.
Maby it would be better to just allow one model for a statement, and
to have som sort of warning flag to say that one or more statements
has been made explicit.
--
/ Jonas Liljegren
The Wraf project http://www.uxn.nu/wraf/
Sponsored by http://www.rit.se/