Guy,--
Guy.A.Lukes-kgnU/9V7PNs@xxxxxxxxxxxxxxxx wrote:
>
> To start with, I must say that I am not a topic map expert.
>
> But in my resent attempt (with Bryan Thompson) to implement a topic map in
> a relational database, I was shocked to discover that the underlying
> database structure was only a slight modifications of RDF triples.
>
> The Subject is the a-node
> The predicate is the r-node
> The object is the x-node
>
> All that was missing was a c-node to reify the triple
> and a set of PSIs to implement subject roles (predicates/r-nodes/roles) to
> support topicmap merging behavior.
>
> This gives you the simplicity of the semantics free RDF triples, with the
> power of topicmap subjects and merging (if you need it), plus the ability
> to leverage all work that is going on in the RDF community.
>
> Is there something I am missing, that is going to cause be problems down
> the road?
Yes, there is!
It is true that a topic map graph a la Reference Model can be represented
using RDF triples but that does not take you very far, because your RDF
triples would only represent the particular graph structure an carry no
information about the original relationship you are actually representing.
You'd still have to put that information somewhere, it is not inside the RDF!
If you just need a graph representation technique to store the assertion
structures,
I suggest you use relational tables and not RDF (which is overly complex for
this
sort of thing).
Here is what I mean by 'relational table':
Suppose you have the relationship "Jack is father of Jim", which gives
you the following assertion:
T
|
R1 | R2
| | |
x1[jack]-----C1-----A1-----C2-----x2[jim]
T: assertion type father-son
R1: role father
R2: role son
Mathematically, an assertion can be understood as an ordered tuple of the form
(T,A1,R1,C1,x1,R2,C2,x2,...Rn,Cn,xn)
(Note that it is the order that preserves the structure)
Here is where relational tables are handy (and extremely efficient for storage)
because you can 'translate that tuple into a row in a table representing all
assertions
of type T:
Assertion type T:
A | R1-casting |R1-player | R2-casting | R2-player |
---+------------+----------+------------+-----------+
A1 | C1 | x1 | C2 | x2 | <--- this is the above
assertion
Note also, how the relational model naturally supports answering questions such
as "what are all the sons of Jack":
SELECT R2-player
FROM T
WHERE R1-player = x1
I have used such a query language in a (now outdated but still available)
version of my topic map toolkit and for me this approach was quite
comfortable for most queries. A draft explanation of this STMQL can be
found at:
http://www.gooseworks.org/stmql.html
Hope this helps a bit.
Jan
> Guy
>
> _______________________________________________
> topicmapmail mailing list
> topicmapmail-Zo64W7twoUFWk0Htik3J/w@xxxxxxxxxxxxxxxx
> http://www.infoloom.com/mailman/listinfo/topicmapmail
--
Jan Algermissen http://www.topicmapping.com
Consultant & Programmer http://www.gooseworks.org
|