[sc34wg3] TMQL requirements 0.9.0

Lars Marius Garshol sc34wg3@isotopicmaps.org
26 Jul 2001 12:50:20 +0200


Based on input from the tmql-wg mailing list, Holger and I have now
created a new version of the TMQL requirements document, which is
attached to this email. We hope to get feedback on this document in
Montréal. 

An explanation of the changes in this version of the document is found
at the end. Sara/Jim: could you please add this to the SC34 document
registry? 

--Lars M.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- $Id: tmqlreqs.html,v 1.10 2001/07/26 10:41:56 larsga Exp $ 
 0.8.2: 1.4
 0.9.0: 1.10
-->
<html>
<head>
<title>TMQL requirements (0.9.0)</title>

<style type="text/css">
th {
  text-align: left;
  vertical-align: top;
}

h1, h2, h3, h4 {
  font-family: Verdana, Helvetica, sans-serif;
}

body {
  margin-left: 10%;
  margin-right: 10%;
  margin-top: 48pt;
}

dt {
  font-weight: bold;
}
</style>
</head>
<body>

<h1>TMQL requirements (0.9.0)</h1>

<table>
<tbody>
<tr><th>Editors:</th>
    <td><a href="mailto:holger.rath@empolis.com">Hans Holger Rath</a>,
        empolis GmbH<br>
        <a href="mailto:larsga@ontopia.net">Lars Marius Garshol</a>, Ontopia
</td></tr>
<tr><th>Version:</th>      <td>0.9.0</td> </tr>
<tr><th>Last changed:</th> <td>2001-07-25</td> </tr>
</tbody>
</table>

<h2>1. Introduction</h2>

<p>
This document sets down the requirements that will guide the work with
the Topic Map Query Language (TMQL), a query language for topic maps.
These requirements document the intentions of the standards editors,
as informed by the user community. The purpose of this document is to
make it clear what can be expected to come out of the TMQL process,
and to encourage the user community to make their needs known to the
editors.
</p>

<p>
This document has requirements for the TMQL standard as a whole, and
for the query part of TMQL in particular. Additional requirements for
the update part of TMQL will have to be defined at a later stage.
</p>

<p>
The following key words are used to indicate the degree of certainty
associated with each particular requirement:
</p>

<dl>
<dt>Shall</dt>
<dd>Means that the requirement is absolute.</dd>
<dt>Should</dt>
<dd>Means that the requirement is a goal.</dd>
<dt>May</dt>
<dd>Means that the requirement is considered important, but that it is
not yet clear whether TMQL should conform to it or not.</dd>
</dl>

<p>
Please note that some requirements are only implicitly specified
through the form of other requirements. This document must be read
with care.
</p>

<p>
Feedback on this requirements document is requested.
</p>

<h2>2. Requirements in brief</h2>

<p>
This section contains the main TMQL requirements in summarized form
for easy reference:
</p>

<ol>
<li>TMQL shall have a concise and human-readable syntax.</li>

<li>TMQL shall be defined in terms of an abstract data model for topic
maps.</li>

<li>TMQL query results shall be defined in terms of an abstract TMQL
data model and possibly also an environment (about which, see section
3.4).</li>

<li>TMQL shall be independent of any particular interface between
clients and the query processor.</li>

<li>TMQL shall support all natural languages equally well.</li>

<li>The TMQL standard shall be defined in two parts, first one with
querying only, then one adding updates.</li>

<li>TMQL shall not unduly constrain the form of implementations.</li>

<li>The TMQL standard shall be formal, fully define the results of
queries, and, in so far as possible, be human-readable.</li>

<li>TMQL shall be usable across a wide range of foreseeable platforms
and applications over an extended lifetime (20-50 years).</li>
	
</ol>

<h2>3. Requirements in detail</h2>

<h3>3.1. General</h3>

<p>
The following general requirements apply, in addition to those already
mentioned. 
</p>

<ol>
<li>TMQL queries shall be able to span multiple topic maps.</li>

<li>The TMQL standard should be defined based on a set of use cases
representing general classes of queries expected to be common.</li>

<li>The TMQL standard shall define error situations, and how TMQL
processors are required to react to them.</li>

<li>The TMQL language shall be extensible. TMQL shall define
controlled mechanisms for third-party extensions.</li>

<li>The TMQL standard shall contain a conformance clause, stating the
conditions under which TMQL implementations may claim to conform to
the standard.</li>

<li>The TMQL language may support the definition and use of logic
inferencing rules.</li>
</ol>

<h3>3.2. Syntax</h3>

<p>
The following requirements apply to the TMQL syntax, beyond those
stated above.
</p>

<ol>
<li>The syntax shall be defined in terms of a formal grammar.</li>

<li>The syntax should be designed so that queries expected to be
common be as easy to write as possible.</li>

<li>An XML syntax for TMQL queries may be defined.</li>
</ol>

<h3>3.3. Model and algebra</h3>

<p>
The following requirements apply to the formal underpinnings of the
TMQL standard, beyond those already stated.
</p>

<ol>
<li>TMQL shall not define its own data model, but be based on one
common to the entire family of topic map standards.</li>

<li>TMQL may extend the common data model in order to be able to
represent query results which are not topic maps, but merely sets and
lists of topic map objects, resources, and perhaps also primitive
values like strings and numbers.</li>

<li>The definition of TMQL should be based on an abstract query
algebra, which again should be based on the data model.</li>

<li>The TMQL language should support nesting of queries to form
sub-queries.</li>

<li>The TMQL language should support sorting query results by parts of
the query results.</li>

<li>The algebra may include operators such as: merge, comparison,
boolean logic operators, set operators, matching by scope
operators, cardinality/count, string matching operators, and
aggregation.</li>

<li>TMQL may support returning associations, topic names, and
occurrences that were not present in the queried topic map(s).</li>
</ol>

<h3>3.4 Self-containedness of queries</h3>

<p>
The following concepts relating to the self-containedness of queries
have been identified. They are described here in order to clarify the
list of requirements following the concepts. Please note that these
concepts, and how they may apply to TMQL as it will be defined is not
yet understood, and the descriptions themselves do not constitute
requirements.
</p>

<dl>
<dt>TMQL environment</dt>
<dd>This is the environment in which TMQL queries are evaluated.
It may contain things like ID-to-topic map-mappings, identifier to
variable/function/predicate/etc mappings, base URIs used to resolve
relative URIs, and so on.</dd>

<dt>Inter-query context</dt>
<dd>This is the execution context for TMQL queries, as modified by
previous queries. It is not clear what this context may contain.</dd>

<dt>Intra-query context</dt>
<dd>This is the execution context for a TMQL query, as modified or set
up by the query itself. It may contain identifier to value mappings, a
base URI for resolving relative URIs, specifications of nested
queries, specifications of local functions/predicates, and so on.</dd>
</dl>

<p>
The following requirements apply to the self-containedness of queries,
in addition to the requirements above this section.
</p>

<ol>
<li>The TMQL standard shall clearly define how it uses each of the
concepts above, and whether it uses any of them.</li>
<li>A TMQL query shall contain all the information necessary to
interpret it.</li>
<li>The TMQL standard should make use of a TMQL environment, and an
intra-query context to specify the interpretation of queries.</li>
<li>The TMQL standard may make use of the notion of an inter-query
context to specify how queries are interpreted.</li>
</ol>


<h3>3.5. Relationship to other standards</h3>

<p>
The TMQL standard is part of a larger family and community of
standards, and the following requirements apply to its integration in
this community.
</p>

<ol>
<li>TMQL shall be based on ISO 13250.</li>

<li>TMQL shall be based on the topic map data model currently being
defined. (Thus, TMQL will also support XTM.)</li>

<li>URIs used in TMQL queries shall be normalized in the manner
defined by the topic map data model.</li>

<li>If equality for topic map objects is not defined by the topic map
data model it must be defined by TMQL.</li>

<li>TMQL shall relate to the Topic Map Conceptual Model through the
topic map data model.</li>

<li>TMQL shall be harmonized with the Topic Map Constraint Language
currently being defined. It may be based on it.</li>

<li>The character set of TMQL shall be Unicode.</li>

<li>Ordering of strings in TMQL shall be based on externally-defined
specifications for internationalized string collation. Candidates are
<a href="http://www.unicode.org/unicode/reports/tr10/">the Unicode
Collation Algorithm</a>, and <a
href="http://anubis.dkuug.dk/jtc1/sc22/open/n2933.pdf">ISO
14651</a></li>

<li>The syntax of URIs within TMQL queries shall be governed by the
rules of <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC
2396</a>.</li>
</ol>

<h3>3.6. Specific query capabilities</h3>

<p>
This section lists some general classes of queries which TMQL may
support. The queries are only informally defined since there currently
is no data model to define them in terms of. This list has not been
tested for completeness.
</p>

<h4>3.6.1. Queries returning topics</h4>

<ol>
<li>Find all topics with specific names whose scopes match a specific
scope.</li>

<li>Find all topics with specific resources as occurrences whose
scopes match a specific scope.</li>

<li>Find all topics playing one of a set of roles in an association of
one of a set of types whose scopes match a specific scope.</li>

<li>Find all topics playing one of a set of roles in an association of
one of a set of types, where one of a set of topics plays one of a set
of roles, whose scopes match a specific scope.</li>

<li>Find the topic that has a specific resource as one of its subject
indicators.</li>

<li>Find the topic that has a specific resource as its subject
address.</li>

<li>Find all topics that play one of a set of roles in instances of
one of a set of association types.</li>
</ol>

<h4>3.6.2. Queries returning associations</h4>

<ol>
<li>Find all associations whose scopes match a specific scope.</li>

<li>Find all associations that are instances of a specific type.</li>

<li>Find all associations where one of a set of topics play any role,
and whose scopes match a specific scope.</li>

<li>Find all associations where one of a set of topics play one of a
set of roles, and whose scopes match a specific scope.</li>
</ol>

<h4>3.6.3. Queries returning any topic map object</h4>

<ol>
<li>Find the object that has a specific resource as its source
locator.</li>

<li>Find all objects that are direct instances of a specific
type.</li>

<li>Find all objects that are instances of a specific type or any of
its subtypes.</li>
</ol>

<h4>3.6.4. Queries returning various types of objects</h4>

<ol>
<li>Find all the names of the topics in a particular set of topics,
whose scopes match a particular scope.</li>

<li>Find all the occurrences of the topics in a particular set of
topics, whose scopes match a particular scope.</li>

<li>Find all the occurrences of any of a particular set of types of
the topics in a particular set of topics, whose scopes match a
particular scope.</li>

<li>Find all the resources that are subject indicators of the topics
in a particular set of topics.</li>

<li>Find the resources that are the addressable subjects of the topics
in a particular set of topics.</li>
</ol>
    
<H2>4. Non-Requirements</H2>

<P>Requirements listed in this section are for various reasons not in
the scope of TMQL.</P>

<OL>
  <LI>The TMQL standard shall not include an API to query processors in
    parts 1 or 2 of the standard. One may be defined in later parts.</LI>
  <LI>The TMQL standard shall not define mechanisms for specifying validity
    constraints on topic maps. It may be used by other specifications and
    software to define such constraints.</LI>
  <LI>The TMQL standard shall not define a natural language query
    interface.</LI>
</OL>

<h2>5. Acknowledgements</h2>

<p>
This document is based on input from 
</p>

<ul>
<li>many <a href="http://www.topicmaps.org">TopicMaps.Org</a>
meetings,</li> <li>many <a
href="http://www.ornl.gov/sgml/sc34/sc34home.htm">ISO SC34</a>
meetings,</li> <li>the <a
href="http://www.infoloom.com/mailman/listinfo/topicmapmail">topicmapmail</a>
and <a href="http://groups.yahoo.com/group/xtm-wg">xtm-wg</a>, and <a
href="http://groups.yahoo.com/group/tmql-wg">tmql-wg</a> mailing
lists, and</li>
<li>it is also based on work done by a former editor, Ann
Wrightson.</li>
</ul>

<h2>6. Revision history</h2>

<p>
Changes from version 0.8.2 to version 0.9:
</p>

<ul>
<li>Section 3.4 was added.
<li>Sub-section numbers were added.
<li>Prose of introductory paragraphs slightly improved.
<li>Requirements 2:3, 2:6, 2:8, 2:9, 3.1:3, 3.1:4, 3.2:2, and 3.3:6
    were modified.
<li>Requirements 3.1:5, 3.1:6, 3.3:4, 3.3:5, 3.5:9, and 3.6.4:3 were added.
<li>Revision history was added.
</ul>

</body>
</html>