Book contents
- Frontmatter
- Contents
- Acknowledgments
- 1 Introduction
- 2 Classes of update semantics
- 3 Model-based semantics for updates
- 4 Update algorithms for model-based semantics
- 5 Updates with variables
- 6 Lazy evaluation of updates
- 7 Integrity constraints
- 8 Adding knowledge to relational theories
- 9 Implementation
- Bibliography
- Index of definitions
7 - Integrity constraints
Published online by Cambridge University Press: 22 March 2010
- Frontmatter
- Contents
- Acknowledgments
- 1 Introduction
- 2 Classes of update semantics
- 3 Model-based semantics for updates
- 4 Update algorithms for model-based semantics
- 5 Updates with variables
- 6 Lazy evaluation of updates
- 7 Integrity constraints
- 8 Adding knowledge to relational theories
- 9 Implementation
- Bibliography
- Index of definitions
Summary
Would martyrs have sung in the flames for a mere inference, however inevitable it might be?
—William James, The Varieties of Religious ExperienceDatabase management systems usually offer a means of expressing simple pieces of information that are best thought of as knowledge rather than data. For example, the information that an employee can belong to only one department is modeled in the database world by an integrity constraint called a functional dependency. These integrity constraints can be examined at update time to ensure that a requested update will not produce a nonsensical database state in which, for example, an employee is listed as a member of two different departments.
How might relational theories be extended to handle integrity constraints? Suppose we are given a set of integrity constraints and a relational theory containing incomplete information, such that the integrity constraints are not logically entailed by the database. Then naturally the relational theory's query processor must consider these integrity constraints when forming answers to queries, as otherwise queries may be answered imprecisely or, under some semantics for queries, incorrectly. For example, suppose that the theory contains the formula Emp(Nilsson, EE) ∨ Emp(Nilsson, CS). If asked whether Nilsson might possibly be in both CS and EE, the answer is “yes,” if no integrity constraints are present, and “no,” if we have the constraint that each employee can be in only one department.
What is less obvious is that queries may not be answered correctly unless the relational theory's update processor also explicitly considers the integrity constraints while performing updates.
- Type
- Chapter
- Information
- Updating Logical Databases , pp. 141 - 158Publisher: Cambridge University PressPrint publication year: 1990