-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdata_warehouse_quick6.html
255 lines (247 loc) · 15.6 KB
/
data_warehouse_quick6.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="utf-8" />
<title>数据仓库快速入门教程6-OLAP</title>
<link rel="stylesheet" href="/theme/css/main.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">python自动化测试人工智能 </a></h1>
<nav><ul>
<li><a href="/category/ba-zi.html">八字</a></li>
<li><a href="/category/ce-shi.html">测试</a></li>
<li><a href="/category/ce-shi-kuang-jia.html">测试框架</a></li>
<li><a href="/category/common.html">common</a></li>
<li class="active"><a href="/category/da-shu-ju.html">大数据</a></li>
<li><a href="/category/feng-shui.html">风水</a></li>
<li><a href="/category/ji-qi-xue-xi.html">机器学习</a></li>
<li><a href="/category/jie-meng.html">解梦</a></li>
<li><a href="/category/linux.html">linux</a></li>
<li><a href="/category/python.html">python</a></li>
<li><a href="/category/shu-ji.html">书籍</a></li>
<li><a href="/category/shu-ju-fen-xi.html">数据分析</a></li>
<li><a href="/category/zhong-cao-yao.html">中草药</a></li>
<li><a href="/category/zhong-yi.html">中医</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="/data_warehouse_quick6.html" rel="bookmark"
title="Permalink to 数据仓库快速入门教程6-OLAP">数据仓库快速入门教程6-OLAP</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2019-04-29T08:36:00+08:00">
Published: 一 29 四月 2019
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/da-shu-ju.html">大数据</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
</ul>
<h2 id="_1">什么是在线分析处理?</h2>
<p>OLAP(Online Analytical Processing)允许用户同时分析来自多个数据库系统的信息。 这项技术使分析师能够从不同的角度提取和查看业务数据。</p>
<p>分析师经常需要分组,汇总和加入数据。 关系数据库中的这些操作是资源密集型的。 使用OLAP数据可以预先计算和预先聚合,从而加快分析速度。</p>
<p>OLAP数据库分为一个或多个多维数据集。 立方体的设计使得创建和查看报告变得容易。</p>
<h2 id="olap">OLAP多维数据集:</h2>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO1.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-5f6d0be658050d2a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<p>OLAP的核心是OLAP多维数据集。 OLAP多维数据集是为快速数据分析而优化的数据结构。</p>
<p>OLAP多维数据集由称为度量的数字事实组成,这些度量按维度分类。 OLAP Cube也称为<strong>超立方体</strong> 。</p>
<p>通常,使用简单的电子表格执行数据操作和分析,其中数据值以行和列格式排列。 这是二维数据的理想选择。 但是,OLAP包含多维数据,数据通常从不同且不相关的源获取。 使用电子表格不是最佳选择。 多维数据集可以以逻辑和有序的方式存储和分析多维数据。</p>
<p><strong>它是如何工作的?</strong></p>
<p>数据仓库将从多个数据源和格式中提取信息,如文本文件,Excel工作表,多媒体文件等。</p>
<p>提取的数据被清理和转换。 将数据加载到OLAP服务器(或OLAP多维数据集)中,在这里预先计算信息以供进一步分析。</p>
<h2 id="olap_1">OLAP的基本分析操作</h2>
<p>OLAP中的四种分析操作是:</p>
<ol>
<li>Roll-up 汇聚</li>
<li>Drill-down 下沉</li>
<li>Slice and dice 切片和骰子</li>
<li>Pivot 旋转</li>
</ol>
<p><strong>1) Roll-up :</strong></p>
<p>汇总也称为“合并”或“聚合”。 有两种方式</p>
<ol>
<li>减少尺寸</li>
<li>概念层次结构是一种根据订单或级别对事物进行分组的系统。</li>
</ol>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO2.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-8a5c6d9c00179280.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<ul>
<li>在这个例子中,城市新泽西和洛杉矶归入美国。</li>
<li>新泽西州和洛杉矶的销售额分别为440和1560,合并为2000。</li>
<li>在此聚合过程中,数据是位置层次结构从城市向国家。</li>
<li>在卷起过程中,需要移除至少一个或多个尺寸。 在此示例中,Quater维度已删除。</li>
</ul>
<p><strong>2)下沉</strong></p>
<ul>
<li>向下移动概念层次结构</li>
<li>增加维度</li>
</ul>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO3.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-769131d5d2128405.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<ul>
<li>Quater Q1将在1月,2月和3月进行。 相应的销售也是登记册。</li>
<li>在此示例中,添加了维度月份。</li>
</ul>
<p><strong>3)切片:</strong></p>
<p>选择维度,创建新的子多维数据集。</p>
<p>下图说明了切片操作的执行方式:</p>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO4.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-3c9396e27d8092a5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<ul>
<li>使用Q1作为过滤器对尺寸时间进行切片。</li>
<li>完全创建了一个新的多维数据集。</li>
</ul>
<p><strong>Dice:</strong></p>
<p>类似于切片。 不同之处在于您选择了2个或更多维度,从而导致创建子多维数据集。</p>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO5.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-f3c650b6b722c198.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<p><strong>4)枢轴</strong></p>
<p>在Pivot中,您可以旋转数据轴以提供数据的替代表示。</p>
<p>在以下示例中,数据透视表基于项类型。</p>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO6.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-f132ba9f2e7fc613.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a> </p>
<h2 id="olap_2">OLAP系统的类型</h2>
<p>OLAP分层结构</p>
<p><a href="https://www.guru99.com/images/1/022218_1238_WhatisOLAPO7.png"><img alt="image" src="http://upload-images.jianshu.io/upload_images/12713060-57e19d5ee479ee02.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></a></p>
<table>
<thead>
<tr>
<th align="center"><strong>OLAP的类型</strong></th>
<th align="center"><strong>说明</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><strong>关系OLAP(ROLAP):</strong></td>
<td align="center">扩展的RDBMS以及多维数据映射,以执行标准的关系操作。</td>
</tr>
<tr>
<td align="center"><strong>多维OLAP(MOLAP)</strong></td>
<td align="center">在多维数据中实现操作。</td>
</tr>
<tr>
<td align="center"><strong>混合在线分析处理(HOLAP)</strong></td>
<td align="center">在HOLAP方法中,聚合总计存储在多维数据库中,而详细数据存储在关系数据库中。 这提供了ROLAP模型的数据效率和MOLAP模型的性能。</td>
</tr>
<tr>
<td align="center"><strong>桌面OLAP(DOLAP)</strong></td>
<td align="center">在桌面OLAP中,用户从本地或在桌面上从数据库下载部分数据并进行分析。 DOLAP的部署成本相对较低,因为与其他OLAP系统相比,它提供的功能非常少。</td>
</tr>
<tr>
<td align="center"><strong>Web OLAP(WOLAP)</strong></td>
<td align="center">可以通过Web浏览器访问OLAP系统的Web OLAP。 WOLAP是一个三层架构。 它由三个组件组成:客户端,中间件和数据库服务器。</td>
</tr>
<tr>
<td align="center"><strong>移动OLAP:</strong></td>
<td align="center">Mobile OLAP可帮助用户使用移动设备访问和分析OLAP数据</td>
</tr>
<tr>
<td align="center"><strong>空间OLAP:</strong></td>
<td align="center">创建SOLAP是为了便于管理地理信息系统(GIS)中的空间和非空间数据</td>
</tr>
</tbody>
</table>
<h2 id="rolap">ROLAP</h2>
<p>ROLAP使用关系数据库中存在的数据。 事实和维度表存储为关系表。 它还允许对数据进行多维分析,是增长最快的OLAP。</p>
<p><strong>ROLAP模型的优点:</strong></p>
<ul>
<li><strong>高数据效率。</strong> 它提供了高数据效率,因为查询性能和访问语言特别针对多维数据分析进行了优化。</li>
<li><strong>可扩展性。</strong> 这种类型的OLAP系统为管理大量数据提供了可扩展性,即使数据正在稳步增长。</li>
</ul>
<p><strong>ROLAP模型的缺点:</strong></p>
<ul>
<li><strong>对更高资源的需求:</strong> ROLAP需要高人力,软件和硬件资源的利用率。</li>
<li><strong>聚合数据限制。</strong> ROLAP工具使用SQL进行聚合数据的所有计算。 但是,处理计算没有设置限制。</li>
<li><strong>查询性能慢。</strong> 与MOLAP相比,此模型中的查询性能较慢</li>
</ul>
<h2 id="molap">MOLAP</h2>
<p>MOLAP使用基于数组的多维存储引擎来显示数据的多维视图。 基本上,他们使用OLAP多维数据集。</p>
<h3 id="_2">参考资料</h3>
<ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
<li>讨论qq群630011153 144081101</li>
<li><a href="https://china-testing.github.io/pptx.html">原文地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing">本文涉及的python测试开发库</a> 谢谢点赞!</li>
<li>[本文相关海量书籍下载](https://github.com/china-testing/python-api-tesing/blob/master/books.md</li>
<li>http://spark.apache.org/docs/2.1.0/api/python/pyspark.sql.html</li>
</ul>
<h2 id="olap_3">混合OLAP</h2>
<p>混合OLAP是ROLAP和MOLAP的混合体。 它提供了MOLAP的快速计算和ROLAP的更高可扩展性。 HOLAP使用两个数据库。</p>
<ol>
<li>聚合或计算数据存储在多维OLAP多维数据集中</li>
<li>详细信息存储在关系数据库中。</li>
</ol>
<p><strong>混合OLAP的好处:</strong></p>
<ul>
<li>这种OLAP有助于节省磁盘空间,并且它还保持紧凑,有助于避免与访问速度和便利性相关的问题。</li>
<li>Hybrid HOLAP使用立方体技术,可以更快地处理所有类型的数据。</li>
<li>ROLAP即时更新,HOLAP用户可以访问这些实时即时更新的数据。 MOLAP带来了数据的清理和转换,从而提高了数据的相关性。 这带来了两全其美。</li>
</ul>
<p><strong>混合OLAP的缺点:</strong></p>
<ul>
<li>更高的复杂性级别<strong>:</strong> HOLAP系统的主要缺点是它支持ROLAP和MOLAP工具和应用程序。 因此,它非常复杂。</li>
<li>潜在的重叠<strong>:</strong>特别是在功能方面存在重叠的可能性更高。</li>
</ul>
<h2 id="olap_4">OLAP的优点</h2>
<ul>
<li>OLAP是适用于所有类型业务的平台,包括计划,预算,报告和分析。</li>
<li>OLAP多维数据集中的信息和计算是一致的。 这是一个至关重要的好处。</li>
<li>快速创建和分析“假设”场景</li>
<li>轻松搜索OLAP数据库以获取广泛或特定的术语。</li>
<li>OLAP为业务建模工具,数据挖掘工具,性能报告工具提供构建块。</li>
<li>允许用户通过各种维度,度量和过滤器完成切片和切块立方体数据。</li>
<li>它有利于分析时间序列。</li>
<li>使用OLAP可以轻松找到一些集群和异常值。</li>
<li>它是一个功能强大的可视化在线分析处理系统,可提供更快的响</li>
</ul>
<h2 id="olap_5">OLAP的缺点</h2>
<ul>
<li>OLAP要求将数据组织成星形或雪花模式。 这些模式实现和管理起来很复杂</li>
<li>您不能在单个OLAP多维数据集中拥有大量维度</li>
<li>OLAP系统无法访问事务数据。</li>
<li>OLAP多维数据集中的任何修改都需要完全更新多维数据集。 这是一个耗时的过程</li>
</ul>
<h2 id="_3">摘要:</h2>
<ul>
<li>OLAP是一种技术,使分析师能够从不同的角度提取和查看业务数据。</li>
<li>OLAP的核心是OLAP多维数据集。</li>
<li>各种业务应用程序和其他数据操作都需要使用OLAP Cube。</li>
<li>OLAP中有五种主要的分析操作1)卷起2)向下钻取3)切片4)骰子和5)旋转</li>
<li>三种广泛使用的OLAP系统是MOLAP,ROLAP和Hybrid OLAP。</li>
<li>桌面OLAP,Web OLAP和移动OLAP是一些其他类型的OLAP系统。</li>
</ul>
<h3 id="_4">参考资料</h3>
<ul>
<li>工作日技术支持QQ群 630011153 144081101</li>
<li><a href="https://china-testing.github.io/data_warehouse_quick6.html">本文最新版本地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing">本文涉及的python测试开发库</a> 谢谢点赞!</li>
<li><a href="https://github.com/china-testing/python-api-tesing/blob/master/books.md">本文相关海量书籍下载</a></li>
<li>道家技术-手相手诊看相中医等钉钉群21734177 qq群:391441566 184175668 338228106 看八字、风水、手相、面相、舌相、抽签、体质识别。服务费50元每人次起。请联系钉钉或者微信pythontesting</li>
<li><a href="https://china-testing.github.io/testing_training.html">接口自动化性能测试线上培训大纲</a></li>
</ul>
</div><!-- /.entry-content -->
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="https://china-testing.github.io/testing_training.html">自动化性能接口测试线上及深圳培训与项目实战 qq群:144081101 591302926</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">pandas数据分析scrapy爬虫 521070358 Py人工智能pandas-opencv 6089740</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">中医解梦看相八字算命qq群 391441566 csdn书籍下载-python爬虫 437355848</a></li>
</ul>
</div><!-- /.blogroll -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
</body>
</html>