user1322614
user1322614

Reputation: 607

Data Warehouse: dimensional modeling for dynamic dimensions?

We have a table called user_preferences. They are name value pairs and each user can custom define any number of preferences. What we want in our data warehouse/data mart is to provide reporting on these preferences as if they are dimensions. For example, a user preference can be gender, location, etc. And we want to find the number of actions performed by male users for a specific time frame.

How do people normally do this? Without exploding their data mart.

Upvotes: 2

Views: 1236

Answers (1)

N West
N West

Reputation: 6819

This is what as known as the Entity-Attribute-Value data model, also known as the "Everyone invents it, uses it once, then never uses it again" data model..

There are a myriad of reasons why it shouldn't be used, and a few edge cases where it should be used. However, assuming that you can't change your model to a better one, my answer to this SO question should suffice for your case.

Upvotes: 1

Related Questions