Book a Demo

Author Topic: Logical to Physical Data Model Transformation  (Read 5580 times)

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Logical to Physical Data Model Transformation
« on: October 06, 2012, 03:36:59 am »
I've basically managed to get this to work for a simple logical model with a few tables and fields (attributes) with generic data types - I assume the "UML data types" - using the DDL transformation.   However some of the types, e.g. "int" don't seem to be translated to the target DBMS format and just get left as they are whether the target is Oracle, DB2 or whatever.  

So,  does anyone know where these generic UML data types are a) defined and b) where the mapping to DBMS data types is?

thanks

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Logical to Physical Data Model Transformation
« Reply #1 on: October 08, 2012, 02:22:56 pm »
With the DDL Logical to Physical transform there is an inbuild transform -  TransformCurrent:
 %TRANSFORM_CURRENT("type", "stereotype", "collection", "constant", "containment", "ordered", "static", "volatile")%
  type=%qt%%CONVERT_TYPE(genOptDefaultDatabase,attType)%%qt%
See the DDL Logical - Attribute template page.

If you want to have varaitions on this you may need to set up a call to another template and provide your own conditions for parsing these.
There is an example (in reverse) of this on:
http://community.sparxsystems.com/resources/code-templates/data-modeling-logical-and-conceptual-mda-transforms
See the subtemplate: DBFieldTypeToUMLType

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Logical to Physical Data Model Transformation
« Reply #2 on: October 17, 2012, 08:08:21 pm »
Thanks for the quick reply Dermot, however I'm still confused.

If I go to the attributes of a logical table and click on "type" I get a list of data types - but where are these defined?  If I go to Settings/Database Datatypes, "DDL" or perhaps "UML" is not listed.  Or are these UML types inbuilt as you say and so can't be modified?   If so that's not an issue in itself, if EA then understands them and can transform them.

On that point I've found the "DDL Logical - Attribute template" you refer to, but what I'm struggling with is why all the inbuilt (UML?) types are not transformed out of the box without me having to modify any templates?   I'm running 9.3 build 930.

Any help much appreciated.