OLAP vs OLTP: what makes the difference
OLAP vs OLTP: what makes the difference
OLPT and OLAP are complementingtechnologies. You can't live without OLTP: it runs your business dayby day. So, using getting strategic information from OLTP is usuallyfirst “quick and dirty” approach, but can become limiting later.
This post explores keydifferences between two technologies.
OLTPstands for On LineTransaction Processing and is a datamodeling approach typically used to facilitate and manage usual business applications.
Most of applications you see and use areOLTP based.
OLAPstands for On LineAnalytic Processing and is an approach to answer multi-dimensional queries. OLAP was conceived forManagement Information Systems and Decision
Support Systems but isstillwidely underused: every day I see too much people makingout business intelligence from OLTP data!
With the constant growth of dataanalysis and business intelligence applications (now even in smallbusiness) understanding OLAP nuances and benefits is a must if youwant provide valid and useful analytics to management.
The following table summarized maindifferences between OLPT and OLAP:
|
OLTP |
OLAP |
|
|
Application |
Operational: ERP, CRM, legacy apps, ... |
Management Information System, Decision Support System |
|
Typical users |
Staff |
Managers, Executives |
|
Horizon |
Weeks, Months |
Years |
|
Refresh |
Immediate |
Periodic |
|
Data model |
Entity-relationship |
Multi-dimensional |
|
Schema |
Normalized |
Star |
|
Emphasis |
Update |
Retrieval |
Let's go straight to each key points.
Horizon
OLTP databases store “live”operational information. An invoice, for example, once paid, ispossibly moved to some sort of backup store, maybe upon period closing. On the other side5-10 strategic analysis are usual to identify trends. Extending
life of operational data, would not be enough (in addition to possibly impacting performance).
Even keeping that data indexedand online for years, you would surely face compatibility problems.It is quite improbable that your current invoice fields andreferences are the same of 10 years ago!
But neither performance norcompatibility are the biggest concern under large horizon. Realproblem is business dynamics. Today business constantly change andthe traditional entity-relationship approach is too vulnerable tochanges. I will better explore this
point in next post with apractical example.
Refresh
OLPT requires instant update. When youcash some money from an ATM you balance shall be immediately updated.OLAP has not such requirement. Nobody needs instant information tomake strategic business decision.
This allows OLAP data to be refresheddaily. This means extra timing and resources for cleansing andaccruing data. If, for example, an invoice was canceled, we wouldn'tlike to see its value first inflating sales figures and later reverted.
More time and more resources would alsoallow better indexing to address huge tables covering the extendedhorizon.
Data Model & Schema
This is possibly the most evidentdifference between two approaches. OLTP perfectly fits traditionalentity-relationship or object-oriented models. We usually refer toinformation as attributes related to entities, objects or classes,like product price, invoice
amount or client name. Mapping can bewith a simple, one argument function:
product » price
invoice » amount
client » name
Such functions can be implementedthough classic tables, one row per instance, whereeach attribute ismapped to one column.
Now, if you listen to typical businessquestions you perceive a different requirement:
What is gross margin by product category in Europe and Asia?
What's our current inventory by product and warehouse?
Which was the evolution of return rate of different products acquired by different suppliers?
Are mapped as functions of multiplearguments (left side):
Product category × Region » Grossmargin
Product × Warehouse » Inventory
Supplier × Time × Product » Returnrate
Mapping attributes to columns do not work any more in this case: a multi-dimensionalapproach is required.
Tables do not naturally support multi-dimensional approachbut relational databases are still the most widely used, proven andreliable approach today available. Reliability and performance is amust if we think in storing terabytes of data along years.
The solution is use an hybridapproach based sitting on conventional relational technology. Thismodel employs so calledstar-schema instead of traditionalnormalization.
Emphasis
OLPT emphasis is on update. Transactionlevel isolation assures that database is always in a consistentstate. This can imply in some overhead to coordinate concurrentupdates but is necessary even in small applications.
On the other side OLAP can be updatedby periodic (daily) processes that work in standalone mode thusconsistency can be assured through update process.
But OLAP faces another challenge:retrieval. Suppose a telecom executive asking how much was billedlast year in communications from USA to Japan. Can you figure howmuch time would it take to go ever each individual call to get theresult?
OLTP emphasis is on retrieval andit organizes data to return result of ad hoc inquiries in a reasonableamount of time.
Two worlds, two obstacles
So, in practice you need two differentdatabases, one for OLAP and another one for OLTP. The second one isusually called a Data Warehouse and is a must if you want to makeserious business intelligence.
But, if this is best solution why itisn't widely adopted? Why so many people are still trying to use BItools on traditional OLTP database? These are the most common reasons I have seen in practice:
Doctrine. For years data modelers have been educated to normalize data and for years they have been told that data redundancy is first deadly sin.Habit is worst enemy of OLAP approach. Even when a star schema was officially
adopted for BI applications, I have seen an irresistible attraction tosnowflaking (I'll explain this term in next posts).
Ingenuity. “Let's buy a good tool that will do the magic with little effort!”. This seems quite a better alternative to creating and feeding a second database. It doesn't work, still can be a valid solution if, as IT manager, you
have just opened your second envelope. In next post I will illustrate with practical example what will probably go wrong.
Building a relational data warehouse isactually not so difficult, neither exclusively applicable tomulti-billion corporations or terabytes of data and, infuture
posts,I pretend to show a pragmatic and agile approach.
For further detail on OLAP technology Isuggest to read: OlapSolutions - 2nded.
By Erik Tomsen, also available at Amazon.
原文地址:http://www.cbsolution.net/techniques/ontarget/olap_vs_oltp_what_makes
下图引自另外一个网页,点击图片跳转

OLAP vs OLTP: what makes the difference的更多相关文章
- OLAP、OLTP的介绍和比较 via csdn
OLAP.OLTP的介绍和比较 数据处理大致可以分成两大类: OLTP(On-Line Transaction Processing)联机事务处理 也称为面向交易的处理系统,其基本特征是顾客的原始数据 ...
- OLAP和OLTP的区别(基础知识) 【转】
联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响,OLAP作为一类产品同联机事务处理 ( ...
- OLAP和OLTP的区别
OLAP(On-Line Analytical Processing)联机分析处理,也称为面向交易的处理过程,其基本特征是前台接收的用户数据可以立即传送到计算中心进行处理,并在很短的时间内给出处理结果 ...
- day 59 MySQL之锁、事务、优化、OLAP、OLTP
MySQL之锁.事务.优化.OLAP.OLTP 本节目录 一 锁的分类及特性 二 表级锁定(MyISAM举例) 三 行级锁定 四 查看死锁.解除锁 五 事务 六 慢日志.执行计划.sql优化 七 ...
- olap和Oltp(转)
OLAP和OLTP的区别(基础知识) 联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响, ...
- OLAP、OLTP的介绍和比较
OLTP与OLAP的介绍 数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical ...
- Oracle OLAP 与 OLTP 介绍
文章出处:http://blog.csdn.net/tianlesoftware/article/details/5794844 感谢原作者的分享. 数据处理大致可以分成两大类:联机事务处理OLTP( ...
- OLAP和OLTP基础知识
数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical Processing).O ...
- OLAP和OLTP的区别(基础知识)
联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响,OLAP作为一类产品同联机事务处理 ( ...
随机推荐
- win10系统更新补丁时进度条一直卡在0%不动的解决方案
为了能够让win10系统更加安全稳定,很多用户都会时不时为自己的电脑安装补丁.不过,部分用户在为win10系统更新补丁时,却会遇到进度条一直卡在0%不动的问题.这该怎么办呢?下面,小编就告诉大家解决该 ...
- hibernate对象关系实现(二)一对一
双向一对一以部门和经理为例: a.部门和经理类中各自由对方的引用:(省略了get/set方法) b.数据库两种方式实现:一种(b.1)是外键映射,并将外键添加唯一约束(至于哪个对象的主键做外键,可随意 ...
- 转:HTTP 301 跳转和302跳转的区别
301和302 Http状态有啥区别?301,302 都是HTTP状态的编码,都代表着某个URL发生了转移,不同之处在于: 301 redirect: 301 代表永久性转移(Permanently ...
- android源码解析(十七)-->Activity布局加载流程
版权声明:本文为博主原创文章,未经博主允许不得转载. 好吧,终于要开始讲讲Activity的布局加载流程了,大家都知道在Android体系中Activity扮演了一个界面展示的角色,这也是它与andr ...
- svn设置提交忽略某些文件或文件夹
在svn客户端,想设置忽略提交.class文件,通过 properties > New > Other 添加一个忽略的属性,,还是不行:部分屏蔽了,部分class还是在列表中 再次参考了一 ...
- Linux大文件分割split和合并cat使用方法
本文主要介绍linux下两个命令:split和cat.其中,相信大家都熟悉cat命令,一般用来查看一个文件的内容,但是它还其它的功能,比如这里要介绍的文件合并功能,它可把多个文件内容合并到一个文件中. ...
- 转!!sql server 数据库 索引的原理与应用
索引的概念 索引的用途:我们对数据查询及处理速度已成为衡量应用系统成败的标准,而采用索引来加快数据处理速度通常是最普遍采用的优化方法. 索引是什么:数据库中的索引类似于一本书的目录,在一本书中使用目录 ...
- hiho_1066_并查集
题目大意 给出N个操作,每个操作可能为两种类型之一: 1. 认定两个人属于同一个组织 2. 查询两个人是否是同一个组织 要求对于每个操作类型2,给出结果,即查询的两个人是否属于同一个组织.其中,任何人 ...
- 颜色缩减(带Trackbar)【从毛星云Opencv3编程入门P75 P111例程改编】
最近学了点opencv,买了毛星云的书,大力推荐哦. 颜色缩减,自己加了个Trackbar看起来更直观一些. 我一般自己先看一遍程序,脑子里有个大概印象了,再自己写一遍,这样出了错误会印象更深刻. 1 ...
- 自定义ExpressionBuilder
ExpressionBuilder的常见说明见https://msdn.microsoft.com/zh-cn/library/System.Web.Compilation.ExpressionBui ...