When you have inheritance hierarchies in your object model, they should be correctly modeled. We present below the three possible ways to map an inheritance hierarchy to the relational world, then we'll see how to model these so that they can be taken into account by the framework.
There are three typical ways to model an inheritance hierarchy into an RDBMS schema-we do not take into account special RDBMS functionalities, just raw relational/SQL possibilities. Among these three, only one, Horizontal Mapping, is supported by the framework so far.
A more complete discussion, along with figures and examples, can be found at http://www.objectmatter.com/,
A2
and table A1
)
which stores the instance data. This configuration does not put any
information about the inheritance schema into the relational database, rather
it lets the runtime do the job and take the inheritance into account.
1
stored in
the table's column 'TYPE'
, while instances of class A2 will map
to rows whose type is 2
.
ZModelizationTool
or directly in an xml-model and used by the
framework's core, is not a model per se but rather a mapping of an
object model to a relational model. As a consequence, you should not be
surprised that, whatever mapping you choose to model a specific inheritance
hierarchy, each entity and all sub-entities must define and describe all
entity attributes and relationships-inherited or not.