star schema - Dimensional design: not sure about fact vs. dimension for a certain types of data -
i'm having trouble deciding should go in particular dimension , should go in fact table star schema i'm developing.
for sake of example, let's project keeping track of houses property management company. dimensions various dates, renter, contract, etc. straightforward. house, no matter data lives, want keep track of current owner, current renter, current rental contract, things neighborhood, address, current rental price, current market value, , forth. note owner, renter , contract dimensions (and neighborhood , address may dimensions, don't care much).
a lot of data kept houses used in filtering queries, or row , column headers of cube. of needed ancillary information, looked @ on house house basis, not in aggregate.
given data, , need it, have (at least) 3 options:
- dimhouse: house table dimension, lot of attributes might better in fact table, since used browsing , filtering, need here. snowflaking/outriggers required attributes current renter.
- facthouse: have accumulating snapshot of house information joined other fact tables, perhaps using trimmed down dimhouse bridge. seems weird me, puts appear facts in fact table.
- put current owner, current renter, etc. in relevant fact tables , keep facts date owner/renter/etc. change (also weird, keep in star schema land).
so i've been going down dimension route. gives me heart burn, achieves goal. want know if there better way organize data. don't mind redundancy (such having fact table , dimension table similar data) or snowflaking, if make sense , best way things (for values of "best").
the thing star schema is purpose-built making kinds of queries easy , efficient.
if you're finding kinds of queries aren't being helped along star because of dimension , fact, build additional stars around alternative views of dimensions , facts more support queries want perform.
you keep transactional database normalized. when comes bi datawarehouse need let redundancy anxiety go avoid heart burn.
Comments
Post a Comment