Table of Contents
多维数据模型:
OLTP和OLAP
Home Database Mysql Tutorial OLAP简介(结合个人工作)

OLAP简介(结合个人工作)

Jun 07, 2016 pm 04:11 PM
personal Work Introduction combine

OLTP和OLAP 传统的数据库系统都是OLTP,只能提供数据原始的操作。不支持分析工作。 OLTP系统::执行联机事务和查询处理。一般超市进销存系统,功能:注册,记账,库存和销售记录等等, OLAP系统:数据分析与决策服务,组织不同式数据,满足不同用户需求。 区

OLTP和OLAP
传统的数据库系统都是OLTP,只能提供数据原始的操作。不支持分析工作。

OLTP系统::执行联机事务和查询处理。一般超市进销存系统,功能:注册,记账,库存和销售记录等等,

OLAP系统:数据分析与决策服务,组织不同格式数据,满足不同用户需求。

区别:

面向性。OLTP面向顾客,就是操作员,如超市收银员,银行柜台人员。OLAP面向市场,用于数据分析,分析人员包括数据分析员,做出决策的业务经理,或者策略制定部分。

数据内容:OLTP当前数据。OLAP历史数据的汇总与聚集。

数据库设计:OLTP用ER模型和面向应用数据库。OLAP 用星型或雪花模型,面向主题数据库设计。

还有访问模式:操作事务与只读的分析计算的区别。

等等

多维数据模型:

数据立方体cube:

给定维度的每个子集产生一个cuboid(称为方体)。这样可以在不同粒度上的汇总级别或分组(group by),来显示数据,整体上方体的格成为cube。

最低层汇总的方体称为基本方体(basecuboid)。出现某一个维度上的汇总后,则为非基本方体。

汇总到最高层的数据称为顶点方体(apexcuboid),如0-d方体,that’s to say,所有维度汇总到一起只剩一个cuboid,不能再汇总了。

顶点方体是最高泛化的方体。基本方体是最低特殊化的方体。

粗细粒度是不同程度上的汇总,涉及操作:

上卷(roll up),供应商称之为上钻drillup,沿着维度的概念分层向上

下钻(drill down)沿着维度的概念分层向下,需找更细粒度的数据。

切片:固定某一维度的取值,抽取这一维度下的子集。

切块:由多个维度上选择多个取值,抽取其所映射的子立方体。

旋转rotate: 也叫pivot数轴变换,简单说,二维表中的行列转置。到三维以上复杂,不同数轴之间的位置变换。说的高大上叫数据的视图角度转变

概念分层:低层概念(如城市)映射到更高的层次概念(如国家)。从低到高叫泛化(generalize),从高到低叫特殊化(specialize)。

模式分层(schema hierarchy)概念分层为数据库模式中属性的全序或偏序。

集合分组分层(set-grouping hierarchy)给定维度的属性值的离散化或分组。如年龄age属性离散化为young、mid、old三个子集,分组group by sex的男女子集。

数据立方体的实现:

使用数据仓库的模型是多维模型,目前经常的有:

星型模型:一个大而全,且无冗余的事实表(fact);以及不同分析维度上的维度表(dimension)。维度表围绕事实表,通过每个维度自身的dimension key(所有可能范围内的取值)关联。

雪花模型:星型模型的进一步细化,即将其中包含多个值的维度表进行规范化的(就是将维度表包含的某个值提取出来,作为新的dimension表),以便减少冗余。

这样把数据进一步分解到附加表中,易于维护,省空间(防止维度灾难),但查询时需要更多关联操作,降低时效性。

事实星座模型(fact constellation)or 星系模式(galaxy schema):多个fact tableshare all dimesioms(共享维度表)。

比如我的设计的data warehouse。Workbench

Cube定义

Dimension定义

一般的data warehouse 都是用fact constellation。

指标Index

度量measure

维度灾难(curse of dimensionality),当维度过多(特征空间非常复杂),那么维度之间的关联计算就变得非常多,而维度概念分层会加重灾难。反应在cube中,就是不同维度的计算就会产生巨大的数据,就是预计算cube中所有的方体(子cube),存储空间是爆炸似增长。N维会有2n个子cube,加上概念分层Li,则方体总数

预计算:1不物化(no materialization)2全物化(full materialization)3部分物化(partial materialization)

OLTP和OLAP

OLTP系统::执行联机事务和查询处理。一般超市进销存系统,功能:注册,记账,库存和销售记录等等,

OLAP系统:数据分析与决策服务,组织不同格式数据,满足不同用户需求。

区别:

面向性。OLTP面向顾客,就是操作员,如超市收银员,银行柜台人员。OLAP面向市场,用于数据分析,分析人员包括数据分析员,做出决策的业务经理,或者策略制定部分。

数据内容:OLTP当前数据。OLAP历史数据的汇总与聚集。

数据库设计:OLTP用ER模型和面向应用数据库。OLAP 用星型或雪花模型,面向主题数据库设计。

还有访问模式:操作事务与只读的分析计算的区别。

等等

多维数据模型:

数据立方体cube:

给定维度的每个子集产生一个cuboid(称为方体)。这样可以在不同粒度上的汇总级别或分组(group by),来显示数据,整体上方体的格成为cube。

最低层汇总的方体称为基本方体(basecuboid)。出现某一个维度上的汇总后,则为非基本方体。

汇总到最高层的数据称为顶点方体(apexcuboid),如0-d方体,that’s to say,所有维度汇总到一起只剩一个cuboid,不能再汇总了。

顶点方体是最高泛化的方体。基本方体是最低特殊化的方体。

粗细粒度是不同程度上的汇总,涉及操作:

上卷(roll up),供应商称之为上钻drillup,沿着维度的概念分层向上

下钻(drill down)沿着维度的概念分层向下,需找更细粒度的数据。

切片:固定某一维度的取值,抽取这一维度下的子集。

切块:由多个维度上选择多个取值,抽取其所映射的子立方体。

旋转rotate: 也叫pivot数轴变换,简单说,二维表中的行列转置。到三维以上复杂,不同数轴之间的位置变换。说的高大上叫数据的视图角度转变

概念分层:低层概念(如城市)映射到更高的层次概念(如国家)。从低到高叫泛化(generalize),从高到低叫特殊化(specialize)。

模式分层(schema hierarchy)概念分层为数据库模式中属性的全序或偏序。

集合分组分层(set-grouping hierarchy)给定维度的属性值的离散化或分组。如年龄age属性离散化为young、mid、old三个子集,分组group by sex的男女子集。

数据立方体的实现:

使用数据仓库的模型是多维模型,目前经常的有:

星型模型:一个大而全,且无冗余的事实表(fact);以及不同分析维度上的维度表(dimension)。维度表围绕事实表,通过每个维度自身的dimension key(所有可能范围内的取值)关联。

雪花模型:星型模型的进一步细化,即将其中包含多个值的维度表进行规范化的(就是将维度表包含的某个值提取出来,作为新的dimension表),以便减少冗余。

这样把数据进一步分解到附加表中,易于维护,省空间(防止维度灾难),但查询时需要更多关联操作,降低时效性。

事实星座模型(fact constellation)or 星系模式(galaxy schema):多个fact tableshare all dimesioms(共享维度表)。

比如我的设计的data warehouse。Workbench

Cube定义

Dimension定义

一般的data warehouse 都是用fact constellation。

指标Index

度量measure

维度灾难(curse of dimensionality),当维度过多(特征空间非常复杂),那么维度之间的关联计算就变得非常多,而维度概念分层会加重灾难。反应在cube中,就是不同维度的计算就会产生巨大的数据,就是预计算cube中所有的方体(子cube),存储空间是爆炸似增长。N维会有2n个子cube,加上概念分层Li,则方体总数

预计算:1不物化(no materialization)2全物化(full materialization)3部分物化(partial materialization)

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Introduction to methods for individuals to join corporate WeChat Introduction to methods for individuals to join corporate WeChat Mar 26, 2024 am 10:16 AM

1. First, open the enterprise WeChat software you downloaded on your mobile phone. When logging in, there are two ways to choose: one is to use WeChat ID, the other is to use mobile phone number. 3. At this time, the enterprise administrator needs to add your mobile phone number in the background, and then Enterprise WeChat will identify the enterprise based on your mobile phone number. Then display your business and click the Enter Business option below. 4. Then you can enter the use of functions in the software. It can be said that the most important thing is that your mobile phone number must be added to the enterprise by the administrator, otherwise it will not be available.

Python ORM Performance Benchmark: Comparing Different ORM Frameworks Python ORM Performance Benchmark: Comparing Different ORM Frameworks Mar 18, 2024 am 09:10 AM

Object-relational mapping (ORM) frameworks play a vital role in python development, they simplify data access and management by building a bridge between object and relational databases. In order to evaluate the performance of different ORM frameworks, this article will benchmark against the following popular frameworks: sqlAlchemyPeeweeDjangoORMPonyORMTortoiseORM Test Method The benchmarking uses a SQLite database containing 1 million records. The test performed the following operations on the database: Insert: Insert 10,000 new records into the table Read: Read all records in the table Update: Update a single field for all records in the table Delete: Delete all records in the table Each operation

The perfect combination of Swoole and Laravel framework The perfect combination of Swoole and Laravel framework Jun 13, 2023 pm 08:36 PM

With the rapid development of the Internet, the demand for web applications is also increasing. For web developers, choosing an excellent web application framework is essential. In the field of PHP, Laravel has become a popular web application framework. However, for high-concurrency and high-load scenarios, PHP's traditional CGI mode web applications are not very suitable. At this time, a high-performance network communication framework is particularly important, and Swoole is a very excellent

Application of Python ORM in big data projects Application of Python ORM in big data projects Mar 18, 2024 am 09:19 AM

Object-relational mapping (ORM) is a programming technology that allows developers to use object programming languages ​​to manipulate databases without writing SQL queries directly. ORM tools in python (such as SQLAlchemy, Peewee, and DjangoORM) simplify database interaction for big data projects. Advantages Code Simplicity: ORM eliminates the need to write lengthy SQL queries, which improves code simplicity and readability. Data abstraction: ORM provides an abstraction layer that isolates application code from database implementation details, improving flexibility. Performance optimization: ORMs often use caching and batch operations to optimize database queries, thereby improving performance. Portability: ORM allows developers to

Introduction to Yii Framework: Understand the core concepts of Yii Introduction to Yii Framework: Understand the core concepts of Yii Jun 21, 2023 am 09:39 AM

The Yii framework is a high-performance, highly scalable, and highly maintainable PHP development framework that is highly efficient and reliable when developing Web applications. The main advantage of the Yii framework is its unique features and development methods, while also integrating many practical tools and functions. The core concept of the Yii framework, the MVC pattern, Yii adopts the MVC (Model-View-Controller) pattern, which is a pattern that divides the application into three independent parts, namely the business logic processing model and the user interface presentation model.

Get an in-depth understanding of 7 commonly used Java design patterns Get an in-depth understanding of 7 commonly used Java design patterns Dec 23, 2023 pm 01:01 PM

Understanding Java Design Patterns: An introduction to 7 commonly used design patterns, specific code examples are required. Java design patterns are a universal solution to software design problems. It provides a set of widely accepted design ideas and codes of conduct. Design patterns help us better organize and plan the code structure, making the code more maintainable, readable and scalable. In this article, we will introduce 7 commonly used design patterns in Java and provide corresponding code examples. Singleton Patte

Explore the perfect combination of PHP and blockchain Explore the perfect combination of PHP and blockchain Mar 27, 2024 pm 02:12 PM

Exploring the perfect combination of PHP and blockchain As blockchain technology matures and its application scope continues to expand, people begin to try to combine traditional programming languages ​​with blockchain to achieve more types of applications. In this context, PHP language, as a widely used network programming language, has also begun to explore its combination with blockchain technology. This article will focus on the combination of PHP language and blockchain technology, which will involve specific code examples for readers to better understand. What is blockchain? First, let's

What jobs can I apply for in 2023 with my Java skills? What jobs can I apply for in 2023 with my Java skills? Sep 21, 2023 am 11:41 AM

When we talk about programming languages ​​and jobs, one programming language that comes to our mind is Java. Most companies around the world use Java. It's popular and there are many job opportunities. If you want to get a job with the help of Java skills in 2023, then this is good for you as Java skills can get you a job quickly. Plus, it can quickly advance your career. There is no magic trick that will make you find a job quickly. But your skills are like magic to you. Choose a job that satisfies you and a good environment that can greatly enhance your career. If you are a newbie and have experience, Java also provides you with a good job. Many companies use Java as the main program for their development. it

See all articles