[tmql-wg] Proposed requirements: Operations on primitive types
Dmitry
dmitryv@cogeco.ca
Thu, 24 Jul 2003 19:22:42 -0400
From: "Lars Marius Garshol"
To: <tmql-wg@isotopicmaps.org>
Sent: Thursday, July 24, 2003 8:48 AM
Subject: Re: [tmql-wg] Proposed requirements: Operations on primitive types
>
> * dmitryv@cogeco.ca
> |
> | I think that TM authors should have ability to specify typed data
> | occurrences and use data types in queries even without any TMCL
> | schema attached to topic map.
>
> I agree with the second part, I think, but I'm unsure about the first.
> Are you essentially proposing to extend the SAM with typed occurrence
> values?
Developers will try to use data types anyway. Standard set of urns for
datatypes can be a standard extention to SAM.
Actually, I see it more as "implementation hints" than real extension to
SAM.
TM and TMQL engines have to work without explicit typing. They use dynamic
casting in this case.
But if user/author provide hints - engines can take advantage of them.
I just remember SQL examples when changing from string to number/dates
matching/calculations can improve performance significantly.
> | TMCL can validate what is already in TM in terms of data types. It
> | can help during authoring but I think that TMCL usage is not
> | mandatory.
>
> I agree it should not be mandatory, but it seems messy to have typing
> both in TMCL and in TMQL. Maybe there is some way to resolve this
> without duplicating anything, but that will require some thought, and
> at the end of the day we may then have added a capability that is not
> very interesting.
I personally do not see problem with making them consistent. Allowing
primitive data types in TMQL (and during TM authoring) means that we have
predefined "primitive data type ontology". Users do not need to specify it
explicitly. But users can provide hints (special URN form during authoring,
constructors and explicit converters in queries) which invoke in some sense
this default ontology.
Dmitry