Collection
zero Useful+1
zero

Online Transactions

Use computer network to connect business processing computer equipment or network distributed in different geographical locations with the network of business management center
Online Transaction Processing (OLTP) refers to the use of computer network , connect the business processing computer equipment or network distributed in different geographical locations with the network of the business management center, so that network node Can perform unified and real-time business processing activities or customer service
Industrial departments generally define OLTP system as a system that represents the status of a specific enterprise function at a specific point in time. This type of system includes a small stand-alone system that processes 1 to 2 transactions per minute, and a large-scale cluster host system that processes more than 30000 transactions per second. OLTP system is the traditional main part of database processing. A typical feature of an online transaction processing database is that it has a large number of concurrent users who actively complete the task of modifying data in real time. [1]
Chinese name
Online Transactions
Foreign name
online transaction processing
Alias
Database Transactions
Abbreviation
OLTP

principle

Announce
edit
A good OLTP platform can greatly shorten the application development time, improve the "robustness" of the system, and reduce the system maintenance costs.
OLTP platform is an application technology running on a highly reliable operating system. It requires the operating system to have multi task processing capability, excellent network processing capability, high data processing capability and good openness. Therefore, it is generally adopted Unix Operating system.
OLTP technology generally cooperates with database system (minicomputer or mainframe) or file system (fault-tolerant machine) to complete application tasks. The OLTP platform is composed of a group of processes and adopts the Client/Server structure. The processes integrate network communication, shared memory, pipeline, IPC (transaction instruction) and other communication modes. Data flows in an orderly manner among processes, and each process performs its own duties to jointly complete data processing.
OLTP platform application client/server technology: OLTP mode applications can generally be regarded as two-level client/server structures, and OLTP processes can be regarded as database server Or the client of other types of services. It is responsible for communicating directly with the database system. At the same time, the OLTP process is the server of its next level client. This structure allows fewer customers to communicate directly with the background database service process, while real data access customers are not limited by database licenses and network bottlenecks and far exceed the number of customers to communicate directly with the background service process. In this way, the load of background services is reduced, and the host can focus on the processing of factual data. [2]

Transaction Properties

Announce
edit
Atomicity
(Atomicity): defines the independent unit of work. If a transaction is distributed, all sub transactions that affect the data of the separation location must be executed together like a transaction. In order to maintain the consistency of data in multiple locations, the two-stage accreditation process described below needs to be used.
uniformity
(Consistency): Consistency is basically a requirement for a database to change from one state to another. The transaction supervisor must verify that all affected data are consistent.
isolation
(Isolation): The transaction must be executed in isolation until it is completed. During execution, it is not affected by other transactions.
Sustainability
(Durability): This property is carried out together with the final confirmation of the transaction. Once a transaction is verified to be correct for all affected systems, it is accepted and no longer needs to be rolled back.

characteristic

Announce
edit
OLTP (On Line Transaction Processing) belongs to the application category of client server structure. It has two characteristics: one is online That is, the client and server must be able to communicate in real time Client Initiate request until received The server The whole thing can be completed only after the confirmation and response of; The second is transaction (or transaction), that is, transaction between client and server cooperation [3]
OLTP is characterized by large transaction volume, simple transaction content and high repetition rate. A large number of data operations mainly involve some addition, deletion and modification operations, but generally only involve a few records in one or several tables. Therefore, OLTP is suitable for processing highly structured information. In terms of data organization, OLTP takes application as the core and is application driven. The data model adopts E-R model. [4]

design criteria

Announce
edit
In order to optimize the system performance, the following basic principles should be followed when designing and developing the 0LTP system:
(1) OLTP and decision support workload If an enterprise often needs to meet both its online business needs and some decision support or data refining needs, and each job has different requirements, often conflicting with each other, then in order to maximize the performance of each job, it is best to transfer the decision support data to an independent database. The decision support database is physically in the same system as the OLTP database, as long as the system has sufficient input/output capacity to maintain these two tasks. Of course, separating the two databases will also bring some problems. The system needs to take measures to keep the two databases data base Synchronization of.
(2) Data placement and filegroups The most important problem of an OLTP system is to maintain good input/output performance. Because a large number of users often access and modify the data of the OLTP system in a random manner, it is critical to maintain the input/output balance. To eliminate potential input/output bottlenecks, the system should distribute data to as many physical disks as possible. In the sQL server. The simplest way to distribute data is to use filegroups. Store data in multiple files and filegroups, allowing spanning multiple disk , multiple disk controllers or RAID systems create a database, which can improve the performance of the database.
(3) Adjust OLTP transactions A good principle applicable to the 0LTP system is to try to make the transaction as short as possible, which will minimize the duration of the query to obtain the lock, improve the synchronization and performance of the entire data, and avoid free form user input fields in the transaction, because if the transaction uses an unpredictable input form, even if the input is legal, However, it is also difficult to predict the range and quantity of data to be accessed by the query.
(4) Control data content Several strategies about database data can improve the performance of 0LTP system. Generally speaking, OLTP systems do not need or rarely need historical data or total data of their online tables. The rarely referenced data should be archived in a separate database, or moved from the frequently updated table to the table containing only historical data. This strategy makes tables and indexes as small as possible and will improve transaction performance.
(5) Data backup The essence of OLTP system is a continuous operation, which means that the system must be available 24 hours a day, 7 days a week. 0LTP system can be shut down, but it must be controlled within an absolute minimum range. Therefore, the system still needs to be backed up when its utilization rate is the lowest, so as to minimize the impact of the backup process on end users.
(6) Indexes For OLTP systems, Indexes The more you build, the better. In fact, you should avoid creating too many indexes for the table. Because every index created must be updated every time a row is added or an index field is modified. If too many unnecessary indexes are defined, it will change dramatically when the system updates a large amount of index data. [1]