Is a fact table in normalized or de-normalized form?

后端 未结 2 2058
南笙
南笙 2021-01-05 04:10

I did a bit R&D on the fact tables, whether they are normalized or de-normalized. I came across some findings which make me confused.

According to Kimball:

相关标签:
2条回答
  • 2021-01-05 04:30

    From the point of relational database design theory, dimension tables are usually in 2NF and fact tables anywhere between 2NF and 6NF.

    However, dimensional modelling is a methodology unto itself, tailored to:

    • one use case, namely reporting

    • mostly one basic type (pattern) of a query

    • one main user category -- business analyst, or similar

    • row-store RDBMS like Oracle, SQl Server, Postgres ...

    • one independently controlled load/update process (ETL); all other clients are read-only

    There are other DW design methodologies out there, like

    • Inmon's -- data structure driven

    • Data Vault -- data structure driven

    • Anchor modelling -- schema evolution driven

    The main thing is not to mix-up database design theory with specific design methodology. You may look at a certain methodology through database design theory perspective, but have to study each methodology separately.

    0 讨论(0)
  • 2021-01-05 04:48

    Most people working with a data warehouse are familiar with transactional RDBMS and apply various levels of normalization, so those concepts are used to describe working a star schema. What they're doing is trying to get you to unlearn all those normalization habits. This can get confusing because there is a tendency to focus on what "not" to do.

    The fact table(s) will probably be the most normalized since they usually contain just numerical values along with various id's for linking to dimensions. They key with fact tables is how granular do you need to get with your data. An example for Purchases could be specific line items by product in an order or aggregated at a daily, weekly, monthly level.

    My suggestion is to keep searching and studying how to design a warehouse based on your needs. Don't look to get to high levels of normalized forms. Think more about the reports you want to generate and the analysis capabilities to give your users.

    0 讨论(0)
提交回复
热议问题