Book Image

Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide

By : Abolfazl Radgoudarzi, Reza Rad
Book Image

Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide

By: Abolfazl Radgoudarzi, Reza Rad

Overview of this book

Table of Contents (19 chapters)
Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating a hierarchy from multiple tables


Creating a relationship between tables in tabular and creating a hierarchy based on inter-related tables are two main parts that you will see in this example. In the first part of this example, we will create a relationship between the product table and the product category and product subcategory. In addition, in the second part, we will create a product category hierarchy based on the columns of these three tables:

  1. In the Model menu, click on the existing connections and open the current connection. Then, in the Import Tables wizard, choose DimProductCategory and DimProductSubcategory. Change their names to Product Category and Product Subcategory. Complete the wizard and import the records.

  2. Go to Diagram View; you will see two new tables added. There is a relationship between the product category and product subcategory. However, there is no relationship between the product subcategory and product. So we need to create a relationship...