Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Is it a must for FACT tables to have all its FKs columns form the Primary Key ?

2 posters

Go down

Is it a must for FACT tables to have all its FKs columns form the Primary Key ?  Empty Is it a must for FACT tables to have all its FKs columns form the Primary Key ?

Post  karan_das Thu Mar 14, 2013 5:17 am

Hi ,

Fact tables always have a multipart key, in which each component of the key joins to a single dimension table.

Came across this here :
http://www.kimballgroup.com/1996/09/02/factless-fact-tables/
while i was reading on Factless Fact tables. [Ist para]

Why is this recommended ? Is it because Roll up and Drill downs will be faster if we have the FK columns coming from the Dimensions as the Primary Key thereby automatically creating indexes for these columns in the FACT (by the target DB) , thereby improving performance ?
Or are there any other reasons ?

Regards,
Karan
karan_das
karan_das

Posts : 10
Join date : 2013-02-26
Age : 35

Back to top Go down

Is it a must for FACT tables to have all its FKs columns form the Primary Key ?  Empty Re: Is it a must for FACT tables to have all its FKs columns form the Primary Key ?

Post  ngalemmo Thu Mar 14, 2013 11:58 am

No, there is no reason to use or declare primary keys for facts unless a particular DBMS can take some advantage of it.

Besides, the primary key is not always 'all the keys'. A primary key compound index will not usually help queries (but it depends on which database). On most databases, it is a hinderance
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum