logo
Introduction < SQL as TM Query Language? No, thanks! < < Home 

prevUpNext

Introduction

While this might be a strange question now, especially since the TMQL[TMQL] specification is around the corner, it is a question which has emerged a number of times in the past. Obviously, the partial answers which have been provided in various mailing list conversations were lost or were not convincing enough. This article tries to remedies this, exhaustively, and for all times. Urbi et orbi. And I even try to say something intelligent at the end.

Probably the most sophisticated (and recent?) proposal was that from Kal Ahmed and Graham Moore[TMRQL]. Their approach is to define a set of database tables (actually 20 views together with 6 functions). Given that setup, a topic map stored in these tables can then be queried using standard SQL. To substantiate the fitness of their ideas, they also solved most of the TMQL use cases[TMQLuc], omitting only those which would have to generate XML content or TM content.

While one might think that this looks like a "If you have a hammer, then everything looks like a nail." approach, it has a certain appeal: It off-loads the real heavy-lifting onto an SQL engine. SQL is well understood, by both, engine developers and application developers who are users of the language. Creating and operating SQL databases is in most university curricula and coursework certifications.

Let us look into some of the arguments in more detail.