Databases Reference
In-Depth Information
Figure 8-10
Figure 8-11 illustrates the Products diagram using the DimProduct, DimProductSubCategory, and
DimProductCategory tables. This diagram will now simplify the management of the related product tables.
Figure 8-11
Building Data Source View Relationships
In a Data Source View, you can also work with primary key-foreign key relationships within a data
source. Creating new primary key-foreign key relationships is often necessary if the underlying data-
base does not already contain the relationships. Relationships created in the Data Source View are only
logical relationships, so this will not impact the underlying database.
The FactResellerSales table in the AdventureWorksDW database contains three time-related columns:
OrderDateKey, ShipDateKey, and DueDateKey. These columns relate to the DimTime table based on the
TimeKey column. Open the “<All Tables>” diagram by clicking on it in the Diagram Organizer pane, as
illustrated in Figure 8-12.
In this diagram, you should notice the three relationships from FactResellerSales to DimTime. To examine
how the relationship is defined, double-click on the arrows connecting the two tables. In this example, you
can click on the leftmost arrow connecting to DimTime to view the FactResellerSales.ShipDateKey to
DimTime.TimeKey relationship, as illustrated in Figure 8-13.
Search WWH ::




Custom Search