October 2006
Intermediate to advanced
880 pages
22h 11m
English
A simple strategy for mapping classes to database tables might be "one table for every entity persistent class." This approach sounds simple enough and, indeed, works well until we encounter inheritance.
Inheritance is such a visible structural mismatch between the object-oriented and relational worlds because object-oriented systems model both is a and has a relationships. SQL-based models provide only has a relationships between entities; SQL database management systems don't support type inheritance—and even when it's available, it's usually proprietary or incomplete.
There are four different approaches to representing an inheritance hierarchy:
Table per concrete class with implicit polymorphism—Use no explicit ...