读《数据仓库工具箱:维度建模的完全指南》之第二章蜈蚣事实表

本文探讨了在数据仓库设计中,一些模型设计师倾向于对事实表进行反规范化处理的现象。这通常涉及在事实表中直接包含产品层级结构中的常用元素外键,如品牌、子类别、类别和部门等。此外,日期键也会扩展为多个键,分别连接到周、月、季度和年维度表。这种做法可能导致原本紧凑的事实表变得复杂难控,形成所谓的“蜈蚣设计”,即事实表似乎拥有了大量的连接腿。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Interestingly, while uncomfortable with denormalized dimension tables, some
modelers are tempted to denormalize the fact table. Rather than having a single
product foreign key on the fact table, they include foreign keys for the frequently
analyzed elements on the product hierarchy, such as brand,
subcategory, category, and department. Likewise, the date key suddenly turns
into a series of keys joining to separate week, month, quarter, and year dimension
tables. Before you know it, our compact fact table has turned into an
unruly monster that joins to literally dozens of dimension tables. We affectionately
refer to these designs as centipedes because the fact tables appear to have
nearly 100 legs, as shown in Figure 2.13. Clearly, the centipede design has
stepped into the too-many-dimensions trap.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值