Relationships
Also noted as “Relation”, “Association” or “Reference”, this represents the association between pairs of tables. ERBuilder Data Modeler supports four kinds of relationships: Identifying relationship, Non-identifying relationship, many-to-many relationship, and reflexive relationship. To show the “Relation” management dialog box, double click on the relation in the diagram or click right on the relation and select “Properties”.
Note that creating a relation from the treeview is not possible. It is possible only through point-and-click.
Creating a new relationship
On ERBuilder Data Modeler, you can create relationships between two tables or between a table and itself by linking the parent table to the child table. To add a new relationship:
- From the toolbar, select one of the available relationships icons:
- Identifying relationships
- Non-identifying relationships
- Many to many relationships
- Click on the parent table representation in the diagram area:
- Hold the mouse click and drag the cursor to the child table:
- This is how a simple relationship is displayed:
![new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image122.png)
![new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image123.png)
![new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image124.png)
The result is the added arrow captioned “Reference_1” and the inclusion of the “Parent_ID” attribute in the “Child Table”.
By contrast, a many-to-many relationship is displayed as follows:
![many2many new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image125.png)
The result is the creation of “Reference_1” and “Reference_2” arrows and the inclusion of “Parent_ID” and “Child_ID” attributes in the new “Relation Table (Table2)”.
Creating reflexive relationship
As for reflexive relationships, you can create these types of relationships by right-clicking on the table and selecting “Reflexive Relationship” from the menu.
![reflexive new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image126.png)
The result is the appearance of a “Reference_1” reflexive arrow in the diagram and the “Parent_ID_1” attribute creation in the table “Parent Table”.
![reflexive new relationship](dist/img/Help ERBuilder 7.0.4 to generate CHM final2_fichiers/image127.png)
Available in: Standard, Professional and Enterprise Editions.