Prev | Next |
Transform Foreign Keys
Enterprise Architect supports the transformation into Foreign Keys of many different types of relationship defined between entities in a logical model.
Each Foreign Key in a Physical model is represented by the combination of a stereotyped connector and an operation in each of the involved Tables. Foreign Key transformations are achieved with the 'Connector' template in the DDL language. This template generates an intermediate dataset that is then interpreted by Enterprise Architect's transformation engine to create all the required physical entities and connectors.
By default, Enterprise Architect supports transformations of these connector types:
- Generalization - this kind of connector will create a Foreign Key with a multiplicity of 0..1 in the source and 1 in the destination
- Association Class - this kind of connector will create a 'join' table linking both the source and destination Tables
- Association/Aggregation - these kinds of connector use the multiplicity defined in the Logical model's relationship to join the source and destination Tables
All Foreign Key definitions will cause the addition of a new integer (or equivalent) column in both source and destination Tables, which will act as the Primary Key in the source Table and the Foreign Key column in the destination Table. The default names for the new columns will be the Table name with the suffix of 'ID' added, whilst the names of the Foreign Keys will be automatically generated using the FK DDL template.