All Classes in one Table

This model uses one table (namely the table of the superclass) for the super- and the subclasses. The model is called "Flat Inheritance Model", the JDO 2.0 specification also calls it "superclass-table" model.

If the project have very similar objects, the flat table approach might be more useful than storing each class to an separate table.

The following diagram shows a sample for the relationships between classes and tables in this case:

Figure: Superclass-table model

images/userguide_en/inheritance_flat.gif

Simply map all attributes to one source table. In this mapping type, its mandatory, to define an inheritance provider and providing all subclasses (see above)!