Difference Between OLTP and OLAP

Difference Between OLTP and OLAP

Online transaction processing OLTP (on-line transaction processing) is mainly to perform basic daily transaction processing, such as addition, deletion, and modification of database records. For example, a transaction record in a bank is a typical transaction. 
The characteristics of OLTP generally include: 
1. High real-time requirements. I remember that when I was in college, remittances from banks in different places took the next day to arrive, but now the rhythm of arrivals is every minute, which shows that the real-time processing capabilities of banks have been greatly enhanced. 
2. The amount of data is not very large, the amount of data on the production database is generally not too large, and the corresponding data processing and transfer will be done in time. 
3. Transactions are generally deterministic. For example, the amount of bank deposits and withdrawals must be deterministic, so OLTP accesses deterministic data. 
4. High concurrency, and the ACID principle is required. For example, two people operate a bank card account at the same time, such as tens of thousands of QPS requests during the spike activity of a large shopping website.

OLAP (On-Line Analytical Processing) is the main application of the data warehouse system. It supports complex analysis operations, focuses on decision support, and provides intuitive and easy-to-understand query results. A typical application is a complex dynamic reporting system.

The characteristics of OLAP are generally as follows: 
1. The real-time requirements are not very high. For example, the most common application is to update the data at the sky level, and then generate the corresponding data report. 
2. The amount of data is large, because OLAP supports dynamic query, so users may need to collect a lot of data to get the information they want to know, such as time series analysis, etc., so the amount of data processed is very large; 
3. The focus of OLAP systems is to provide decision support through data, so queries are generally dynamic and custom. So in OLAP, the concept of dimension is particularly important. Generally, all dimensional data that users care about will be stored in the corresponding data platform.

Summary: 
OLTP is online transaction processing, which is the relational database we often say, additions, deletions, and changes are what we often apply, which is the basis of the database; TPCC (Transaction Processing Performance Council) belongs to this category. 
OLAP is online analytical processing, which is the core of data warehouse. The so-called data warehouse is an analytical database for a large amount of data that has been formed by OLTP, which is used to process important decision-making information such as business intelligence and decision support; data warehouse It is the processing and analysis of historical data after the database is applied to a certain program, with more reads and fewer updates. TPCH belongs to this category. 
With the advent of the era of big data, for OLAP, column storage mode or nosql mode may have more advantages than traditional row storage mode.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325224257&siteId=291194637