Topic 11: OLAP
ICT601 Business Analytics
Dr Umera Imtinan and Dr Saeed Shariati
Resources for this topic
Connolly, T., and Begg, C.E., 2015, Database Systems: a practical approach
to design, implementation, and management, 6th Ed., Pearson, Boston. E-
book (available from My Unit Readings) CHAPTER 33
Learning outcomes
At the completion of this topic, you should be able to:
• Explain how and why OLAP is used
• Explain and give examples of the OLAP operators, slice/dice, pivot and drill
down/up
Lecture outline
• What is OLAP?
• OLAP Tools
Topic 11: Part 01
What is OLAP?
What is OLAP?
• Strictly speaking:
• “OnLine Analytical Processing”
• Many more
Subheading or small
detailed definitions:
intro sentence can be
• “The
placed here dynamic synthesis, analysis, and consolidation of large
volumes of multi-dimensional data” Connolly & Begg (2015,
p1286)
• “The use of a set of graphical tools that provide users with
multidimensional views of their data and allows them to
analyze the data using simple windowing techniques” Hoffer
et. al. (2013, p.448)
Multi-dimensional
• In your previous studies, you may have spent a lot of time
dealing with 2-dimensional data structures
• E.g., rows
Subheading or small
and columns
intro sentence can be
• Multi-dimensional
placed here data means that there are more than
just rows and columns
• The easiest way to think about this is in terms of a cube
Cubes
https://www.grapecity.com/blogs/working-with-olap-cubes/
Why Cubes?
• The data are stored in our database in
such a way so as to facilitate multi-
dimensional queries
• E.g., sum of sales/
Type/Colour/Year
https://www.grapecity.com/blogs/working-with-ol
ap-cubes/
How many dimensions?
• Cubes are most often used to help us
understand what is meant by multi-
dimensionality
• It does not mean however, that we are
necessarily limited to only 3 dimensions…
• It’s just that it gets hard to draw models of > 3
dimensions!
http://
imaginingthetenthdimension.blogspo
t.com.au/2011/08/imagining-fourth-
dimension.html
nth dimension
• We could add additional dimensions to
the example cube we looked at earlier:
• E.g., sum of sales by Period by product by
location by customer
• We could perhaps visualise this as a cube of
cubes
http://demonstrations.wolfram.com/CubeOfCubes/
Topic 11: Part 02
OLAP Tools
OLAP Tools
• Require dimensional organization of underlying data for
performing basic OLAP operations (slice, pivot, drill)
• Allow users to query fact and dimension tables by using simple point-
and-click query-building applications.
• Based on the point-and-click actions by the user of the OLAP/BI tool,
the tool writes and executes the code in the language of the data
management system (e.g. SQL) that hosts the data warehouse or data
mart that is being queried.
OLAP Tools allow for…
• Ad-hoc direct analysis of dimensionally modelled data
• Creation of front-end BI applications
…a typical OLAP tool query construction
space
…another one
Jukic, et. al,
2017, p. 284
Basic OLAP Operators
• Slice and dice
• Pivot (rotate)
• Drill down/up
Slice and dice
• Adds, replaces, or eliminates specified dimension attributes (or
particular values of the dimension attributes) from the already
displayed result
OLAP Query 2: For stores 1 and 2, show separately
for male and female shoppers the number of product
units sold for each product category
Slice and dice – another example
• Adds, replaces, or eliminates specified dimension attributes (or
particular values of the dimension attributes) from the already
displayed result
OLAP Query 3: For each individual store, show
separately for male and female shoppers the
number of product units sold on workdays and
on weekends/holidays
Pivot (aka Rotate)
• Reorganizes the values displayed in the original query result by
moving values of a dimension column from one axis to another
Drill-Down/Up
• Drill Down
• Makes the granularity of the data in the query result finer
• Drill Up
• Makes the granularity of the data in the query result
coarser
Drill Hierarchy
• Set of attributes within a dimension where an attribute
is related to one or more attributes at a lower level but
only related to one item at a higher level
• For example: StoreRegionName → StoreZip → StoreID
• Used for drill down/drill up operations
Drill Down example
OLAP Query 4: For each individual store, show
separately for male and female shoppers the
number of product units sold for each individual
product in each category.
Additional OLAP tool functions
• Graphically visualizing the answers
• Creating and examining calculated data
• Determining comparative or relative differences
• Performing exception analysis, trend analysis,
forecasting, and regression analysis
• Number of other analytical functions
OLAP query visualisation
Topic 11: Part 03
Topic Summary
Learning outcomes
At the completion of this topic, you should be able to:
• Explain how and why OLAP is used
• Explain and give examples of the OLAP operators, slice/dice, pivot and drill
down/up
References
• Connolly, T., and Begg, C., 2015, Database Systems: A practical
approach to design, implementation, and management, 6th Ed.,
Pearson, Boston (available from MUR)
• Hoffer, J.A., Ramesh, V., and Topi, H., 2013, Modern Database
Management, 11th Ed., Pearson, Boston
• Jukic, N., Vrbsky, S., and Nestorov, S., 2017, Database Systems:
Introduction to Databases and Data Warehouses, Prospect Press