Re: XMLSchema==types and RDF==semantics

[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 UTC