0% found this document useful (0 votes)
4 views8 pages

Ia Unit2

Uploaded by

vidyaghodageri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

Ia Unit2

Uploaded by

vidyaghodageri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

UNIT 2

INTRODUCTION TO OLTP AND OLAP


ONLINE TRANSACTION PROCESSING (OLTP)

Definition : “ It is a class of systems that manage transaction oriented applications”.

 They are mainly concerned with entry, storage and retrieval of data.
 They support online transactions and query processing.
o ex: supermarkets, banking, airlines, insurance etc
 They cover day-to-day operations of an organization like purchasing, inventory,

Manufacturing, payroll, accounting etc.


ex: point of sales at a supermarket is a OLTP system.
• OLTP systems include transactions on databases like
1) INSERT( in a supermarket a record of final purchase is added to database)
2) UPDATE ( price of a product is raised from 100 INR to 200 INR)
3) DELETE ( if a product is out of demand then the store removes it from the shelf
and hence the database)
OLTP

• Consider a supermarket database that consists of following tables to manage its data
about products, employees, inventory supplies etc.
• Transactions table
• ProductMaster table
• EmployeeDetails table
• InventorySupplies table
• Suppliers
Considering the sample supermarket database, the Queries that an OLTP system can process
are:
• Search for a particular customer’s record
• Retrieve the product description and unit price of particular product
• Filter all products with a unit price >= 25
• Filter all products supplied by a particular supplier
• Search and display the record of particular supplier
Advantages of an OLTP system:
• Simplicity:
It is designed typically for use by clerks, cashiers, clients etc
• Efficiency:
Allows users to read, write and delete data quickly
• Fast Query Processing:
It responds to user actions immediately and supports transaction
Processing on demand.
• Security :
OLTP system require concurrency control (locking) and recovery
mechanisms (logging)
• OLTP system data content not suitable for decision making:
The current data produced by OLTP systems is not easily used in decision
making
Considering the sample supermarket database, the Queries that OLTP systems
cannot answer:
• Which new product the supermarket should introduce?
• Should the new product be specific to few customer segments?
• How much discount the supermarket should offer at their year-end sale?
• Should different discounts be given to different customer segments?
• How to identify the most consistent salesperson depending on various parameters?
ALL the above questions require some analysis that OLTP is unable to provide.

OLAP: ONLINE ANALYTICAL PROCESSING


• OLAP deals with Historical Data or Archival Data, and it is characterized by relatively
low volume of transactions.
• In OLAP data is held in dimensional form
• Hence OLAP tools are based on multi-dimensional data models that views data in form
of data cube.
• The Queries needed for these systems are often very complex and involve aggregations
• Applications of OLAP are planning, budgeting, sales forecasting, sales reporting,
business process management etc.
• ex: If we collect last 10 years data about flight reservation, This may give useful
information like peak time of travel, and what kinds of people are traveling in the various
classes available (Economy/Business).
consider a supermarket store “AllGoods” store.
OLAP
1. One dimensional data: “The data that is viewed from one particular perspective
• Similarly in fig 3.5 we are looking at salesAmount data with one perspective called
ProductCategoryName.
• And similarly in fig 3.6 we are looking at salesAmount data with one perspective called
YearQuarter.
2. Two dimensional data: The data that is viewed or plotted using two perspectives.
here the dimensions are thought of as a kind of coordinate system.

• In the previous table 3.7: the salesAmount data is been plotted along two dimensions
called as yearQuarter and productCategoryName.
• The yearQuarters on vertical axis and productCategoryName on horizontal axis.
3. Three dimensional data: the data that is viewed or plotted using two perspectives.
• Consider the fig 3.8: here the data is plotted in three perspectives called as
productCategoryName, section and YearQuarter.
• Hence an analyst can now easily look for the section which recorded maximum
accessories sales in Q2.
• It is also possible to go beyond 3rd dimension depending on what kind of data is stored
and what kind if quesries is required from OLAP systems.
Queries that an OLAP system can process:
Considering the fig 3.8 that plots 3-D data by productCategoryName, section and
YearQuarter, the OLAP can answer following questions:
• What will be the future sales trend for accessories in Kid’s section?
• Given customers buying pattern, will it be profitable to launch product XYZ in the Kids
section?
• What impact will a 5% increase in price of products will have on customers?
Advantages of OLAP systems
• multidimensional data representation
• Consistency of information
• “what if “ analysis
• Single platform for all information and business needs like planning, budgeting,
forecasting, reporting and analysis
• fast and interactive ad hoc exploration.
DIFFERENT OLAP ARCHITECTURES
Different OLAP architectures are:
1. Multidimensional OLAP ( MOLAP)
2. Relational OLAP (ROLAP)
3. Hybrid OLAP (HOLAP)
1) MOLAP

• Here data is stored as a multidimensional cube and in a multidimensional array.


Advantages of MOLAP:
• Fast data retrieval
• Optimal for slicing and dicing
• It can perform complex calculations which are pre-generated when the cube is created.
Disadvantages of MOLAP;
• It can handle limited amount of data and large amount of data cannot be included in the
cube.
• Cube technology is proprietary, hence additional investment required in human and
capital.
2) ROLAP:
• Here the data is stored in relational databases.
• Usually includes adding a “WHERE” clause in SQL statements to implement the slice
and dice operations in OLAP.

Advantages:
• It can handle large amount of data
• It can make use of already created functionalities found in relational databases
Disadvantages
• Difficult to perform complex calculations using SQL.
• Slow performance as data size increases.
3) HOLAP :
• It combines the best parts of ROLAP and MOLAP
• It makes use of greater scalability feature of ROLAP and faster performance & summary
type information feature of MOLAP.
• It stores time-based information in the MOLAP cube, and conditions-based or older
information in the ROLAP data store
Disadvantage:
Greater implementation and maintenance cost

You might also like