Relationships referred to as joins are used to combine columns from two or more tables. These joins provide the modeling tools with instructions on how the tables and data sets fit together.
The relationship diagram displays all the tables in the data model, and the relationships between the tables. By default, Pyramid uses heuristics to define relationships according to each table's primary key column. You can edit, delete, and ad joins as needed.
- Click here to learn more about the relationship diagram.
Context Menus and Properties
Several functions are available from the relationship diagram, and can be accessed from the context menus (which are exposed by right clicking on the relevant item). Right clicking on a table, for instance, exposes the table context menu, where you can rename the table, show or hide the table, duplicate the table, and more.
The column context menu, accessed by right clicking on a column, let's you add a new relationship, set an index or primary, set a measure, and more. Right click on the background rearrange the diagram, scale the diagram to fit the screen, expand or collapse all tables, or select the auto relationship heuristics used to define the relationships.
Left click on a table or column to expose its properties in the Properties panel. Here you can rename the item, add a measure, add a description, and more.
- Click here to learn more about the context menus and properties.
The table relationships (joins) are determined using heuristics. There are a couple of ways to edit joins:
- Right Click Context Menu: right click on a join to delete it, change its direction, or validate it.
- Left Click Context Menu: left click on a join to change the join type (inner, left, right, or full).
- Properties: right click on a join to open its properties. From the join's properties panel, you can:
- Change the join type: you can choose a full outer join, inner join, left outer join, or right outer join.
- Make a join bidirectional: bidirectional joins are used in circumstances where the data between 2 joined tables needs to flow in both directions.
- Change the join direction: the join direction can be changed for any join.
- Change or add join keys: key columns generally list unique identifiers in order to uniquely identify rows in the database tables; these columns are usually used to join tables.
- Change the join operator: by default the join operation is set to = but it can be changed to a non equal operator if required.
- Validate the join: test the relationship validity.
- Click here to learn more about joins and how to edit them.
- Click here to learn about bidirectional joins.
- Click here to learn about join keys.