Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do fact tables have a user-defined primary key?

0
Posted

Do fact tables have a user-defined primary key?

0

Up to Version 7.5, no. Up to this version, fact tables have a SYSKEY rather than a user-defined primary key. The primary key (and consequently the secondary indices) would become too large because the key would have to be created from the fields of all the dimension tables. In addition, fact tables (‘F’) that are not compressed cannot contain duplicate records – these would be rejected with a ‘Duplicate key’ error if a primary key were defined. As of the MaxDB BW Feature Pack (Version 7.6), it makes sense to create a primary key in fact tables. In this version, the primary key is created from a time dimension and the SYSKEY, not from the fields of all the dimension tables. For more information, see Note 1040431 FAQ: MaxDB BW Feature Pack.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.