Book a Demo

Author Topic: Using an alternative inheritence strategy for DDL  (Read 2319 times)

Paul Kenny

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Using an alternative inheritence strategy for DDL
« on: April 06, 2011, 05:32:27 am »
Hi,

I wish to use the DDL transform to create my relational model and then go on to forward generate my code. However I have run into an incompatibility between the current DDL transform implementation and the expected data model representation for a framework that we are using.

The following link describes the various inheritance strategies that could be used when mapping the class model to the relational model. (See paragraph titled "4. Select an inheritance strategy" in the section titled "Mapping from the Class Model to the Relational Model")

http://www.sparxsystems.com.au/resources/uml_datamodel.html

Three inheritance strategies are described and the default implementation of the DDL transform in Enterprise Architect uses method c) whereby a table is created for each class in the inheritance tree with columns in the table for attributes belonging to the class in question only. Foreign key relationships are created between the tables to access attributes from the parent class.

Due to a constraint in a framework that we are using our project needs to use method b) whereby a table will be generated for each class in the tree but it will contain columns for each attribute of the parent classes also.

Does anyone have examples of how the standard DDL transform could be customised to implement method b) ?? Even any pointers to other types of transforms that iterate trough the attributes of parent classes would be a help and may provide assitance to me.

Thanks in advance ofr any help.

  Cheers,
    Paul