Book a Demo

Author Topic: Data Model: Foreign key to unique key  (Read 3610 times)

Carsten Hansen

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Data Model: Foreign key to unique key
« on: January 04, 2014, 08:50:08 am »
I have a logical class data model with two entities that have a master detail relationship. The master entity has a primary key as well as a unique key, both are concatenated keys (each consist of two attributes).

How to I transform the entities to tables so that the foreign key is referencing the unique key (not the primary key), with both of the referenced attributes showing up as columns in the detail table?
« Last Edit: January 04, 2014, 08:50:49 am by cahansen »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Data Model: Foreign key to unique key
« Reply #1 on: January 06, 2014, 03:22:33 pm »
The default MDA transform to DDL is set to assume that the Primary keys are not yet defined, but are to be defined in the MDA transform.
You can try to modify the transform script, but it is questionable if that would adhere to the MDA priniciples of starting with a PIM.