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:

  1. 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).

  1. 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的更多相关文章

  1. OLAP、OLTP的介绍和比较 via csdn

    OLAP.OLTP的介绍和比较 数据处理大致可以分成两大类: OLTP(On-Line Transaction Processing)联机事务处理 也称为面向交易的处理系统,其基本特征是顾客的原始数据 ...

  2. OLAP和OLTP的区别(基础知识) 【转】

    联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响,OLAP作为一类产品同联机事务处理 ( ...

  3. OLAP和OLTP的区别

    OLAP(On-Line Analytical Processing)联机分析处理,也称为面向交易的处理过程,其基本特征是前台接收的用户数据可以立即传送到计算中心进行处理,并在很短的时间内给出处理结果 ...

  4. day 59 MySQL之锁、事务、优化、OLAP、OLTP

    MySQL之锁.事务.优化.OLAP.OLTP   本节目录 一 锁的分类及特性 二 表级锁定(MyISAM举例) 三 行级锁定 四 查看死锁.解除锁 五 事务 六 慢日志.执行计划.sql优化 七 ...

  5. olap和Oltp(转)

    OLAP和OLTP的区别(基础知识) 联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响, ...

  6. OLAP、OLTP的介绍和比较

    OLTP与OLAP的介绍 数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical ...

  7. Oracle OLAP 与 OLTP 介绍

    文章出处:http://blog.csdn.net/tianlesoftware/article/details/5794844 感谢原作者的分享. 数据处理大致可以分成两大类:联机事务处理OLTP( ...

  8. OLAP和OLTP基础知识

    数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical Processing).O ...

  9. OLAP和OLTP的区别(基础知识)

    联机分析处理 (OLAP) 的概念最早是由关系数据库之父E.F.Codd于1993年提出的,他同时提出了关于OLAP的12条准则.OLAP的提出引起了很大的反响,OLAP作为一类产品同联机事务处理 ( ...

随机推荐

  1. Java Abstract class and Interface

    Abstract Class 在定义class的时候必须有abstract 关键字 抽象方法必须有abstract关键字. 可以有已经实现的方法. 可以定义static final 的常量. 可以实现 ...

  2. 关于Spring定时任务(定时器)用法

    Spring定时任务的几种实现 Spring定时任务的几种实现 一.分类 从实现的技术上来分类,目前主要有三种技术(或者说有三种产品): 从作业类的继承方式来讲,可以分为两类: 从任务调度的触发时机来 ...

  3. Python学习(15)文件/IO

    目录 Python 文件I/O 打印到屏幕 读取键盘输入 打开和关闭文件 File对象属性 文件定位 重命名和删除文件 Python的目录 Python 文件I/O 本章只讲述所有基本的的I/O函数, ...

  4. 用命令访问D:\python学习\wendjia教程\aa.py

    用命令访问D:\python学习\wendjia教程\aa.py d:                                -----------切换到D盘 cd python学习\wend ...

  5. Service 与 Thread 的区别

    很多时候,你可能会问,为什么要用 Service,而不用 Thread 呢,因为用 Thread 是很方便的,比起 Service 也方便多了,下面我详细的来解释一下. 1). Thread:Thre ...

  6. [css] 认识margin

    原文链接http://www.zhangxinxu.com/wordpress/2009/08/css-margin%E7%9A%84%E7%9B%B8%E5%85%B3%E5%B1%9E%E6%80 ...

  7. 高质量JavaScript代码书写基本要点

    翻译-高质量JavaScript代码书写基本要点 by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/ ...

  8. Http报头Accept与Content-Type的区别

    Http报头Accept与Content-Type的区别 1.Accept属于请求头, Content-Type属于实体头. Http报头分为通用报头,请求报头,响应报头和实体报头. 请求方的http ...

  9. 原创: 开题报告中摘要部分快速将一段文字插入到word的表格中

    开题报告的摘要是表格形式,之前需要一个一个字的敲入,十分不方便修改. 所以百度了一下方法.现总结如下: 达到的效果 1 将这段文字复制粘贴到word中,在word文件中的每一个字与字之间插入空格.如何 ...

  10. 转: 浅谈C/C++中的指针和数组(二)

    转自:http://www.cnblogs.com/dolphin0520/archive/2011/11/09/2242419.html 浅谈C/C++中的指针和数组(二) 前面已经讨论了指针和数组 ...