A developer has created a deep entity class hierarchy with many polymorphic relationships between entitles. Which inheritance strategy, as defined by the inheritanceType enumerated type, will be most performed in this scenario?
A.
Single table-per-class-hierarchy (InheritanceType.SINGLE_TABLE)
B.
Joined-subclass (inheritanceType. JOINED)
C.
Table-per-concrete-class (inheritanceType.TABLE_PER_CLASS)
D.
Polymorphic join table (inheritanceType. POLYMORPHIC_JOIN_TABLE)
A
A ) Single Table per Class Hierarchy Strategy
In this strategy, all the classes in a hierarchy are mapped to a single table. The table has a column that serves as a “discriminator column”, that is, a column whose value identifies the specific subclass to which the instance that is represented by the row belongs. This mapping strategy provides good support for polymorphic relationships between entities and for queries that range over the class hierarchy.
A
Answer : A
Performance can be an ambiguous term but in this case, we believe, it is safe to assume that performance refers to how fast your queries run (as opposed to how efficiently space is used by the database to store the hierarchy).
A
B is possible.