Graceful extensions to dimensional models
Graceful extensions to dimensional models
维度模型的优雅扩展
Dimensional models are resilient when data relationships change. All the following changes can be implemented without altering any existing BI query or application, and without any change in query results.
当数据关系发生变化时,维度模型是有韧性的。以下所有变更都无需改动任何现有 BI 查询或应用即可实施,且查询结果保持不变。
- Facts consistent with the grain of an existing fact table can be added by creating new columns.
- Dimensions can be added to an existing fact table by creating new foreign key columns, presuming they don’t alter the fact table’s grain.
- Attributes can be added to an existing dimension table by creating new columns.
- The grain of a fact table can be made more atomic by adding attributes to an existing dimension table, and then restating the fact table at the lower grain, being careful to preserve the existing column names in the fact and dimension tables.
- 与现有事实表粒度一致的新事实,可以通过新增列来加入。
- 在不改变事实表粒度的前提下,可以通过新增外键列把新维度加到现有事实表上。
- 可以通过新增列向现有维度表添加属性。
- 通过向现有维度表添加更细的属性,可以把事实表粒度变得更原子,然后按更低粒度重述事实表——注意要保留事实表和维度表中已有的列名。