Chapter 2
Types without Inheritance
[Types make] program development and debugging easier by making program behavior more understandable.
—Andrew Wright:“On Sapphire and Type-Safe Languages” (CACM 46, No. 4, April 2003)
The overall purpose of this book is, of course, to explain the Manifesto model of type inheritance. The present chapter—the longest in the book, unfortunately—lays some necessary groundwork by describing the Manifesto theory of types as such (by which I mean types without inheritance). It’s based in part on material from (a) Chapter 2 of my book SQL and Relational Theory: How to Write Accurate SQL Code (3rd edition, O’Reilly, 2015) and (b) Chapter 5 of my book An Introduction to Database Systems (8th edition, Addison-Wesley, 2004); if you’re already familiar with either of those references, therefore, you might be able to skip it. But you should probably at least skim it, if only to get some broad sense of what it covers.
Data types, or just types for short, are fundamental to computer science. As noted in Chapter 1, relational theory in particular requires a supporting type theory, because relations are defined over types—that is, every attribute of every relation is of some type (and so is every attribute of every relvar, of course). For example, with reference to the suppliers-and-parts database from Chapter 1 (see Fig. 1.1 for some sample values), the Tutorial D definition for the suppliers relvar S in that chapter shows attribute STATUS of that relvar as being ...
Get Type Inheritance and Relational Theory now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.