Chapter 22

Inheritance in SQL

The hardest thing of all is to find a black cat in a dark room, especially if there is no cat.

—Confucius (551-479 BCE)

This chapter is based in part on material from (a) Chapters 5 and 20 of my book An Introduction to Database Systems (8th edition, Addison-Wesley, 2004) and (b) Appendix H of the Manifesto book. However, all of that material is revised here, usually extensively, and there’s a great deal of new material as well.

This chapter presents an overview of SQL’s type support, including of course its support for type inheritance in particular. I’d like to stress that word overview, however; the treatment is very far from exhaustive—many details are simplified, and some features are omitted altogether. But I hope there’s enough here to give you some idea of the extent of SQL’s support in this area and also, perhaps, to give you some idea of what might be missing. Note: As noted in the preface, all references to SQL in this book, and hence in this chapter in particular, should be understood as referring to the SQL standard specifically. The reference document is:1

International Organization for Standardization (ISO): Database Language SQL, Document ISO/IEC 9075:2008 (2011)

In this connection, you might find the following book helpful (it’s a complete tutorial reference and guide to the SQL standard as of 1997):

C. J. Date (with Hugh Darwen): A Guide to the SQL Standard (4th edition, Addison-Wesley, 1997)

Although this book is now fairly old as ...

Get Type Inheritance and Relational Theory now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.