Professional Documents
Culture Documents
• Go to Table from the VTCDW database, Right click Files Tables, Create
New Table by SQL Query.
• Create Fact Table and Dimensions Table under Tables by using SQL scripts
(Create Fact Table.txt; CreateDimensionTables.txt).
Creating Our Dimensions
Creating Our Dimensions
Creating Our Dimensions
• The second method is to execute the script. Go to File, Select Open, Click
File and input the database file from your folder. Click Execute once you
input the scripts.
Creating Our Fact Table
Creating Our Fact Table
Creating Our Fact Table
Creating Our Relationships
• Create a relationship by Select and Drag the arrow from dimension table
to fact table as a foreign key (ProductKey to ProductKey).
Creating Our Relationships
Creating Our Relationships
• Make sure the Primary key value and Foreign key value are correct. Click
OK.
Creating Our Relationships
• Create a relationship by Select and Drag the arrow from dimension table
to fact table as a foreign key (DateKey to OrderDate).
Creating Our Relationships
• Make sure the Primary key value and Foreign key value are correct. Click
OK.
Creating Our Relationships
• Create a relationship by Select and Drag the arrow from dimension table
to fact table as a foreign key (CustomerKey to CustomerKey).
Creating Our Relationships
• Make sure the Primary key value and Foreign key value are correct. Click
OK.
Creating Our Relationships
• Under the Tables; Select dbo.FactInternetSales, Select Keys for all the
foreign keys.
Creating Our Relationships
Creating Our Relationships
Q&A