View Updating and Relational Theory

Book description

Views are virtual tables. That means they should be updatable, just as "real" or base tables are. In fact, view updatability isn’t just desirable, it’s crucial, for practical reasons as well as theoretical ones. But view updating has always been a controversial topic. Ever since the relational model first appeared, there has been widespread skepticism as to whether (in general) view updating is even possible.

In stark contrast to this conventional wisdom, this book shows how views, just like base tables, can always be updated (so long as the updates don’t violate any integrity constraints). More generally, it shows how updating always ought to work, regardless of whether the target is a base table or a view. The proposed scheme is 100% consistent with the relational model, but rather different from the way updating works in SQL products today.

This book can:

  • Help database products improve in the future
  • Help with a "roll your own" implementation, absent such product improvements
  • Make you aware of the crucial role of predicates and constraints
  • Show you how relational products are really supposed to behave

Anyone with a professional interest in the relational model, relational technology, or database systems in general can benefit from this book.

Publisher resources

View/Submit Errata

Table of contents

  1. Dedication
  2. preface
  3. About the Author
  4. Preface
    1. Who Should Read This Book
    2. Structure of the Book
    3. Technical Notes
    4. Acknowledgments
  5. Foreword
  6. 1. A Motivating Example
    1. The Principle of Interchangeability
    2. Base Tables Only: Constraints
    3. Base Tables Only: Compensatory Actions
    4. Views: Constraints and Compensatory Actions
    5. There’s No Magic
    6. Concluding Remarks
  7. 2. The Technical Context
    1. Relations and Relvars
      1. Base Relvar Definitions
    2. Relational Assignment
      1. A Note on Syntax
      2. Multiple Assignment
      3. Semantics Not Syntax
    3. Integrity Constraints
      1. Updating Is Set At a Time
      2. Two Important Principles
    4. Relvar Predicates
    5. Matching, not Matching, and Extend
    6. Databases and Dbvars
      1. A dbvar is a tuple variable.
  8. 3. The View Concept: A Closer Look
    1. The View Update Problem
      1. The View Update Problem
    2. Views are Pseudovariables
    3. Data Independence
      1. Views Serve a Variety of Purposes
      2. A Psychological Mistake?
    4. How Not to do it
    5. Constraints and Predicates
      1. Multivariable Constraints
    6. Information Equivalence
    7. Concluding Remarks
  9. 4. Restriction Views
    1. The Motivating Example Revisited
    2. More on Compensatory Actions
    3. What About Triggers?
    4. What About Explicit Update Operations?
    5. Suppliers and Shipments
    6. The Motivating Example Continued
      1. Information Hiding
    7. Putting it All Together
    8. The Point at Last
    9. Overlapping Restrictions
    10. Concluding Remarks
  10. 5. Projection Views
    1. Example 1: A Nonloss Decomposition
    2. Example 1 Continued: The Projection Relvars
      1. Information Hiding
    3. Example 1 Continued: Views
    4. Example 2: Another Nonloss Decomposition
      1. The Projection Relvars
      2. Information Hiding
      3. Views
    5. Example 3: A Lossy Decomposition
      1. The Projection Relvars
      2. Information Hiding
      3. Views
    6. Concluding Remarks
  11. 6. Join Views I: One to One Joins
    1. Example 1: Information Equivalence
    2. Example 2: Information Hiding
      1. Pragma
      2. Symmetry
    3. Concluding Remarks
  12. 7. Join Views II: Many to Many Joins
    1. Example 1: Information Equivalence
      1. Compensatory Actions
      2. View Updating
    2. Projection Views Revisited
    3. Example 2: Information Hiding
    4. Concluding Remarks
  13. 8. Join Views III: One to Many Joins
    1. Example 1: Information Equivalence
    2. Example 2: Information Hiding
    3. Concluding Remarks
  14. 9. Intersection Views
    1. Example 1: Explicit Overlap
    2. Example 2: Implicit Overlap
      1. A Better Design
      2. Another Possible Design
    3. Concluding Remarks
  15. 10. Union Views
    1. Example 1: Disjoint Union
    2. Example 2: Explicit Overlap
    3. Example 3: Implicit Overlap
      1. A Better Design
      2. A Remark on Disjoint Union
    4. Concluding Remarks
  16. 11. Difference Views
    1. Example 1: Implicit Overlap
      1. A Better Design
      2. A Remark on Included Difference
    2. Example 2: Explicit Overlap
    3. Concluding Remarks
  17. 12. Group and Ungroup Views
    1. The Group and Ungroup Operators
    2. A Group / Ungroup Example
    3. A Summarize Example
  18. 13. Extension and Summarization Views
    1. An Extend Example
      1. Relation Constants
    2. Another Summarize Example
  19. 14. Updating through Expressions
    1. Semantics not Syntax (?)
    2. Some well known Tautologies
    3. “Semantic Transformations”
    4. Information Equivalence Revisited
    5. Concluding Remarks
  20. 15. Ambiguity Revisited
    1. Predicates and Constraints Revisited
    2. An Intersection Example
    3. Union and Difference Examples
      1. Union
      2. Difference
    4. More on Predicates
    5. Concluding Remarks
  21. A. Some Remarks on Relational Assignment
  22. B. Relational Operators
  23. Index
  24. About the Author
  25. Copyright

Product information

  • Title: View Updating and Relational Theory
  • Author(s): C.J. Date
  • Release date: December 2012
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449357849