On metadata import, we automatically generate paired surrogate relationship items for any built-in PK-FK relationship. We’ll have one relationship item per any PK-FK combination, and another reverse item on the other side of the same relationship. We also generate similar relationship items for custom joins and chain relationships.

Shape Relationship Items

Look at the left table below. It has one PK (user_id) and one reflexive FK (reports_to). How can you tell what other relationships users can be in, if you can determine this only by looking at FKs? And Users is a pretty independent table, its main relationships with other tables consist in propagation of its PK as FK in those tables. Also, there could be composite PKs and FKs, with more than one key field. Relationship items group together all these fields.

relationship-items1

Look at the second Users table now. Hard to believe this is in fact the same table, it’s just that we expanded its Relationships category and unveiled its generated relationship items. Without looking everywhere now, we can say easily this table is in relationship with Address, Managers, Clerk and many other tables.

Expanding Relationship Items

By simply dragging some of these items and dropping them outside the shape, we generated a much better view, like the one below:

relationship-items2

Highlight Related Elements

Whenever in doubt which diagram elements are connected through some form of relationship, move the mouse cursor over, with nothing selected on screen. If Show Highlights option is on (by default True), related elements (shapes, connectors and items) are automatically selected.

The image below shows two different relationships between Employees and Departments. On the left, we highlight related elements of Employees.EmployeeIDDepartments.DepartmentHeadID relationship. When the relationship is not expanded into a connector, you also see the related shape relationship items (images on the second row). Same for the second relationship, between Employees.DepartmentIDDepartments.DepartmentID:

hover-relationships

Leave a Reply