What is OLTP (Online Transaction Processing)? : 3 Critical Aspects

• June 1st, 2021

OLTP | Hevo Data

OLTP is an operational system that focuses on transaction-oriented data processing following a 3-tier architecture. It primarily deals with the real-time execution of a large number of transactions by numerous users.

While administering the day-to-day transactions of an organization, OLTP focuses on maintaining data integrity across multi-access environments, query processing, and effectiveness (total number of transactions per second). The full form of OLTP is Online Transaction Processing.

This article talks about what is OLTP, and its key aspects, namely its features, benefits, and architecture in vivid detail. 

Table of Contents

What is OLTP?

OLTP: OLTP Working Diagram | Hevo Data
Image Source

Before diving into the key aspects of OLTP, you need to have an idea of database transactions. A database transaction represents an insertion, deletion, query, or change in the data within a database.

OLTP transactions are generally very specific to the task performed. These could be a single record or a small collection of records. 

The defining characteristic of this type of database transaction is its indivisibility or atomicity. This means that the transaction cannot remain in an intermediate or pending stage, it either fails or succeeds as a whole. 

What are the Key Features of OLTP?

Here are the key features of OLTP systems that elicit their importance:

1) Emphasis on Rapid Processing

OLTP emphasizes the effectiveness (measured as the total number of transactions carried out /second) of transactional processing. This ensures a very fast response time (measured in milliseconds).  

2) Processing a Large Number of Simple Transactions

It can carry out all different types of database transactions. These are mainly financial transactions like ATM transactions, online banking, airline and hotel bookings, and in-store and eCommerce purchases. For each one of these, the database transaction is maintained as a record of the corresponding financial transaction. It can also be used to drive non-financial database exchanges namely text messages and password changes.  

3) Multi-User Access while Ensuring Data Integrity

These systems depend on concurrency algorithms to ensure that all transactions are carried out in the proper order. It also ensures that the data cannot be changed by any two users at the same time.

This is useful for online booking systems since it prevents people from double-booking the same room. It also protects the holders of jointly held bank accounts from accidental overdrafts. 

4) Availability of Indexed Datasets

Indexed DataSets can be used for retrieval, querying, and rapid searching among other uses. This makes the availability of Indexed Datasets an important feature of OLTP systems.

5) Data Backup Available at all Times

These systems process a voluminous amount of concurrent transactions. This means significant and costly repercussions during situations like downtime and data loss. Therefore, these systems must have a complete data backup for every moment in time.

Through constant incremental backups and frequent regular backups, these systems can continue to function efficiently.

6) Data Maintenance Operations

These operations run in the background while users continue to work on other tasks. Data Maintenance operations either run on an ad hoc basis or periodically, for example, Data Updating and Reporting Programs. These programs might require a large number of data-intensive computations.

For instance, a college may roll out batch jobs assigning students to classes while students can still sign up online for classes on their own. 

To learn more about OLTP, visit here.

Hevo, A Simpler Alternative to Integrate your Data for Analysis

A fully managed No-code Data Pipeline platform like Hevo helps you integrate and load data from 100+ different sources to a destination of your choice in real time in an effortless manner. Hevo with its minimal learning curve can be set up in just a few minutes allowing the users to load data without having to compromise performance. Its strong integration with umpteenth sources allows users to bring in data of different kinds in a smooth fashion without having to code a single line.

Get Started with Hevo for Free

Check out some of the cool features of Hevo:
Completely Automated: The Hevo platform can be set up in just a few minutes and requires minimal maintenance.
Real-Time Data Transfer: Hevo provides real-time data migration, so you can have analysis-ready data always.
100% Complete & Accurate Data Transfer: Hevo’s robust infrastructure ensures reliable data transfer with zero data loss.
Scalable Infrastructure: Hevo has in-built integrations for 100+ sources (including 30+ Free Data Sources) like Amazon Redshift, that can help you scale your data infrastructure as required.
24/7 Live Support: The Hevo team is available round the clock to extend exceptional support to you through chat, email, and support calls.
Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
Live Monitoring: Hevo allows you to monitor the data flow so you can check where your data is at a particular point in time.

Sign up here for a 14-Day Free Trial!

What are the Characteristics of OLTP?

Some important characteristics of OLTP are:

  • OLTP has indexed access to data.
  • It deals with transactions involving small amounts of data.
  • OTLP supports a large number of users.
  • Deals with frequent queries and updates.
  • In OLTP response times are measured in milliseconds.

What are the Benefits of OLTP?

OLTP: OLTP Branch Level Structure | Hevo Data
Image Source

These systems house a specific data usage that differs from the Data Warehouse environments. But some characteristics like having lifecycle-related data usage and dabbling with large volumes of data are identical. OLTP systems offer numerous benefits to their users such as:

  • Eliminating Hot Spots for Higher Concurrency: A common scenario for these systems is to have monotonically increasing index values. These index values are utilized to enforce primary key constraints that can create areas of potential contention and high concurrency.

    Potential contention means that every new insert tries to update the same set of index blocks. This can be easily overcome with hash-partitioned indexes.
  • High Availability: These systems generally need to ensure high availability since they have to deal with mission-critical data along with a large number of users. For instance, a shopping cart application would be considered mission-critical for an online retailer. If their only source of income is Sales via their shopping cart, the shopping cart availability needs to be extremely high.

    If the shopping cart fails, customers can’t buy any products, resulting in the retailer’s loss. This might also lead the customer to move on to a competitor’s website which is again detrimental to the retailer’s business.
  • ACID Compliance: These systems need to be ACID compliant to maintain data integrity. ACID (Accurate, Consistent, Isolated, and Durable) is a standard set of properties that guarantees the reliable processing of database transactions.
  • Support for Bigger Databases: To efficiently manage the size of the database and ensure high availability; recovery, and backup can be performed on a low level of granularity. These systems generally remain online during backups and users may continue accessing the system while the backup is running.

    You can use partitioning to reduce the space requirements of these systems. It allows you to store a part of the database object in a compressed format while other parts can remain uncompressed.

    The update transactions against uncompressed rows are more efficient than on compressed rows. It also allows you to store data transparently on multiple storage layers. This lowers the cost of retaining huge amounts of data greatly. 

OLTP Architecture

OLTP: Architecture of OLTP | Hevo Data
Image Source

Now that you have understood what is OLTP, let’s have a look at its architecture.

The OLTP-handled databases become the sources of data for OLAP (Online Analytical Processing). 

OLTP: Clients in OLAP and OLTP | Hevo Data
Image Source

The architecture of this online database changing system consists of 6 key components as follows:

1) Business Process

This refers to a set of tasks and activities, that once completed, will accomplish an organizational goal. 

2) Enterprise/ Business Strategy

The Enterprise Strategy deals with the issues that affect the organization as a whole. This is developed at a fairly high level in the firm, by the top management or the board of directors.

3) ETL Processes

The ETL processes separate the data from numerous RDBMS source systems. This is followed by transforming the data by applying calculations, concatenations, etc. It can then load the processed data into the Data Warehouse system.

4) Orders, Customers, and Products

The database stores information about the products, customers, orders, suppliers, and employees.

5) Data Mart and Data Warehouse

A Data Mart refers to an access pattern/structure specific to Data Warehouse environments. It can then be utilized by OLAP to store processed data.

6) Data Mining, Decision Making, and Analytics

Data mining, analytics, and decision-making are all viable applications for the information that is stored in the data mart and the data warehouse.
You can use this data to discover patterns in the data, perform analyses on the raw data, and make decisions based on the analyses for the growth of your organization.

What are the Examples of OLTP?

The data stored in the Data Warehouse and Data Mart can be used for analytics, data mining, and decision making to name a few applications. This data can be used to analyze raw data, discover data patterns, and make key analytical decisions for your organization’s growth.

The ATM center is an example of an online transaction processing (OLTP) system. Take for example a married couple who maintains a joint account at a financial institution. One day, both of them arrive at separate ATM centers at precisely the same time, and they want to withdraw the total amount that is currently in their bank account.

Nevertheless, access to the funds will only be granted to the individual who finishes the process of authentication first. In this scenario, the OLTP system ensures that the total amount withdrawn will never be greater than the total amount that is currently held in the bank. The most important point to take away from this is that OLTP systems are designed to excel at transactional work rather than data analysis.

Additional examples of OLTP systems include the following:

  • Online banking
  • Booking of airline tickets via the internet
  • Sending out a message via text
  • Order entry
  • Add a book to the shopping cart.

Why should we use OLTP?

Although, now you know what is OLTP but why it is required in the first place? OLTP supports broader use cases as it empowers organizations to process data within milliseconds. It is used for online ticket bookings, banking, e-commerce websites, fintech, and any other business where the daily frequency of transactions is in a range of a few hundred thousand or millions. Today, OLTP systems are used in almost every digital product to manage very large but short online transactions. 

For instance, if an e-commerce website receives several orders in seconds, the OLTP system has to modify or add information to the database. Some of the data could be order number, name of the purchaser, address, item name, and more. Such information is quickly updated in databases by associating with an account.

Similarly, there are many modifications an OLTP system carries out within milliseconds while ensuring data integrity. Since tables in OLTP databases are normalized, it is vital to maintain consistency to eliminate discrepancies. Any delay in the process could hamper associated operations, resulting in a bitter customer experience.

What are the Pros and Cons of OLTP?

Below are some key advantages and disadvantages of OLTP databases:

ProsCons
Single PlatformHigh Staff Dependency
Database ConsistencySensitive Information
Security RestrictionsRisk of Data Loss
Expands Customer BaseAllows Concurrent Data Modifications
Timely Transaction ModificationsLimited Number of Queries
Large Database Support
Atomicity
Facilitates Data Manipulation

What are the Challenges of OLTP?

Although these systems have numerous advantages, it is not without their challenges, like making the database much more susceptible to intruders and hackers.

These systems also do not have proper methods of transferring products to buyers by themselves. Here is a list of a few more challenges commonly faced when leveraging these systems:

  • These systems need a lot of staff working in groups to maintain the inventory.
  • In case of hardware failures, online transactions are severely affected.
  • Server failure may lead to a large amount of data being erased from the database.
  • These systems have an upper limit on the number of updates and queries that can be executed.

OLTP vs. OLAP

The table below shows the difference between OLTP and OLAP systems

ParametersOLTP systemsOLAP systems
ProcessOLTP is an online transactional system for database modification and is characterized by a large number of small online transactions.It is a process of online analysis and data retrieval and is characterized by working with a large amount of data
Method and FunctionalityIt uses traditional DBMS and is an online database modifying systemOLAP uses a data warehouse for online database query management
Query TypesInsert, Update, and Delete information from databasesSelect Operations
Table typeNormalizedNot normalized
Data SourcesOLTP and its transactions are the data sourcesThe different OLTP databases are the data sources for OLAP
Data Integrity ConcernsIt is mandatory for OLTP databases to maintain integrity constraintData integrity is not an issue as OLAP databases do not get frequently modified
Read/ Write OperationsAllows Read and Write operationsAllows Read operations and rarely allows write operations
Response TimeMillisecondsSeconds to minutes
Use-CasesHelps to control and run fundamental business tasksPlanning, problem-solving, and decision support
Query ComplexitySimple and standardizedComplex queries with aggregations
Data QualityThe database is always detailed and organized.Data might not always be organized
Back-upComplete backup of the data combined with incremental backupsOLAP only needs a backup from time to time. Backup is not important compared to OLTP
Database DesignDatabase Design is application-oriented, i.e., it changes with industries like Retail, Airline, Banking, etc.DB design is subject-oriented, i.e., it changes with subjects like sales, marketing, purchasing, etc.

Conclusion

This article talked about what is OLTP and its 3 key aspects in great detail. This includes its key features, benefits, and a deep dive into its architecture.

Visit our Website to Explore Hevo

Extracting complex data from a diverse set of data sources can be a challenging task and this is where Hevo saves the day! Hevo offers a faster way to move data from Databases or SaaS applications into your Data Warehouse to be visualized in a BI tool. Hevo is fully automated and hence does not require you to code.

Want to take Hevo for a spin? Sign Up for a 14-day free trial and experience the feature-rich Hevo suite firsthand.

Share your understanding of OLTP in the comment below!

No-code Data Pipeline For Your Data Warehouse