Gender, Ethnicity
3 posters
Page 1 of 1
Gender, Ethnicity
Would it matter if I had gender as a dimension or as an attribute of person/student? Same with ethnicity and region/location. To me, it seems like it could be either or.
chade25- Posts : 29
Join date : 2012-04-12
Age : 44
Location : Oregon
Re: Gender, Ethnicity
The easy answer is since a student should be a dimension, gender and ethnicity should just be attributes. Region/location is a bit more complicated, but for a simple project, it too should be an attribute of a student.
TheNJDevil- Posts : 68
Join date : 2011-03-01
Re: Gender, Ethnicity
As our hockey fan suggested, these are attributes of the student, they belong in the student dimension. However, there are also advantages of an independent dimension that contains various demographic attributes (a junk dimension with gender, age, location (zip) and other useful attributes).
Having a FK in the fact to reference such a dimension, fixes the value of the attributes at the time of the transaction (fact). Current information can be obtained from the student dimension. This is also a technique to avoid creating a type 2 dimension. If you only have a handful of attributes in a dimension that you need historical values, an option is to keep the dimension type 1 and maintain the historical attribute values in a junk dimension (when feasible).
Having such a dimension also makes creating aggregates simpler.
Having a FK in the fact to reference such a dimension, fixes the value of the attributes at the time of the transaction (fact). Current information can be obtained from the student dimension. This is also a technique to avoid creating a type 2 dimension. If you only have a handful of attributes in a dimension that you need historical values, an option is to keep the dimension type 1 and maintain the historical attribute values in a junk dimension (when feasible).
Having such a dimension also makes creating aggregates simpler.
Gender, Ethnicity
ngalemmo wrote:As our hockey fan suggested, these are attributes of the student, they belong in the student dimension. However, there are also advantages of an independent dimension that contains various demographic attributes (a junk dimension with gender, age, location (zip) and other useful attributes).
Having a FK in the fact to reference such a dimension, fixes the value of the attributes at the time of the transaction (fact). Current information can be obtained from the student dimension. This is also a technique to avoid creating a type 2 dimension. If you only have a handful of attributes in a dimension that you need historical values, an option is to keep the dimension type 1 and maintain the historical attribute values in a junk dimension (when feasible).
Having such a dimension also makes creating aggregates simpler.
What is a type 1 and 2 dimension?
chade25- Posts : 29
Join date : 2012-04-12
Age : 44
Location : Oregon
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|