How to do Inheritance Modeling in Relational Databases? How to do Inheritance Modeling in Relational Databases? database database

How to do Inheritance Modeling in Relational Databases?


Martin Fowler discusses this extensively in his book Patterns of Enterprise Application Architecture book. Get this book and look into:

  1. Single Table Inheritance

Blockquote

  1. Class Table Inheritance

enter image description here

  1. Concrete Table Inheritance

Blockquote

The Website should give you some idea. You might also want to read the section on inheritance mappers. Each of the different approaches have their pros and cons so choose wisely.


If you just want to look at some web articles instead of reading a book, you can find some good articles by Googling on:

Generalization Specialization Relational Modeling

The gen-spec pattern covers a lot of the same ground that inheritance does in OOP environments.

If you google on

Generalization Specialization Object Modeling

you'll get a whole new batch of articles, most of which mention inheritance explicitly.

There is a design technique that's summarized in the following tag under the info tag. This allows you to use subclass tables to "extend" a class table, if you'll allow a strange use of the word "extend". There's some work involved, but it's worth it.