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

View previous topic View next topic Go down

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

Post  karan_das on 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
avatar
karan_das

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

View user profile

Back to top Go down

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

Post  ngalemmo on 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
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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