Wednesday, March 7, 2012

Help - Multi values dimensions ?

Hello all
we developped a software with a data warehouse in sql server, without using
analysis services, and following the star design.
we are working with data about transactions, with caracteristics modeled in
dimensions. in general each transaction has one single value for each
caracteristic, but for one, it may have more than one or no value.
some solution we thought about:
-we use comma separated IDs (string) in the dimension in the fact table, but
it would hurt indexing
-or store the IDs in a separate table, but each query will require a join
my question is what is the best way to implement this feature ?
thank you for your help
its a standard "n-n" relationship.
1 caracteristic, can have 0 to N transacions
1 transaction can have 0 to N caracteristic
So, you'll have 3 tables:
Caracteristics 1 - n CaractToTransac n - 1 Transactions
The CaractToTransac table contain only 2 columns:
CaracteristicID and TransactionID
(maybe you can add a column called "sequence" if the order of your
caracteristics is important for you)
Now you have multi caracteristics for each transaction.
"r_samir" <r_samir@.discussions.microsoft.com> a crit dans le message de
news:8E2216BF-50D7-4FF6-89A3-C1995D83E3B5@.microsoft.com...
> Hello all
> we developped a software with a data warehouse in sql server, without
using
> analysis services, and following the star design.
> we are working with data about transactions, with caracteristics modeled
in
> dimensions. in general each transaction has one single value for each
> caracteristic, but for one, it may have more than one or no value.
> some solution we thought about:
> -we use comma separated IDs (string) in the dimension in the fact table,
but
> it would hurt indexing
> -or store the IDs in a separate table, but each query will require a join
> my question is what is the best way to implement this feature ?
> thank you for your help

No comments:

Post a Comment