Temporal
Querying
The initial implementation of the query processor involved making a number of design decisions. The first consideration was deciding on whether to use or extend XPath or XQuery. These are query languages that query from XML documents. The second consideration was whether to develop a new temporal query language instead of using existing query languages. The decision to use XQuery for XML document querying was based on the following reasoning:
-
Although XPath is a powerful W3C specification used to query from XML documents, it does not allow typical query constraints such as ‘WHERE’ and ‘ORDER-BY’ operators.
-
The algorithms used for the evaluation of temporal queries made it possible to use XQuery statements to extract the nodes of an XML document; therefore it was not necessary to design a new temporal query language or to extend XPath or XQuery.
For the query component, the temporal middleware approach has been taken. The query processor constitutes a middle-layer that ‘sits’ on top of the relational DBMS that stores the XML files, this is the stratum approach. The front-end to the query processor is a graphical user interface that validates user input, formulates temporal queries from the input parameters and requests the relevant versions from the database based on the parameters.
This middleware approach requires that the query processor partitions the query into two parts: a database SQL query part and an XQuery part. Based on the front-end query parameters, the query layer formulates SQL statements to be sent to the database for XML file retrieval and XQuery statements which will be performed on the retrieved XML version(s).