Book description
Type inheritance is that phenomenon according to which we can say, for example, that every square is also a rectangle, and so properties that apply to rectangles in general apply to squares in particular. In other words, squares are a subtype of rectangles, and rectangles are a supertype of squares. Recognizing and acting upon such subtype / supertype relationships provides numerous benefits: Certainly it can help in data modeling, and it can also provide for code reuse in applications. For these reasons, many languages, including the standard database language SQL, have long supported such relationships. However, there doesn’t seem to be any consensus in the community at large on a formal, rigorous, and abstract model of inheritance. This book proposes such a model, one that enjoys several advantages over other approaches, not the least of which it is that it’s fully compatible with the well known relational model of data.
Topics the model covers include:
- Both single and multiple inheritance
- Scalar, tuple, and relation inheritance
- Type lattices and union and intersection types
- Polymorphism and substitutability
- Compile time and run time binding
All of these topics are described in detail in the book, with numerous illustrative examples, exercises, and answers. The book also discusses several alternative approaches. In particular, it includes a detailed discussion and analysis of inheritance as supported in the SQL standard.
Publisher resources
Table of contents
- Cover Page
- Title Page
- Copyright Page
- About the Author
- Contents
- Preface
- Foreword
- Part I: Preliminaries
-
Part II: Scalar Types, Single Inheritance
-
Chapter 5: Basic Definitions
- IM Prescription 1: Types are sets
- IM Prescription 2: Subtypes are subsets
- IM Prescription 3: “Subtype of” is reflexive
- IM Prescription 4: “Subtype of” is transitive
- IM Prescription 5: Proper and immediate subtypes and supertypes
- IM Prescription 6: Scalar root and leaf types
- IM Prescription 7: Disjoint and overlapping types
- Exercises
- Answers
- Chapter 6: Scalar Values with Inheritance
- Chapter 7: Scalar Variables with Inheritance
- Chapter 8: Specialization by Constraint etc.
- Chapter 9: Equality Comparisons etc.
- Chapter 10: Treating and Type Testing
- Chapter 11: Substitutability
- Chapter 12: Union and Dummy Types
- Chapter 13: Interlude: The S by C Controversy
-
Chapter 5: Basic Definitions
- Part III: Scalar Types, Multiple Inheritance
- Part IV: Tuple and Relation Inheritance
- Part V: Other Approaches
- Appendixes
-
Footnotes
- Preface
- Chapter 1: Background
- Chapter 2: Types without Inheritance
- Chapter 3: Types with Inheritance
- Chapter 5: Basic Definitions
- Chapter 6: Scalar Values with Inheritance
- Chapter 7: Scalar Variables with Inheritance
- Chapter 8: Specialization by Constraint etc.
- Chapter 9: Equality Comparisons etc.
- Chapter 10: Treating and Type Testing
- Chapter 11: Substitutability
- Chapter 12: Union and Dummy Types
- Chapter 13: Interlude: The S by C Controversy
- Chapter 14: An Overviewof Multiple Inheritance
- Chapter 15: IM Prescriptions 8–9 Revisited
- Chapter 16: IM Prescriptions 10–20 Revisited
- Chapter 17: Tuple/Relation Values with Inheritance
- Chapter 18: Tuple / Relation Valueswith Inheritance (cont.)
- Chapter 19: Tuple / Relation Maximaland Minimal Typesetc.
- Chapter 20: Tuple / Relation Variables with Inheritance
- Chapter 21: Structural Inheritance
- Chapter 22: Inheritance in SQL
- Appendix A: Encapsulation Isa Red Herring
- Appendix B: Persistence Not Orthogonal to Type
- Index
- Type Inheritance and Relational Theory
Product information
- Title: Type Inheritance and Relational Theory
- Author(s):
- Release date: September 2016
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491959992
You might also like
video
Type Inheritance and Relational Theory
The basic ideas of type inheritance—and the languages and products supporting those ideas—have been around for …
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …
article
Splitting Strings on Any of Multiple Delimiters
Build your knowledge of Python with this Shortcuts collection. Focusing on common problems involving text manipulation, …
article
Run Llama-2 Models
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …