Book a Demo

Author Topic: DDL with an association class  (Read 4139 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
DDL with an association class
« on: August 16, 2012, 04:32:58 pm »
Hi,

I'm using an association class (e.g. similar to EA help example : Employee and Company classes with an association class : Job), which I'm trying to generate a DDL for (database relational model).

If I have a many to many multiplicity between Employee & Company, EA generates a JoinEmployeeToCompany table with 2 foreign keys. The Job table is generated but is not associated with any other table.

I'm a bit confused with the DDL generation rules - if anyone has some info on this subject

thanks

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DDL with an association class
« Reply #1 on: August 16, 2012, 05:52:37 pm »
Guillaume,

I think you first need to MDA transform your "logical model" (the one with the association class) into an "ERD" type of model, effectively stripping out the association class in favor of a link table.

Then you can generate the DDL.

But I'm not sure :-/

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: DDL with an association class
« Reply #2 on: August 16, 2012, 06:39:07 pm »
thanks Geert but the ERD transformation doesn't help.
From what I can see, association classes aren't supported by a DDL transformation.

The association class is transformed to an independant table with no association/FK. I would have expected the association class to be transformed into a table with 2FKeys (to each associated table) alongside the additional attributes. In other words it should replace the JoinClassAClassB table

So the workaround would involve avoiding the use of association classes and use a standard class between the 2 classes instead.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DDL with an association class
« Reply #3 on: August 16, 2012, 06:50:10 pm »
Guillaume,

The fact that association classes aren't supported by the standard transformations doesn't surprise me, but can't you define your own transformations?

Geert

Disclaimer: I've never done something similar before, so I'm not speaking out of experience, only hearsay ;)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: DDL with an association class
« Reply #4 on: August 16, 2012, 06:59:48 pm »
Yep, transformation templates should let me define new rules for association classes.

thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: DDL with an association class
« Reply #5 on: August 17, 2012, 08:27:01 am »
Transformation templates are currently unable to detect an association class without writing an add-in to do it.