Overview of OLTP
OLTP or Online Transaction Processing is a type of data processing approach where the transactions play a major role in data manipulation in the database. This provides facts and statistics for the Business Intelligence required for the business decision-making process. OLTP is usually applied on applications related to e-commerce, online banking, online shopping, sales and service platforms, etc. This type of data processing is known for its high performance, faster accessibility, and reliable & consistent data.
OLTP supports only those operations that are already defined. For example, In the case of online airline booking, we need to book an airline that is related to insertion in the database. OLTP ensures the availability in the cart and concurrency in case a large number of users are accessing the same website at the same time. This is done using the following characteristics of OLTP:-
- 3NF databases – It uses fully normalized databases to ensure the consistency and optimization of all the transactional tasks.
- Predefined operations – It strictly performs only the predefined operations only on a small number of records.
- Updation of databases is directly accessible to end-users.
- A small number of records – It processes only a handful of records only. For example – ‘Retrieving the money from ATM.’
- Maintaining historical data- It stores the records of the last few days or a week to successfully perform the transactions.
How does OLTP make working so easy?
- Online transaction process concerns concurrency and atomicity.
When two users trying to access the same data in a particular database system, none of them will be able to change the data until and unless one user has finished processing. In general, one user will process, and one will wait while making any amendments. This is coined as Concurrency controls.
Atomicity controls guarantee that in a transaction, all steps are completed successfully as a group. That is, if any steps between the transaction fail, all other steps must fail also.
- OLTP works only on normalized databases with a small number of records at a time in a decentralized system that optimizes all the transactional tasks being predefined to the system. OLTP stores less historical data, which makes it efficient.
- As it only performs the task related to insertion/deletion, it maintains the consistency and concurrency of the data in the databases, which always ensures the availability of the databases.
What can you do with OLTP?
- Its goal is availability, speed, concurrency, and recoverability.
- A large number of users can conduct short transactions using OLTP systems.
- We can design such systems that help in performing operations whose database queries are usually simple, require less than second response times, and return comparatively fewer records.
Working with OLTP
- Online transaction processing (OLTP) involves gathering information as input, processing the data according to needs, and updating data to reflect the processing information. It is used in a client-server system.
- For various decentralized database systems, OLTP brokering programs distribute transactions processes among multiple computers on a network.
- OLTP is also carried into the service-oriented architecture (SOA) and Web services.
Some crucial segments that affect the performance of OLTP are
- Rollback segments: Rollback segments are the parts of the database that record the transactions that are rolled back. This ensures consistency in the database among several users. It also records the transactions rolled back and helps in the recovery of databases to avoid loss.
- Clusters: It is a schema that has records of the columns that are common among different tables, which will further help in clustering. These clustering operations help in optimizing join operations.
- Discrete transactions: The transactions that revert all the changes made into the database until the last commit refers to discrete transactions. These are crucial in the case of short and non-distributed transactions.
- Blocksize: The size of the block should be multiple of the Operating system size to avoid non-required I/O operations.
- Buffer cache size: It is used to avoid unnecessary resource utilization by SQL statements.
- Dynamic allocation: It refers to the space allocated to tables and rollback segments
- Transaction processing: It is used to coordinate different transactions over multiple computing devices. It is similar to an operating system to maintain multithreaded operations.
- Partition (database): It is used to increase performance for parts that have transactions on a regular basis and still maintains availability and security.
- Database tuning: An OLTP system can maximize its performance as efficiently and rapidly as possible using database tuning.
1. Concurrency: OLTP ensures transactions made into the database should not deplete the concurrency between different users. Otherwise, the users will not be able to change, or he has to wait for other users to complete so that there is not a deadlock situation.
2. Acid Compliance: ACID means a database that holds properties such as atomicity, consistency, isolated and durable. This property is an essential part of the database that records the transactions made on money. One failure could lead to much big loss. Thus OLTP ensures there is no loss of transactions and maintains the ACID property to its databases.
3. Availability: The latest data is available to all the users as concurrency is properly maintained.
4. Integrity: As the normalized database is maintained, integrity holds at every step in the case of OLTP transactions.
For such concurrency, availability, and faster transactions, OLTP often requires support for transactions that include many company’s networks. Thus in today’s era, we require a more decentralized system.
Some examples of OLTP systems include
- Order entry
- Retail sales
- Financial transaction systems
- CICS – Sometimes, OLTP depends on transaction management software and database optimization tactics to process a greater number of simultaneous OLTP-oriented databases.
Why should we use OLTP?
1. To use less paper and make a faster, more accurate prediction of revenues and expenses.
2. The system that requires offline maintenance makes a good requirement for online transaction processing.
3. Availability, concurrency, and atomicity of data are much more important.
Why do we need OLTP?
We need OLTP to perform the tasks which are often performed by the system and require only a smaller number of records. The tasks are related to the insertion, update or deletion of data in databases. Consistency and concurrency are required to perform such tasks, which ensures its greater availability. OLTP maintains normalized databases and decentralized systems, which provides greater availability and consistency. This also ensures maintaining concurrency among the database. OLTP often works differently in the case of batch processing and grid computing. On the contrary, OLAP(Online Analytic Processing) works on a greater number of tasks related to complex on databases used in main business intelligence tasks.
OLTP is a type of data processing where a large number of users make transactions, i.e. updation, insertion or deletion, that deals with a smaller number of records. It always ensures concurrency, atomicity, availability of data using normalized databases, decentralized systems, and less historical data.
This has been a guide to What is OLTP. Here we discussed the Basic concepts, Definitions, and Advantages of OLTP. You can also go through our other suggested articles to learn more –