I just checked into rdflib a library that implements a lightweight (and very scalable) relational model of Notation 3 (and FOPL - in general). From the doc string:
.. used to model the 3 'partitions' for N3 assertions. There is a top level class which implements operations common to all partitions as well as a class for each partition. These classes are meant to allow the underlying SQL schema to be completely configurable as well as to automate the generation of SQL queries for adding,updating,removing,resolving triples from the partitions. These classes work in tandem with the RelationHashes to automate all (or most) of the SQL processing associated with this FOPL Relational Model NOTE: The use of foreign keys (which - unfortunately - bumps the minimum MySQL version to 5.0) allows for the efficient removal of all statements about a particular resource using cascade on delete (currently not used) see: http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-foreign-keys.html In particular it implements: - Interned identifiers and values. RDF quads are stored using interned identifiers for their parts (instead of the full lexical form) as well as an enumeration of (U,L,B,F,V) specifying whether each term is (respectively) a URI, Literal, BNode,Formula, or Variable - identifiers and values are stored in seperate hashe tables using an 64-bit integer (formed by converting the latter half of their md5 hash as a hexidecimal number). This introduces a collision risk that (currently) isn't detected - Assertions are stored in 3 partitions: one for classifications (where the property is rdf:type), one for literal properties (where the objects are Literals), and a third for all other assertions At medium volumes, I've experienced 3 X speed increas on queries (with and without REGEX matching). It's still a work in progress, but I've gotten it through most of the major test suites. The use of 64-bit half-md5-hash integers for interning identifiers/values is burrowed from 3Store, Oracle Spacial RDF (they use integers also for interning ids/values - but I'm not certain if these are created using hash funcitons or not), and ARC Chimezie _______________________________________________ Dev mailing list [EMAIL PROTECTED] http://rdflib.net/mailman/listinfo/dev
