This discussion is archived
3 Replies Latest reply: Jun 24, 2013 4:14 AM by Philip Stoyanov RSS

Entity Inheritance

Venky Newbie
Currently Being Moderated

I am using Oracle Data Modeler v 3.3.0 for Entity Inheritance. I have a BASE ENTITY along with its multiple sub-types. In BASE ENTITY properties dialog, on Subtypes, i am using following settings for foward engieering from Logical to Relational model:

Subtree generation:  Table per child

References:  None

Attributes Inheritance: All attributes

 

However, the generated Relational Model copies all BASE ENTITY attributes into each CHILD entity with full qualification (like BASE ENTITY. ATTRIB-1 and so on) and also adds a CHILD ENTITY_ID1 primary key in each generated CHILD ENTITY even though there is already a primary key.

 

What setting do i need to do to have attributes without full qualification in generated child entities as well as no primary key in generated child entities in relational model?

 

Thanks,

Venky.

 

Message was edited by: Venky Observation #1: The Subtree generation options, given above, are not being saved in v3.3 of product. After saving, if i reopen properties dialog of BASE ENTITY, it still shows me older values and not the ones i saved just now.

  • 1. Re: Entity Inheritance
    Philip Stoyanov Guru
    Currently Being Moderated

    Hi

    >What setting do i need to do to have attributes without full qualification in generated child entities

    You cannot suppress it - you can make it nicer if you set "Short name" property for each entity in hierarchy then that short name will be used as prefix and also will become as table abbreviation for generated table.

     

    >as well as no primary key in generated child entities in relational model?

    You need to check "Create surrogate key" flag for those entities - it shouldn't be checked. Also check the "Use surrogate keys" flag for relationships connected to those entity.

     

    >Observation #1: The Subtree generation options, given above, are not being saved in v3.3 of product.

    Engineering of entities hierarchy is driven by "Engineer to" flag of each entity - if it's set then there will be created table corresponding to that entity. "Subtree generation" and "Apply to model" are there to help to preset quickly "Engineer to" flag instead of going to each entity and setting it manually. This is why "Subtree generation" goes to "Do not preset" status when dialog is opened again.

     

    Philip

  • 2. Re: Entity Inheritance
    Venky Newbie
    Currently Being Moderated

    Hi

    >What setting do i need to do to have attributes without full qualification in generated child entities

    You cannot suppress it - you can make it nicer if you set "Short name" property for each entity in hierarchy then that short name will be used as prefix and also will become as table abbreviation for generated table.

    Venky> In this case, since i chose table per entity strategy for each child entity, there is no need for generated child entity attribute to be prefixed by a super-type entity name that does not even exist in relational model. It may be a feature add to v 3.3, but it's a good feature, to not prefix generated child entity attribute if short name is not filled in.

     

    >as well as no primary key in generated child entities in relational model?

    You need to check "Create surrogate key" flag for those entities - it shouldn't be checked. Also check the "Use surrogate keys" flag for relationships connected to those entity.

    Venky> The "Create surrogate key" flag is unchecked and i still see this generated. This may be a bug in v3.3.

     

    >Observation #1: The Subtree generation options, given above, are not being saved in v3.3 of product.

    Engineering of entities hierarchy is driven by "Engineer to" flag of each entity - if it's set then there will be created table corresponding to that entity. "Subtree generation" and "Apply to model" are there to help to preset quickly "Engineer to" flag instead of going to each entity and setting it manually. This is why "Subtree generation" goes to "Do not preset" status when dialog is opened again.

     

    Philip

     

  • 3. Re: Entity Inheritance
    Philip Stoyanov Guru
    Currently Being Moderated

    Hi,

    • Venky> In this case, since i chose table per entity strategy for each child entity, there is no need for generated child entity attribute to be prefixed by a super-type entity name that does not even exist in relational model. It may be a feature add to v 3.3, but it's a good feature, to not prefix generated child entity attribute if short name is not filled in.
    • Venky> The "Create surrogate key" flag is unchecked and i still see this generated. This may be a bug in v3.3.

     

    Both problems are fixed for next release.

    Philip

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points