[Cache from http://groups.yahoo.com/group/tmql-wg/files/official-docs/tmqlreqs.html; please use this canonical URL/source if possible.]


TMQL requirements (0.8.2)

Editors: Hans Holger Rath, empolis GmbH
Lars Marius Garshol, Ontopia
Version: 0.8.2
Last changed: 2001-06-12, LMG

Introduction

This document sets down the requirements that will guide the work with the Topic Map Query Language (TMQL), a query language for topic maps. The requirements herein presented document the intentions of the standards editors, as informed by the user community. Its purpose 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.

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.

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

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

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

Feedback on this requirements document is requested.

Requirements in brief

This section contains the main TMQL requirements in summarized form for easy reference.

  1. TMQL shall have a concise and human-readable syntax.
  2. TMQL shall be defined in terms of an abstract data model for topic maps.
  3. TMQL query results shall be defined in terms of an abstract TMQL data model.
  4. TMQL shall be independent of any particular interface between clients and the query processor.
  5. TMQL shall support all natural languages equally well.
  6. The TMQL standard shall be defined in two parts, first one with querying only, then one adding updates, provided ISO regulations allow.
  7. TMQL shall not unduly constrain the form of implementations.
  8. The TMQL standard shall be formal, fully define the processing of queries, and, in so far as possible, be human-readable.
  9. TMQL shall be usable across a wide range of foreseeable platforms over an extended lifetime (20-50 years).

Requirements in detail

General

The following general requirements apply, in addition to those already mentioned.

  1. TMQL queries shall be able to span multiple topic maps.
  2. The TMQL standard should be defined based on a set of use cases representing general classes of queries expected to be common.
  3. The TMQL standard shall define error situations, and how TMQL processors should react to them.
  4. The TMQL language should be extensible. If it is extensible it shall define controlled mechanisms for third-party extensions.

Syntax

The following requirements apply to the TMQL syntax, beyond those stated above.

  1. The syntax shall be defined in terms of a formal grammar.
  2. The syntax should be designed so that queries expected to be common be as compact as possible.
  3. An XML syntax for TMQL queries may be defined.

Model and algebra

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

  1. TMQL shall not define its own data model, but be based on one common to the entire family of topic map standards.
  2. 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.
  3. The definition of TMQL should be based on an abstract query algebra, which again should be based on the data model.
  4. The algebra may include operators such as: merge, comparison, sort, boolean logic operators, set operators, matching by scope operators, cardinality/count, and aggregation.
  5. TMQL may support returning associations, topic names, and occurrences that were not present in the queried topic map(s).

Relationship to other standards

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

  1. TMQL shall be based on ISO 13250.
  2. TMQL shall be based on the topic map data model currently being defined. (Thus, TMQL will also support XTM.)
  3. URIs used in TMQL queries shall be normalized in the manner defined by the topic map data model.
  4. If equality for topic map objects is not defined by the topic map data model it must be defined by TMQL.
  5. TMQL shall relate to the Topic Map Conceptual Model through the topic map data model.
  6. TMQL shall be harmonized with the Topic Map Constraint Language currently being defined. It may be based on it.
  7. The character set of TMQL shall be Unicode.
  8. Ordering of strings in TMQL shall be based on externally-defined specifications for internationalized string collation. Candidates are the Unicode Collation Algorithm, and ISO 14651

Specific query capabilities

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.

Queries returning topics

  1. Find all topics with specific names whose scopes match a specific scope.
  2. Find all topics with specific resources as occurrences whose scopes match a specific scope.
  3. 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.
  4. 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.
  5. Find the topic that has a specific resource as one of its subject indicators.
  6. Find the topic that has a specific resource as its subject address.
  7. Find all topics that play one of a set of roles in instances of one of a set of association types.

Queries returning associations

  1. Find all associations whose scopes match a specific scope.
  2. Find all associations that are instances of a specific type.
  3. Find all associations where one of a set of topics play any role, and whose scopes match a specific scope.
  4. Find all associations where one of a set of topics play one of a set of roles, and whose scopes match a specific scope.

Queries returning any topic map object

  1. Find the object that has a specific resource as its source locator.
  2. Find all objects that are direct instances of a specific type.
  3. Find all objects that are instances of a specific type or any of its subtypes.

Queries returning various types of objects

  1. Find all the names of the topics in a particular set of topics, whose scopes match a particular scope.
  2. Find all the occurrences of the topics in a particular set of topics, whose scopes match a particular scope.
  3. Find all the resources that are subject indicators of the topics in a particular set of topics.
  4. Find the resources that are the addressable subjects of the topics in a particular set of topics.

Non-Requirements

Requirements listed in this section are for various reasons not in the scope of TMQL.

  1. 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.
  2. 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.
  3. The TMQL standard shall not define a natural language query interface.

Acknowledgements

This document is based on input from