[sc34wg3] TMQL, State of Affairs
Robert Barta
sc34wg3@isotopicmaps.org
Wed, 25 May 2005 09:53:12 +1000
On Tue, May 24, 2005 at 07:01:21PM +0100, Martin Bryan wrote:
> Then say so, and explain why TMDM is so radically different from
> every other data model in the universe that it needs its own query
> language. My point of view is that if it can be expressed in XML it
> can be queried using XQuery, and if it can be stored in a relational
> database it can be queried using SQL.
It is all about adequateness and efficiency. I can map EVERY data
model (minus functional dependencies) into a set of SQL tables. I have
seen Siemens projects where the ER-Diagrams filled the walls of a
middle-sized room, printed in 12pt. If this is for ONE particular
project, then this may be adequate. As a platform, so that millions of
users can write their own applications it is inadquate. Having 100+
tables may work. Or your database engine goes up in smoke. It
depends.
I can also map ANY data model (minus functional dependencies) into
text files on an MSDOS file system. And I can write my application
with grep, sed and awk. Not pretty and performing, but possible.
> If your statement implies that this model cannot be properly
> expressed in XML or stored in a relational database then people have
> a right to know. If your statement does not imply this then explain
> why using the model introduces efficiencies. Don't, please, expect
> others to understand this implicitly.
Let's make a thought experiment. Following your logic would mean that
we can actually ask ISO to drop SQL in favour of, say, POSIX. Everyone
should store all data into POSIX files and access them using the APIs
provided. Not sure how well this resonates with the SQL folks...
But, yes, this is not obvious.
The basic rule of this is "an abstraction (read: language) MUST have
all semantics of the underlying model IMPLICIT". In other words, if I
write a query statement, then I SHOULD NOT have to write (and to
rewrite over and over) any semantics inherent in the model. The
smallest (well) of such abstractions is the best (Occam).
As Murray wrote, if the models (Topic Maps, RDF, relational,
hierarchical, OO, functional, ...) are different, so is the
abstraction, so is the language. This has not changed in the last 2000
years of human history of language/culture creation.
Who knows.
\rho