-- a simple topicmap-ish relation table. table tm_relations { id int auto_increment type varchar -- TM instanceOf (eg, actor-film) subject varchar -- TM topic (topic of current page/view) subjRole varchar -- TM roleSpec (eg, actor) object varchar -- TM topic (object of association, -- eg, "TO Kill a Mocking Bird") objRole varchar -- TM roleSpec (eg, film) } -- roles are useful because topics may have multiple roles, eg, Gregory Peck -- is/was(?) an actor, a father, a producer, a teacher, etc. -- an RDF-like approach is very simply based on triples: Subject, predicate, -- object. it's amazing how powerful this simple construct is. The predicate -- does all the work. -- eg, {GP, is-actor-in, TKMB} for GP as subject; -- eg, {TKMB, has-actor, GP} for TKMB as subject; table rdf_relations { id int auto_increment subj int -- node_id pred varchar -- or an id in predicate table (more normalization) obj int -- node_id } -- To get all relations for GP: -- Select * from rdf_relations where subj='GP' order by pred; -- You'll probably want to create a link for the object, so you'll want to -- join with the node table on object to get node_id (or other needed link -- creation information). Then, you output with -- (pseudo code): foreach $result, echo $pred [link:$obj]. -- Since the RDF concept is so simple and immediately intuitive, it may be a -- good choice for an initial relation module. It can also be easily extended -- later into richer TM while preserving the original fields and data.