Chapter 3 Building Conceptual Data Models


Inheritance property sheet Generation tab

The generation mode defines the physical implementation of an inheritance structure. It indicates which entities in an inheritance structure should correspond to tables in the PDM.

The Generation tab contains the following properties:

Property Description
Generation Mode Specifies which parts of the inheritance will be generated. You can specify one or both of the following:

  • Generate parent - Generates a table corresponding to the parent entity, which:

    • Inherits entity attributes of each child entity
    • Is affected by child entity relationships
    • Contains reference to any table which has a many-to-one relationship with child entity
  • Generate children - Generates a table corresponding to each child entity. The primary key of each child table is the concatenation of the child entity identifier and the parent entity identifier. When this option is selected, you must choose between:

    • Inherit all attributes – Each table inherits all the entity attributes of the parent entity
    • Inherit only primary attributes - Each table inherits only the identifier of the parent entity


Note that, if you do not select Generate Children, you can control the generation of child tables using the option Generate in the property sheet of each child entity.
Specifying attributes In the case of parent-only generation, you can choose to define a specifying attribute.

A specifying attribute is an entity attribute that is defined for a parent entity which differentiates occurrences of each child.

In the example below, the TITLE entity has two children, NONPERIODICAL and PERIODICAL.

As only the parent table TITLE will be generated in a PDM, a specifying entity attribute PERIODICAL is defined for the inheritance link to differentiate between the two child entities.

In the PDM, each of the child entity attributes will generate columns in the table TITLE, and the specifying entity attribute PERIODICAL will generate a corresponding column PERIODICAL. The values of this column indicate whether an instance of TITLE is a periodical or not.


The tools available on this tab for creating specifying attributes are the same as those for creating entity attributes. For more information, see Creating an attribute.

 


Copyright (C) 2007. Sybase Inc. All rights reserved.