N. Bassiliades, I. Vlahavas, D. Sampson, “Using Logic for Querying XML Data”, Web Powered Databases, D. Taniar and W. Rahayu (Eds.), IDEA Group Publishing, Ch. 1, pp. 1-35, 2003.
In this chapter, we propose the use of first-order logic, in the form of deductive database rules, as a query language for XML data and we present X-DEVICE, an extension of the deductive object-oriented database system DEVICE for storing and querying XML data. XML documents are stored into the OODB by automatically mapping the DTD to an object schema. XML elements are treated either as classes or attributes based on their complexity, without loosing the relative order of elements in the original document. Furthermore, this chapter describes the extension of the system’s deductive rule query language with second-order variables, general path and ordering expressions, for querying over the stored, tree-structured XML data and constructing XML documents as a result. The extensions were implemented by translating all the extended features into the basic, first-order deductive rule language of DEVICE using meta-data about stored XML objects.