Degenerate dimensions (退化的维)不需要建立维度表,就用事实表的字段为维。
A degenerate dimension is a dimension which is so simple that it isn't worth creating its own
dimension table. For example, consider following the fact table:
product_id time_id payment_method customer_id store_id item_count dollars
55 20040106 Credit 123 22 3 $3.54
78 20040106 Cash 89 22 1 $20.00
199 20040107 ATM 3 22 2 $2.99
55 20040106 Cash 122 22 1 $1.18
- 24 -
and suppose we created a dimension table for the values in the payment_method column:
payment_method
Credit
Cash
ATM
This dimension table is fairly pointless. It only has 3 values, adds no additional information, and
incurs the cost of an extra join.
Instead, you can create a degenerate dimension. To do this, declare a dimension without a table,
and Mondrian will assume that the columns come from the fact table.
<Cube name="Checkout">
<!-- The fact table is always necessary. -->
<Table name="checkout">
<Dimension name="Payment method">
<Hierarchy hasAll="true">
<!-- No table element here.
Fact table is assumed. -->
<Level name="Payment method"
column="payment_method" uniqueMembers="true" />
</Hierarchy>
</Dimension>
<!-- other dimensions and measures -->
</Cube>
Note that because there is no join, the foreignKey attribute of Dimension is not necessary,
and the Hierarchy element has no <Table> child element or primaryKey attribute.

Degenerate dimensions (退化的维)相关推荐

  1. 【C 语言】数组 ( 一维数组形参退化 | 二维数组形参退化 | 函数形参等价关系 )

    文章目录 一.一维数组形参退化 二.二维数组形参退化 三.数组形参等价关系 一.一维数组形参退化 C 中将 一维数组 作为参数 , 传递到函数中 , 该 一维数组 会退化为 指针 ; 将 int ar ...

  2. Degenerate Dimensions(原创)

    We are often asked about degenerate dimensions in our modeling workshops. Degenerate dimensions caus ...

  3. 什么是退化维度?(Degenerate Dimensions)

    退化维度的维度表可以被剔除,从而简化维度数据仓库的模式.因为简单的模式比复杂的更容易理解,也有更好的查询性能. 当一个维度没有数据仓库需要的任何数据时就可以退化此维度.需要把退化维度的相关数据迁移到事 ...

  4. 【C语言进阶深度学习记录】三十一 数组作为函数参数时退化为指针

    之前的学习数组的文章中,已经知道一维数组作为函数参数的时候,最终会被编译器编译为指针.今天来看看二维数组的情形 文章目录 1 为什么C语言中的数组作为函数参数会退化为指针? 2 二维数组作为函数参数如 ...

  5. 数据仓库工程师面试题目(不定期更新)

    1 缓慢变化维的设计?(真心常问,标准答案必备) 三种:直接覆盖,增加新行,增加心属性列 Type 1:覆盖:直接用新值代替旧值. Type 2:增加新行.将当前行的状态设置为off,并设置一个end ...

  6. 数据仓库工程师面试题

    什么是数据仓库? 数据仓库,英文名称date warehouse 简称DW,数据仓库,就是一个很大的用来存储数据的集合,用于解决企业数据分析性和决策目的创建,对多样的数据进行筛选与整合,指导业务流程曾 ...

  7. 数据仓库基础理论笔记

    from:https://blog.csdn.net/china_demon/article/details/51891873 第一节 互联网电商大数据环境 如果你真正进入这个行业了! 入职后你所在部 ...

  8. 【论文翻译】Mean Shift: A Robust Approach toward Feature Space Analysis

    论文题目:Mean Shift: A Robust Approach toward Feature Space Analysis 论文来源: Mean Shift: A Robust Approach ...

  9. Mondrian Schema设计教程

    文章目录 1 什么是模式? 2 模式文件(Schema files) 2.1 注释 3 逻辑模型(Logical model) 3.1 多维数据集(cube) 3.2 度量(Measures) 3.3 ...

最新文章

  1. 【机器视觉】机器视觉产业链
  2. isinstance函数和@staticmethod用法
  3. python密码学编程pdf-Python密码学编程PDF电子书免费下载
  4. e语言怎么连接mysql_大佬们E语言连接MYSQL输出中文乱码怎么破
  5. dubbogo 3.0:牵手 gRPC 走向云原生时代
  6. Xilinx FPGA,“加速”视频质量提升
  7. 4.18、Bootstrap V4自学之路-----内容---滚动监听
  8. 管理沟通中移情的应用_移情在设计中的重要性
  9. python的三维图片_python如何做三维图
  10. 鳗鱼刺多怎么处理图像_图像二值化处理
  11. 【2019牛客多校第七场:H】Pair(数位dp)
  12. 公文排版插件for Word/WPS【快点公文助手——让公文排版更快一点】
  13. 【Leetcode Medium】1318. Minimum Flips to Make a OR b Equal to c
  14. LimeSDR 中文教程 (一)
  15. python oserror怎么解决_python – OSError:目录不是空的,如何修复?
  16. 应对反爬如何爬取拉勾网信息(非常详细)
  17. 百度内容质量部测试开发面试题
  18. 再见,拼多多!再见,黄铮!
  19. 养成良好的编程习惯-一个库一个文件夹
  20. 攻击者思维 - iOS 摄像头指示灯不亮,就真的没事了吗?

热门文章

  1. 转发 2013豆瓣电影【口碑榜】Top100
  2. 微型计算机怎样打开光驱,笔记本光驱,教您笔记本光驱怎么打开
  3. WEB应用防火墙是什么,数据库被篡改了怎么办,数据泄漏了用什么防
  4. electron-asar的编译和反编译
  5. NVIDIA控制面板不能用的解决方法(先确保显卡硬件正常)
  6. 计算机美术课前景,电脑绘画听起来挺时髦,前景如何?
  7. 使用AppEEARS下载数据(以MODIS GPP数据产品为例)
  8. 计算机Windows10熄屏时间怎么调节,浅析win10电脑屏幕熄屏时间设置教程
  9. Lambda表达式的本质
  10. 企业如何实现数字化转型?