欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

OLTP Vs OLAP 博客分类: Common OLTPOLAP 

程序员文章站 2024-03-14 08:09:16
...

 OLTP vs. OLAP

We can divide IT systems into transactional (OLTP) and analytical (OLAP). In general we can assume that OLTP systems provide source data to data warehouses, whereas OLAP systems help to analyze it.

 

OLTP (On-line Transaction Processing) System deals with operational data. Operational data are those data  involved in the operation of a particular system.

 

Example: In a banking System, you withdraw amount through an ATM. Then account Number,ATM PIN Number,Amount  you are withdrawing, Balance amount in account etc are operational data elements.

 

OLAP (On-line Analytical Processing) System deals with Historical Data or Archival Data. Historical data are those data that are archived over a long period of time.

 

OLAP is also referred to as DSS (Decision Support System).

 

Example: If we collect last 10 years data about flight reservation, The data can give us many meaningful information such as the trends in reservation. This may give useful information like peak time of travel, what kinds of people are traveling in various classes (Economy/Business)etc.

 

The biggest difference between an OLTP and an OLAP system is the amount of data analyzed in a single transaction. Whereas an OLTP handles many concurrent users and queries touching only a single record or limited groups of records at a time, an OLAP system must have the capability to operate on millions of records to answer a single query.The following table summarizes the differences between OLPT and OLAP:

 

CHARACTERISTIC of OLTP
System scope/view            Single business process (Operational: ERP, CRM)
Data sources                     One
Data model                        Static
Dominant query type           Insert/update
Data volume per transaction Small
Data volume                       Small/medium
Referesh                            Immediate
Bulk load/insert/update       No
History data                       Not available
Response times                < 1 second
System availability            High “24/7″
Typical user                      Front office
Number of users               Large
Example:
What is the Salary of Mr.Shyam?
What is the address and email id of the person who is the head of science department?

CHARACTERISTIC of OLAP
System scope/view          Multiple business subjects (Decision Support System)
Data sources                   Many
Data model                      Dynamic
Dominant query type        Read
Data volume per transaction    Big
Data volume                    Large
Referesh                        Periodic
Bulk load/insert/update    Yes
History data                   Available
Response times             Can be in minutes
System availability          Relaxed “8/5″
Typical user                    Managers/ Executive
Number of users              Small/medium

 

 

 

OLTP Vs OLAP
            
    
    博客分类: Common OLTPOLAP 

 

 

 

 

- OLTP (On-line Transaction Processing) is characterized by a large number of short on-line transactions (INSERT, UPDATE, DELETE). The main emphasis for OLTP systems is put on very fast query processing, maintaining data integrity in multi-access environments and an effectiveness measured by number of transactions per second. In OLTP database there is detailed and current data, and schema used to store transactional databases is the entity model (usually 3NF).

- OLAP (On-line Analytical Processing) is characterized by relatively low volume of transactions. Queries are often very complex and involve aggregations. For OLAP systems a response time is an effectiveness measure. OLAP applications are widely used by Data Mining techniques. In OLAP database there is aggregated, historical data, stored in multi-dimensional schemas (usually star schema).


The following table summarizes the major differences between OLTP and OLAP system design.

 

OLTP System
Online Transaction Processing
(Operational System)

OLAP System
Online Analytical Processing
(Data Warehouse)

Source of data

Operational data; OLTPs are the original source of the data.

Consolidation data; OLAP data comes from the various OLTP Databases

Purpose of data

To control and run fundamental business tasks

To help with planning, problem solving, and decision support

What the data

Reveals a snapshot of ongoing business processes

Multi-dimensional views of various kinds of business activities

Inserts and Updates

Short and fast inserts and updates initiated by end users

Periodic long-running batch jobs refresh the data

Queries

Relatively standardized and simple queries Returning relatively few records

Often complex queries involving aggregations

Processing Speed

Typically very fast

Depends on the amount of data involved; batch data refreshes and complex queries may take many hours; query speed can be improved by creating indexes

Space Requirements

Can be relatively small if historical data is archived

Larger due to the existence of aggregation structures and history data; requires more indexes than OLTP

Database Design

Highly normalized with many tables

Typically de-normalized with fewer tables; use of star and/or snowflake schemas

Backup and Recovery

Backup religiously; operational data is critical to run the business, data loss is likely to entail significant monetary loss and legal liability

Instead of regular backups, some environments may consider simply reloading the OLTP data as a recovery method

  • OLTP Vs OLAP
            
    
    博客分类: Common OLTPOLAP 
  • 大小: 37.9 KB
相关标签: OLTP OLAP