Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QlikView Essentials

You're reading from   QlikView Essentials Want to solve your Business Intelligence headaches? Learn how QlikView can help, and discover a powerful yet accessible BI solution that lets you harness your data

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781784397289
Length 166 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Chandraish Sinha Chandraish Sinha
Author Profile Icon Chandraish Sinha
Chandraish Sinha
Arrow right icon
View More author details
Toc

Link table


The previous data model scenario is a typical scenario that occurs due to the presence of multiple fact tables. In this case, Orders and SalesTarget are two fact tables and they share common dimensions. Star schema prefers one single fact table in the schema. This scenario can be resolved with the help of a link table.

A link table is a central table that will contain common fields from the two tables and therefore it creates one table and avoids synthetic keys.

Link table essentials

The following steps are followed in the creation of any link table:

  1. Create a composite key in all the concerned fact tables. Use the Autonumber function to make this key unique and numeric. This composite key will act as a key field to connect the link table with fact tables.

  2. Load all the common fields from all the fact tables in one table called the link table. Use concatenate for this purpose.

  3. Drop these common fields in the original fact table.

Creating a link table

In our data model we have two fact tables...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image