Define Relationships between Tables
Relationships between tables need to be defined in the style of a containment relationship model, to suit the containment relationship model that Policy Modeling uses. In Policy Modeling, these relationships will be visible to a policy modeler in the Mapping section of the Edit Entity dialog box in the Via drop-down list.
Policy Modeling also supports mapping reference relationships to links as defined in the GetMetadata response of a web service connector.
In the following example, the table named 'Car' does not support being mapped as the Global entity for either input or output, but as it is linked to by the table 'Vehicles' via the 'Cars' link, it can be mapped as a child entity of the Global entity, and have each field mapped where allowed.
<Table name="Vehicles" can-be-input="true" can-be-output="false">
<Link name="Cars" target="Car" cardinality="C_1M"/>
</Table>
<Table name="Car" can-be-input="false" can-be-output="false">
<Field name="Model" type="STRING" can-be-input="true" can-be-output="false" is-required="false"/>
...
</Table>
A link has one available type of cardinality representing a one-to-many relationship, which is held in the parent table.
Note: The child table does not hold a reference to the parent table in the way that a table in a relational database might hold as a foreign key reference: the parent holds the reference as a link to the child table.