Query type PSI? WAS: Re: [topicmapmail] Expressive capabilities of Topic Maps

Lars Marius Garshol larsga@garshol.priv.no
24 Jul 2003 21:26:29 +0200


* Peter P. Jones
|
| Ah. It's just that I wondered whether a standard PSI for the above
| might enable a standard representation of RDB data in TMs.  So,
| e.g., with Jan's Person table, I might create a topic of type Person
| (P1) and topics for all the column names, then add an occurrence of
| type 'SQL database query' to P1, and similarly occurrences for each
| of the column names with data inserted into resourceData (in XTM -
| I'm deliberately assuming that's unproblematic).

Ah, I see what you mean. I think you'd probably need more than just a
single PSI, but it's not at all a bad idea. It would probably be
possible to do something quite cool with this approach, though if you
do it the way you suggest you might force the SQL-to-TM interpreter to
do more SQL queries than is really efficient. Other than that I think
this is a good idea.
 
| Is there a standard method for representing the column names on DBs 
| beyond the internal addressing of the DB?
| E.g. in mySQL you can address a column within the DB with 
| db_name.tbl_name.col_name	
| But can you identify that from without with something like
| db_name.tbl_name.col_name:db.myserver.com:3077
| as a global address for the column (assuming the appropriate 
| connection protocol is a given)?

Not in a really standard way, no. You can use JDBC URLs to address a
specific database (syntax will always be different, but that need not
necessarily matter) and then use a personal convention for how to add
table and field names to that which probably would work.

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