[topicmapmail] Expressive capabilities of Topic Maps

Lars Marius Garshol larsga@garshol.priv.no
08 Aug 2003 15:29:23 -0400


* jalgermissen@topicmapping.com
| 
| I have a question regarding the expressive capability of topic
| maps. I am very curious what others think about or how they solved
| something similar to the follwoing.

I've done this a couple of times, so I thought I'd have a stab at
this, even though it's getting a little late to answer your question.
 
| Suppose a company indends to migrate the following relational data to
| topic maps:
| 
| 
| CREATE TABLE PERSON (
|     ID        CHAR(10),
|     SURNAME   CHAR(60),
|     FIRSTNAME CHAR(60),
|     BIRTHDATE DATE,
|     CITY      CHAR(30),
|     ZIPCODE   CHAR(6),
|     STREET    CHAR(40),
|     COUNTRY   CHAR(3),
|     PRIMARY KEY(ID),
|     UNIQUE (SURNAME,FIRSTNAME)
| );
| 
| INSERT INTO PERSON VALUES
| ('6657A54','Hansen','Hans','02-02-1970','Hamburg','22607','Im Gehoelz
| 33','FRG');
| 
| 
| How would the entity Hans Hansen be represented in a topic map
| (propably in XTM syntax), assuming that all the attributes are to
| remain attributes (meaning that they are not be regarded as subjects
| in their own right and thus not to be represented as topics). 

I would do something like the following (using $COL for column
references):

  [person$ID : person = "$FIRSTNAME $SURNAME"; "$SURNAME $FIRSTNAME"
                      = "$FIRSTNAME" / given-name
                      = "$SURNAME" / surname]
  {person$ID, birthdate, [[$BIRTHDATE]]}
  
City and country I would be strongly tempted to do with associations,
but if we are to go your route then the rest of the table follows the
pattern set by the birthdate.

| - How to preserve the expressive capability of the original data,
| such as the data types of the various properties and the uniqueness
| constraints

There's no standard way to do that yet, but my approach would at least
preserve the identity requirement on the ID. As for the datatyping I
would expect TMCL to do that.

| - how to document/communicate the decisions so that others can
| understand them (like the way we can all understand the SQL
| statements)

TMCL, once standardized, solves that problem.

Was this the kind of answer you wanted?

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >