Physical Joins

Create Physical Joins

To create physical joins in the Physical layer of the repository, perform the following steps:
1.In the Physical layer, right-click the SH schema folder and select Physical Diagram > Object (s) and All Joins. Alternatively, you can select the SH database object and then click the Physical Diagram button on the toolbar.

2.In the Physical Diagram, if the tables are too big, right-click in the white space, select Zoom, and adjust the size.

3.Rearrange the tables so they are all visible in the Physical Diagram.

4.Click the New Foreign Key button on the toolbar.

5.Click the Channels table and then the Sales table. The Physical Foreign Key dialog box opens.

It matters which table you click first. The join is creating a one-to-many (1:N) relationship that joins the key column in the first table to a foreign key column in the second table. The Administration Tool makes a best "guess" and automatically determines which columns should be included in the join.
Make sure the join expression is:
6.Click OK to close the Physical Foreign Key dialog box. The join between Channels and Sales is displayed in the Physical Diagram.

7.Continue to create the following joins:
Note that Countries joins to Customers and Costs in not joined for now. All other tables join directly to Sales.

When you are finished, click the X in the upper right corner to close the Physical Diagram.
8.Select File > Save or click the Save button on the toolbar to save the repository.
9.Click No when prompted to check global consistency. Checking Global Consistency checks for errors in the entire repository. Some of the more common checks are done in the Business Model and Mapping layer and Presentation layer. Since these layers are not defined yet, bypass this check until the other layers in the repository are built. You learn more about consistency check later in this tutorial.
10.Leave the Administration Tool and the SH repository open for the next topic.
Congratulations! You have successfully created a new repository, set up an ODBC data source, imported a table schema from an external data source into the Physical layer, and defined keys and joins.
In the next topic you learn how to build the Business Model and Mapping layer of a repository.

No comments:

Post a Comment

Popular Posts