Question

I make payments to various kinds of payees and I'm wondering whether I should create a dimension of each kind of payee and have multiple foreign keys in my fact table, or conflate the various kinds of payees via a type attribute and have a single FK in the PaymentFact table at the expense of having attributes that make no sense in the PayeeDim table for any particular value of PayeeDim.Type...

how are these situations normally handled?

TIA - e

Was it helpful?

Solution

As always with dimensional modeling, the answer is "It Depends." It's usually better to have a dimension with a bunch of empty attributes if the alternative is a fact table with 15-20 dimensions.

To the business, if a Payee is a payee, and there are several payee types, then it makes sense to have a payee dimension. But if a one payment record can be assocaited to multiple different "types" of payees, then each dim should get its own key on the fact.

OTHER TIPS

One option is to have two dimensions - one with the Payee information, and the other with the Payee_Type information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top