Surrogate keys for degenerate dimensions?

View previous topic View next topic Go down

Surrogate keys for degenerate dimensions?

Post  evgeninikolov on Tue Jul 17, 2012 11:17 am

Hi,

I have many facts in my model where we have degenerate dimensions (unit of measures code, currency code, county code etc.). In some cases I need the description of those codes (for instance country name, currency name etc.). So there is a need of kind of a look-up table(s).

So my question is - are those look-up tables seen as dimensions thus requiring to replace the codes with surrogate IDs or is it permitted still to continue using the smart keys themselves?

Regards,

Evgeni

evgeninikolov

Posts : 6
Join date : 2012-07-10

View user profile

Back to top Go down

Re: Surrogate keys for degenerate dimensions?

Post  ngalemmo on Tue Jul 17, 2012 4:59 pm

A dimensional model does not have 'look up tables'. They have fact tables, dimension tables, and bridge tables. Dimensions always have a surrogate primary key. Also, things like units of measure and currency have can far greater impact beyond simply providing a description.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

Re: Surrogate keys for degenerate dimensions?

Post  evgeninikolov on Tue Jul 17, 2012 5:36 pm

ngalemmo wrote:Also, things like units of measure and currency have can far greater impact beyond simply providing a description.

Does it mean, that currency is definetly not a degenerate dimension?

evgeninikolov

Posts : 6
Join date : 2012-07-10

View user profile

Back to top Go down

Re: Surrogate keys for degenerate dimensions?

Post  hang on Fri Jul 20, 2012 6:39 am

No, none of those attributes should be modeled as degenerate dimension in the fact table, as they are all low cardinality repeating groups in relation to fact. So simply put them in their respective dimension.

hang

Posts : 528
Join date : 2010-05-07
Location : Brisbane, Australia

View user profile

Back to top Go down

Re: Surrogate keys for degenerate dimensions?

Post  sgudavalli on Fri Jul 20, 2012 6:46 am

Evgeni,

as said.. i dont thnk none of the below dimensions are degenerates. i guess the cardinality of degenerate is close to the facts...
and all the dimensions said below are the ones with low cardinality and definetly not degenerates...

the below so called lookup tables are real dimensions.. its always recommended to use surrogateid's to link your dimensions with a fact as it will boost the join performance and help your fact row to be more narrower...

sgudavalli

Posts : 29
Join date : 2010-06-10
Age : 32
Location : Pune, India

View user profile

Back to top Go down

Re: Surrogate keys for degenerate dimensions?

Post  Sponsored content


Sponsored content


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