W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2001

Re: XMLSchema==types and RDF==semantics

From: Thomas B. Passin <tpassin@home.com>
Date: Thu, 27 Sep 2001 09:47:30 -0400
Message-ID: <002601c1475a$f3e8e600$7cac1218@cj64132b>
To: <www-rdf-interest@w3.org>, "Richard Emberson \(by way of \"Ralph R. Swick\" <swick@w3.org>\)" <emberson@phc.net>
[Richard ]

> What representation would one use in the
> database if one had many, many entries
> (low disk space usage/high performance)?
> Since its an RDB the search would be in sql -
> this stuff is in a RDB, I can not use
> in-memory xpath code.
>
You might be able to ues path expressions after all.    Depending on the
database design, it may be possible to write a query that produces a path
for each data element in the database.  I have done this for several
databases so far, one I created from an XML document (including the famous
HAMLET.XML file)  With this query, you can create a view for the paths, and
from that you can make a table which you can index (indexing is a must).
Then you add one field to each data item that points to its path in the path
table.

Usually there are only a relatively few different paths compared to the
number of data entries, so this does not increase the size of the database
very much.

Oh, yes, for actual text values  you need to give them a pseudo-element,
like "~text", so they can be given a path.

After this, you can create queries using path expressions, including
wildcards:

select * from play join pathtable
where pathtable.path like '/play/%/speaker/~text'

would get the name of all the speakers in all acts and scenes.

I don't know if you could do it for your database, but you might look and
see.  When it works, it's amazingly flexible.

Cheers,

Tom P
Received on Thursday, 27 September 2001 09:42:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:51 GMT