To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
The ultimate goal of data exchange is to answer queries over the target data in a way consistent with the source data. In this chapter we focus on queries that return sets of tuples of data values. The reason for this restriction is twofold:
• first, for such queries the notion of certain answers is easy to define; and
• second, already for these queries we shall be able to identify features that need to be ruled out in order to ensure tractability of query answering.
We deal with a query language based on tree patterns, as it forms a natural analog of (unions of) conjunctive queries. We show that the problem of finding certain answers is in CONP, just like for conjunctive queries in the relational case. We then identify several features specific to XML, such as disjunction in DTDs or the horizontal order, that make the query answering problem intractable. Finally, we give a polynomial query answering algorithm that computes certain answers for unions of conjunctive queries that only use vertical navigation, restricted to schema mappings with nested-relational DTDs.
The query answering problem
Just like in the relational case, we study conjunctive queries and their unions. As we have learned, it is convenient to work with tree patterns, which have very similar expressivity to conjunctive queries. Thus, for querying XML documents we use the same language as for the dependencies: tree patterns with equalities and inequalities, to capture the analog of relational conjunctive queries (with inequalities).
XML schema mappings are expressed in terms of tree patterns, a simple query language for XML trees that plays the role analogous to that of conjunctive queries for relational databases. In this chapter we define the syntax and semantics of tree patterns, introduce a classification based on the features they use, and determine the complexity of basic computational problems. Then we do the same for XML schema mappings.
Tree patterns: classification and complexity
In XML trees information can be represented by means of data values, as well as the structure of the tree. Let us return to the example shown in Figure 10.1. The edge between the node storing Scotland and the node storing Mary I represents the fact that Mary I ruled Scotland. The value Charles I appearing twice informs us that Charles I ruled both Scotland and England. The node storing Mary I coming directly after the node storing James V corresponds to the fact that Mary I succeeded James V on the throne of Scotland. This already suggests the querying features needed to extract information from XML trees: child, next sibling, and their transitive closures: descendant, following sibling. We call these four features axes. It is also necessary to compare data values stored in different nodes.
In the light of PART TWO, a natural query language for XML trees is the family of conjunctive queries over XML trees viewed as databases over two sorts of objects: tree nodes, and data values. Relations in such representations include child, next sibling, and relations associating attribute values with nodes.
So far, our default semantics for answering queries in data exchange was the certain answers semantics. But is it always right to use it? After all, we have seen that even in the simplest possible, copying mappings, that essentially say “copy the source to the target”, some relational algebra queries cannot be answered (see Proposition 7.16 in Section 7.6). This is rather counter-intuitive behavior: one should expect that, in a copying mapping, relations simply change name but not content, and queries should be answerable over a copy of the source.
The standard certain answers semantics presents us with a host of problems:
• some queries are not rewritable even under the simplest mappings;
• computing answers to relational algebra queries is in general an undecidable problem; and
• computing certain answers could be intractable even for very simple and practically relevant classes of queries (e.g., conjunctive queries with inequalities, or SQL queries admitting inequalities in the where clause, as shown in Theorem 7.4).
Should we always follow the certain answers semantics? Is it really sacred in data exchange? Or perhaps we can find an alternative data exchange semantics that avoids the problems we listed above?
In a way, there is no fully satisfactory answer to these questions. Every semantics one presents is going to work well in some scenarios, and exhibit problems in others, and thus the choice of the semantics depends on the precise interpretation of what the mapping rules actually mean. But alternative semantics have been proposed, and we present several here that attempt to solve the problems above.
Classical computable model theory is most naturally concerned with countable domains. There are, however, several methods – some old, some new – that have extended its basic concepts to uncountable structures. Unlike in the classical case, however, no single dominant approach has emerged, and different methods reveal different aspects of the computable content of uncountable mathematics. This book contains introductions to eight major approaches to computable uncountable mathematics: descriptive set theory; infinite time Turing machines; Blum-Shub-Smale computability; Sigma-definability; computability theory on admissible ordinals; E-recursion theory; local computability; and uncountable reverse mathematics. This book provides an authoritative and multifaceted introduction to this exciting new area of research that is still in its early stages. It is ideal as both an introductory text for graduate and advanced undergraduate students and a source of interesting new approaches for researchers in computability theory and related areas.
Not all the systems mentioned in this book have been shown to be complete, only the ones for which a method has been described for converting trees into proofs. In this section, a more powerful strategy for showing completeness will be presented that applies to a wider range of propositional modal logics. It is a version of the so-called Henkin or canonical model technique, which is widely used in logic. This method is more abstract than the method of Chapter 8, and it is harder to adapt to systems that include quantifiers and identity, but a serious student of modal logic should become familiar with it. The fundamental idea on which the method is based is the notion of a maximally consistent set. Maximally consistent sets play the role of possible worlds. They completely describe the facts of a world by including either A or ~A (but never both) for each sentence A in the language.
The Lindenbaum Lemma
A crucial step in demonstrating completeness with such maximally consistent sets is to prove the famous Lindenbaum Lemma. To develop that result, some concepts and notation need to be introduced. When M is a (possibly) infinite set of sentences, ‘M, A’ indicates the result of adding A to the set M, and ‘M ⊢S C’ indicates that there is a finite list H formed from some of the members of M, such that H ⊢S C. Set M′ is an extension of M, provided that every member of M is a member of M′. We say that set M is consistent in S iff M ⊬S ⊥. M is maximal iff for every sentence A, either A or ~A is in M. M is maximally consistent for S (or mc for short) iff M is both maximal and consistent in S. When it is clear from the context what system is at issue, or if the results being discussed are general with respect to S, the subscript ‘S’ on ‘⊢’ will be dropped, and we will use ‘consistent’ in place of ‘consistent for S’. It should be remembered, however, that what counts as an mc set depends on the system S. We are now ready to state the Lindenbaum Lemma.
Lindenbaum Lemma. Every consistent set has an mc extension.
The completeness of quantified modal logics can be shown with the tree method by modifying the strategy used in propositional modal logic. Section 8.4 explains how to use trees to demonstrate the completeness of propositional modal logics S that result from adding one or more of the following axioms to K: (D), (M), (4), (B), (5), (CD). In this chapter, the tree method will be extended to quantified modal logics based on the same propositional modal logics. The reader may want to review Sections 8.3 and 8.4 now, since details there will be central to this discussion. The fundamental idea is to show that every S-valid argument is provable in S in two stages. Assuming that H / C is S-valid, use the Tree Model Theorem (of Section 8.3) to prove that the S-tree for H / C closes. Then use the method for converting closed S-trees into proofs to construct a proof in S of H / C from the closed S-tree. This will show that any S-valid argument has a proof in S, which is, of course, what the completeness of S amounts to.
The Quantified Tree Model Theorem
In order to demonstrate completeness for quantified modal logics, a quantified version of the Tree Model Theorem will be developed here. This will also be useful in showing the correctness of trees for the quantified systems. Proofs of the appropriate tree model theorems are complicated by the fact that there are so many different systems to be considered in quantified modal logic. Several different interpretations of the quantifiers have been developed. However, the transfer theorems proven in Sections 15.7 and 15.8 show how results for all these systems can be obtained from a proof of completeness for truth value models (tS-models). So a demonstration of the Tree Model Theorem will be given for tS-validity.
The main purpose of this book is to help bridge a gap in the landscape of modal logic. A great deal is known about modal systems based on propositional logic. However, these logics do not have the expressive resources to handle the structure of most philosophical argumentation. If modal logics are to be useful to philosophy, it is crucial that they include quantifiers and identity. The problem is that quantified modal logic is not as well developed, and it is difficult for the student of philosophy who may lack mathematical training to develop mastery of what is known. Philosophical worries about whether quantification is coherent or advisable in certain modal settings partly explain this lack of attention. If one takes such objections seriously, they exert pressure on the logician to either eliminate modality altogether or eliminate the allegedly undesirable forms of quantification.
Even if one lays those philosophical worries aside, serious technical problems must still be faced. There is a rich menu of choices for formulating the semantics of quantified modal languages, and the completeness problem for some of these systems is difficult or unresolved. The philosophy of this book is that this variety is to be explored rather than shunned. We hope to demonstrate that modal logic with quantifiers can be simplified so that it is manageable, even teachable. Some of the simplifications depend on the foundations – in the way the systems for propositional modal logic are developed. Some ideas that were designed to make life easier when quantifiers are introduced are also genuinely helpful even for those who will study only the propositional systems. So this book can serve a dual purpose. It is, I hope, a simple and accessible introduction to propositional modal logic for students who have had a first course in formal logic (preferably one that covers natural deduction rules and truth trees). I hope, however, that students who had planned to use this book to learn only propositional modal logic will be inspired to move on to study quantification as well.