SQL4X: A flexible query language for XML and relational databases

Sara Cohen, Yaron Kanza, Yehoshua Sagiv

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Scopus citations


SQL4X, a powerful language for simultaneously querying both relational and XML databases is presented. Using SQL4X, one can create both relations and XML documents as query results. Thus, SQL4X can be thought of as an integration language. In order to allow easy integration of XML documents with varied structures, SQL4X uses flexible semantics when querying XML. SQL4X is also a powerful query language. It can express quantification, negation, aggregation, grouping and path expressions. Datalog4x and Tree-Datalog4x, extensions of Datalog, are defined as elegant abstract models for SQL4X queries. Query containment is characterized for many common classes of SQL4X queries. Specifically, for Datalog4x queries, a complete characterization of containment of conjunctive queries and of unions of queries is presented. Equivalence of Datalog4x queries under bag-set semantics is also characterized. A sufficient condition for containment of Tree-Datalog4x queries is presented. This condition is shown to be complete for a large class of common queries.

Original languageAmerican English
Title of host publicationDatabase Programming Languages - 8th International Workshop, DBPL 2001, Revised Papers
EditorsGiorgio Ghelli, Gosta Grahne
PublisherSpringer Verlag
Number of pages18
ISBN (Print)9783540440802
StatePublished - 2002
Event8th International Workshop on Database Programming Languages, DBPL 2001 - Frascati, Italy
Duration: 8 Sep 200110 Sep 2001

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference8th International Workshop on Database Programming Languages, DBPL 2001

Bibliographical note

Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 2002.


Dive into the research topics of 'SQL4X: A flexible query language for XML and relational databases'. Together they form a unique fingerprint.

Cite this