Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423 603
(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Computer Engineering
(NBA Accredited)
Prof. S. A. Shivarkar
Assistant Professor
Contact No.8275032712
Email- shivarkarsandipcomp@sanjivani.org.in
Subject- Data Mining and Warehousing (CO314)
Unit –III: Data Warehouse
Content
 Data Warehouse
 Operational Database Systems and Data Warehouses (OLTP Vs OLAP)
 A Multidimensional Data Model: Data Cubes, Stars, Snowflakes, and Fact
Constellations Schemas
 OLAP Operations in the Multidimensional Data Model, Concept Hierarchies
 The Process of Data Warehouse Design, A three-tier data warehousing
architecture
 Types of OLAP Servers: ROLAP versus MOLAP versus HOLAP
Integration of Data Mining and Data Warehousing
 Data mining systems, DBMS, Data warehouse systems coupling
 No coupling, loose-coupling, semi-tight-coupling, tight-coupling
 On-line analytical mining data
 integration of mining and OLAP technologies
 Interactive mining multi-level knowledge
 Necessity of mining knowledge and patterns at different levels of abstraction by
drilling/rolling, pivoting, slicing/dicing, etc.
 Integration of multiple mining functions
 Characterized classification, first clustering and then association
Architecture: Typical Data Mining System
Graphical User Interface
Pattern Evaluation
Data Mining Engine
Data Base or Data Warehouse Server
Data Base Data Ware
House
World Wide
Web
Other Info
Repository
Other Info
Repository
Data Cleaning, Integration and Selection
What is Data Warehouse?
 Defined in many different ways, but not rigorously.
 A decision support database that is maintained separately from the
organization’s operational database
 Support information processing by providing a solid platform of
consolidated, historical data for analysis.
 “A data warehouse is a subject-oriented, integrated, time-variant, and
nonvolatile collection of data in support of management’s decision-making
process.”—W. H. Inmon
 Data warehousing:
 The process of constructing and using data warehouses
Data Warehouse- Subject Oriented
 Organized around major subjects, such as customer, product,
sales
 Focusing on the modeling and analysis of data for decision
makers, not on daily operations or transaction processing
 Provide a simple and concise view around particular subject
issues by excluding data that are not useful in the decision
support process
Data Warehouse- Integrated
 Constructed by integrating multiple, heterogeneous data sources
 relational databases, flat files, on-line transaction records
 Data cleaning and data integration techniques are applied.
 Ensure consistency in naming conventions, encoding structures, attribute
measures, etc. among different data sources
 E.g., Hotel price: currency, tax, breakfast covered, etc.
 When data is moved to the warehouse, it is converted.
Data Warehouse- Time Variant
 The time horizon for the data warehouse is significantly longer than that
of operational systems
 Operational database: current value data
 Data warehouse data: provide information from a historical
perspective (e.g., past 5-10 years)
 Every key structure in the data warehouse
 Contains an element of time, explicitly or implicitly
 But the key of operational data may or may not contain “time
element”
Data Warehouse- Nonvolatile
 A physically separate store of data transformed from the
operational environment
 Operational update of data does not occur in the data
warehouse environment
 Does not require transaction processing, recovery, and
concurrency control mechanisms
 Requires only two operations in data accessing:
 initial loading of data and access of data
Data Warehouse vs. Heterogeneous DBMS
 Traditional heterogeneous DB integration: A query driven approach
 Build wrappers/mediators on top of heterogeneous databases
 When a query is posed to a client site, a meta-dictionary is used to translate the
query into queries appropriate for individual heterogeneous sites involved, and
the results are integrated into a global answer set
 Complex information filtering, compete for resources
 Data warehouse: update-driven, high performance
 Information from heterogeneous sources is integrated in advance and stored in
warehouses for direct query and analysis
Data Warehouse vs. Operational DBMS
 OLTP (on-line transaction processing)
 Major task of traditional relational DBMS
 Day-to-day operations: purchasing, inventory, banking, manufacturing, payroll, registration,
accounting, etc.
 OLAP (on-line analytical processing)
 Major task of data warehouse system Data analysis and decision making
 Distinct features (OLTP vs. OLAP)
 User and system orientation: customer vs. market
 Data contents: current, detailed vs. historical, consolidated Database design: ER + application
vs. star + subject
 View: current, local vs. evolutionary, integrated
 Access patterns: update vs. read-only but complex queries
OLTP vs OLAP
OLTP OLAP
users clerk, IT professional knowledge worker
function day to day operations decision support
DB design application-oriented subject-oriented
data current, up-to-date
detailed, flat relational
isolated
historical,
summarized, multidimensional
integrated, consolidated
usage repetitive ad-hoc
access read/write
index/hash on prim. key
lots of scans
unit of work short, simple transaction complex query
# records accessed tens millions
#users thousands hundreds
DB size 100MB-GB 100GB-TB
metric transaction throughput query throughput, response
Why Separate Data Warehouse ?
 High performance for both systems
 DBMS— tuned for OLTP: access methods, indexing, concurrency control, recovery
 Warehouse—tuned for OLAP: complex OLAP queries, multidimensional view,
consolidation
 Different functions and different data:
 missing data: Decision support requires historical data which operational DBs do
not typically maintain
 data consolidation: DS requires consolidation (aggregation, summarization) of data
from heterogeneous sources
 data quality: different sources typically use inconsistent data representations, codes
and formats which have to be reconciled
 Note: There are more and more systems which perform OLAP analysis directly on
relational databases
From Tables and Spreadsheets to Data Cubes
 A data warehouse is based on a multidimensional data model which views data in
the form of a data cube
 A data cube, such as sales, allows data to be modeled and viewed in multiple
dimensions
 Dimension tables, such as item (item_name, brand, type), or time(day, week, month, quarter, year)
 Fact table contains measures (such as dollars_sold) and keys to each of the related dimension tables
 In data warehousing literature, an n-D base cube is called a base cuboid. The top
most 0-D cuboid, which holds the highest-level of summarization, is called the apex
cuboid. The lattice of cuboids forms a data cube.
Cubes as 2-D
 2-D View of Sales Data for AllElectronics According to time and item
Cubes as 3-D geometric structures
 3-D View of Sales Data for AllElectronics According to time, item, and location
Cubes as 3-D geometric structures
 3-D View of Sales Data for AllElectronics According to time, item, and location
3 D Data Cube
 A 3-D data cube
representation of
the data in previous
table, according to
time, item, and
location.
 The measure
displayed is dollars
sold (in thousands)).
4 D Data Cube
 4-D data cube representation of sales data, according to time, item, location, and
supplier. The measure displayed is dollars sold (in thousands)
Cube: A Lattice of Cuboids
time,item
time,item,location
time, item, location, supplier
all
time item location supplier
time,location
time,supplier
item,location
item,supplier
location,supplier
time,item,supplier
time,location,supplier
item,location,supplier
0-D (apex) cuboid
1-D cuboids
2-D cuboids
3-D cuboids
4-D (base) cuboid
 The entity-relationship data model is commonly used in the design of relational databases, where a
database schema consists of a set of entities and the relationships between them. Such a data
model is appropriate for online transaction processing.
 A data warehouse, however, requires a concise, subject-oriented schema that facilitates online data
analysis.
 The most popular data model for a data warehouse is a multidimensional
model, which can exist in the form of a:
 Star schema
 Snowflake schema
 Fact constellations
Conceptual Modeling of Data Warehouses
Conceptual Modeling of Data Warehouses
 Star schema: A fact table in the middle connected to a set of dimension
tables
 The most common modeling paradigm is the star schema, in which the data warehouse
contains
1) a large central table (fact table) containing the bulk of the data, with no redundancy
2) a set of smaller attendant tables (dimension tables), one for each dimension.
The schema graph resembles a starburst, with the dimension tables displayed in a radial
pattern around the central fact table.
Example of Star Schema
Conceptual Modeling of Data Warehouses
 Snowflake schema: A refinement of star schema where some
dimensional hierarchy is normalized into a set of smaller dimension
tables, forming a shape similar to snowflake
 The snowflake schema is a variant of the star schema model, where some dimension
tables are normalized, thereby further splitting the data into additional tables.
 The resulting schema graph forms a shape similar to a snowflake.
 The major difference between the snowflake and star schema models is that the
dimension tables of the snowflake model may be kept in normalized form to reduce
redundancies.
 Such a table is easy to maintain and saves storage space.
Example of Snowflake Schema
Conceptual Modeling of Data Warehouses
 Fact constellations: Multiple fact tables share dimension tables, viewed
as a collection of stars, therefore called galaxy schema or fact
constellation.
 Sophisticated applications may require multiple fact tables to share
dimension tables.
 This kind of schema can be viewed as a collection of stars, and hence is
called a galaxy schema or a fact constellation.
Example of Fact Constellation
 A concept hierarchy defines a sequence of mappings from a set of low-level
concepts to higher-level, more general
Concept Hierarchy
OLAP Operations
 Roll up (drill-up): summarize data
 by climbing up hierarchy or by dimension reduction
 Drill down (roll down): reverse of roll-up
 from higher level summary to lower level summary or detailed
data, or introducing new dimensions
 Slice and dice: project and select
 Pivot (rotate):
 reorient the cube, visualization, 3D to series of 2D planes
 Other operations
 drill across: involving (across) more than one fact table
 drill through: through the bottom level of the cube to its back-end
relational tables (using SQL)
OLAP
Operations
Design of Data Warehouse: A Business Analysis Framework
 Four views regarding the design of a data warehouse
 Top-down view
 allows selection of the relevant information necessary for the
data warehouse
 Data source view
 exposes the information being captured, stored, and
managed by operational systems
 Data warehouse view
 consists of fact tables and dimension tables
 Business query view
 sees the perspectives of data in the warehouse from the view
of end-user
Data Warehouse Design Process
 Top-down, bottom-up approaches or a combination of both
 Top-down: Starts with overall design and planning (mature)
 Bottom-up: Starts with experiments and prototypes (rapid)
 From software engineering point of view
 Waterfall: structured and systematic analysis at each step before
proceeding to the next
 Spiral: rapid generation of increasingly functional systems, short
turn around time, quick turn around
 Typical data warehouse design process
 Choose a business process to model, e.g., orders, invoices, etc.
 Choose the grain (atomic level of data) of the business process
 Choose the dimensions that will apply to each fact table record
 Choose the measure that will populate each fact table record
Data Warehouse: A Multi-Tiered Architecture
OLAP Server Architectures
 Relational OLAP (ROLAP)
 Use relational or extended-relational DBMS to store and manage warehouse data and
OLAP middle ware
 Include optimization of DBMS backend, implementation of aggregation navigation
logic, and additional tools and services
 Greater scalability
 Multidimensional OLAP (MOLAP)
 Sparse array-based multidimensional storage engine
 Fast indexing to pre-computed summarized data
 Hybrid OLAP (HOLAP) (e.g., Microsoft SQLServer)
 Flexibility, e.g., low level: relational, high-level: array
 Specialized SQL servers (e.g., Redbricks)
 Specialized support for SQL queries over star/snowflake schemas
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 35
Reference
 Han, Jiawei Kamber, Micheline Pei and Jian, “Data Mining: Concepts and
Techniques”,Elsevier Publishers, ISBN:9780123814791, 9780123814807.
 https://onlinecourses.nptel.ac.in/noc24_cs22

Data Warehouse and Architecture, OLAP Operation

  • 1.
    Sanjivani Rural EducationSociety’s Sanjivani College of Engineering, Kopargaon-423 603 (An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Computer Engineering (NBA Accredited) Prof. S. A. Shivarkar Assistant Professor Contact No.8275032712 Email- shivarkarsandipcomp@sanjivani.org.in Subject- Data Mining and Warehousing (CO314) Unit –III: Data Warehouse
  • 2.
    Content  Data Warehouse Operational Database Systems and Data Warehouses (OLTP Vs OLAP)  A Multidimensional Data Model: Data Cubes, Stars, Snowflakes, and Fact Constellations Schemas  OLAP Operations in the Multidimensional Data Model, Concept Hierarchies  The Process of Data Warehouse Design, A three-tier data warehousing architecture  Types of OLAP Servers: ROLAP versus MOLAP versus HOLAP
  • 3.
    Integration of DataMining and Data Warehousing  Data mining systems, DBMS, Data warehouse systems coupling  No coupling, loose-coupling, semi-tight-coupling, tight-coupling  On-line analytical mining data  integration of mining and OLAP technologies  Interactive mining multi-level knowledge  Necessity of mining knowledge and patterns at different levels of abstraction by drilling/rolling, pivoting, slicing/dicing, etc.  Integration of multiple mining functions  Characterized classification, first clustering and then association
  • 4.
    Architecture: Typical DataMining System Graphical User Interface Pattern Evaluation Data Mining Engine Data Base or Data Warehouse Server Data Base Data Ware House World Wide Web Other Info Repository Other Info Repository Data Cleaning, Integration and Selection
  • 5.
    What is DataWarehouse?  Defined in many different ways, but not rigorously.  A decision support database that is maintained separately from the organization’s operational database  Support information processing by providing a solid platform of consolidated, historical data for analysis.  “A data warehouse is a subject-oriented, integrated, time-variant, and nonvolatile collection of data in support of management’s decision-making process.”—W. H. Inmon  Data warehousing:  The process of constructing and using data warehouses
  • 6.
    Data Warehouse- SubjectOriented  Organized around major subjects, such as customer, product, sales  Focusing on the modeling and analysis of data for decision makers, not on daily operations or transaction processing  Provide a simple and concise view around particular subject issues by excluding data that are not useful in the decision support process
  • 7.
    Data Warehouse- Integrated Constructed by integrating multiple, heterogeneous data sources  relational databases, flat files, on-line transaction records  Data cleaning and data integration techniques are applied.  Ensure consistency in naming conventions, encoding structures, attribute measures, etc. among different data sources  E.g., Hotel price: currency, tax, breakfast covered, etc.  When data is moved to the warehouse, it is converted.
  • 8.
    Data Warehouse- TimeVariant  The time horizon for the data warehouse is significantly longer than that of operational systems  Operational database: current value data  Data warehouse data: provide information from a historical perspective (e.g., past 5-10 years)  Every key structure in the data warehouse  Contains an element of time, explicitly or implicitly  But the key of operational data may or may not contain “time element”
  • 9.
    Data Warehouse- Nonvolatile A physically separate store of data transformed from the operational environment  Operational update of data does not occur in the data warehouse environment  Does not require transaction processing, recovery, and concurrency control mechanisms  Requires only two operations in data accessing:  initial loading of data and access of data
  • 10.
    Data Warehouse vs.Heterogeneous DBMS  Traditional heterogeneous DB integration: A query driven approach  Build wrappers/mediators on top of heterogeneous databases  When a query is posed to a client site, a meta-dictionary is used to translate the query into queries appropriate for individual heterogeneous sites involved, and the results are integrated into a global answer set  Complex information filtering, compete for resources  Data warehouse: update-driven, high performance  Information from heterogeneous sources is integrated in advance and stored in warehouses for direct query and analysis
  • 11.
    Data Warehouse vs.Operational DBMS  OLTP (on-line transaction processing)  Major task of traditional relational DBMS  Day-to-day operations: purchasing, inventory, banking, manufacturing, payroll, registration, accounting, etc.  OLAP (on-line analytical processing)  Major task of data warehouse system Data analysis and decision making  Distinct features (OLTP vs. OLAP)  User and system orientation: customer vs. market  Data contents: current, detailed vs. historical, consolidated Database design: ER + application vs. star + subject  View: current, local vs. evolutionary, integrated  Access patterns: update vs. read-only but complex queries
  • 12.
    OLTP vs OLAP OLTPOLAP users clerk, IT professional knowledge worker function day to day operations decision support DB design application-oriented subject-oriented data current, up-to-date detailed, flat relational isolated historical, summarized, multidimensional integrated, consolidated usage repetitive ad-hoc access read/write index/hash on prim. key lots of scans unit of work short, simple transaction complex query # records accessed tens millions #users thousands hundreds DB size 100MB-GB 100GB-TB metric transaction throughput query throughput, response
  • 13.
    Why Separate DataWarehouse ?  High performance for both systems  DBMS— tuned for OLTP: access methods, indexing, concurrency control, recovery  Warehouse—tuned for OLAP: complex OLAP queries, multidimensional view, consolidation  Different functions and different data:  missing data: Decision support requires historical data which operational DBs do not typically maintain  data consolidation: DS requires consolidation (aggregation, summarization) of data from heterogeneous sources  data quality: different sources typically use inconsistent data representations, codes and formats which have to be reconciled  Note: There are more and more systems which perform OLAP analysis directly on relational databases
  • 14.
    From Tables andSpreadsheets to Data Cubes  A data warehouse is based on a multidimensional data model which views data in the form of a data cube  A data cube, such as sales, allows data to be modeled and viewed in multiple dimensions  Dimension tables, such as item (item_name, brand, type), or time(day, week, month, quarter, year)  Fact table contains measures (such as dollars_sold) and keys to each of the related dimension tables  In data warehousing literature, an n-D base cube is called a base cuboid. The top most 0-D cuboid, which holds the highest-level of summarization, is called the apex cuboid. The lattice of cuboids forms a data cube.
  • 15.
    Cubes as 2-D 2-D View of Sales Data for AllElectronics According to time and item
  • 16.
    Cubes as 3-Dgeometric structures  3-D View of Sales Data for AllElectronics According to time, item, and location
  • 17.
    Cubes as 3-Dgeometric structures  3-D View of Sales Data for AllElectronics According to time, item, and location
  • 18.
    3 D DataCube  A 3-D data cube representation of the data in previous table, according to time, item, and location.  The measure displayed is dollars sold (in thousands)).
  • 19.
    4 D DataCube  4-D data cube representation of sales data, according to time, item, location, and supplier. The measure displayed is dollars sold (in thousands)
  • 20.
    Cube: A Latticeof Cuboids time,item time,item,location time, item, location, supplier all time item location supplier time,location time,supplier item,location item,supplier location,supplier time,item,supplier time,location,supplier item,location,supplier 0-D (apex) cuboid 1-D cuboids 2-D cuboids 3-D cuboids 4-D (base) cuboid
  • 21.
     The entity-relationshipdata model is commonly used in the design of relational databases, where a database schema consists of a set of entities and the relationships between them. Such a data model is appropriate for online transaction processing.  A data warehouse, however, requires a concise, subject-oriented schema that facilitates online data analysis.  The most popular data model for a data warehouse is a multidimensional model, which can exist in the form of a:  Star schema  Snowflake schema  Fact constellations Conceptual Modeling of Data Warehouses
  • 22.
    Conceptual Modeling ofData Warehouses  Star schema: A fact table in the middle connected to a set of dimension tables  The most common modeling paradigm is the star schema, in which the data warehouse contains 1) a large central table (fact table) containing the bulk of the data, with no redundancy 2) a set of smaller attendant tables (dimension tables), one for each dimension. The schema graph resembles a starburst, with the dimension tables displayed in a radial pattern around the central fact table.
  • 23.
  • 24.
    Conceptual Modeling ofData Warehouses  Snowflake schema: A refinement of star schema where some dimensional hierarchy is normalized into a set of smaller dimension tables, forming a shape similar to snowflake  The snowflake schema is a variant of the star schema model, where some dimension tables are normalized, thereby further splitting the data into additional tables.  The resulting schema graph forms a shape similar to a snowflake.  The major difference between the snowflake and star schema models is that the dimension tables of the snowflake model may be kept in normalized form to reduce redundancies.  Such a table is easy to maintain and saves storage space.
  • 25.
  • 26.
    Conceptual Modeling ofData Warehouses  Fact constellations: Multiple fact tables share dimension tables, viewed as a collection of stars, therefore called galaxy schema or fact constellation.  Sophisticated applications may require multiple fact tables to share dimension tables.  This kind of schema can be viewed as a collection of stars, and hence is called a galaxy schema or a fact constellation.
  • 27.
    Example of FactConstellation
  • 28.
     A concepthierarchy defines a sequence of mappings from a set of low-level concepts to higher-level, more general Concept Hierarchy
  • 29.
    OLAP Operations  Rollup (drill-up): summarize data  by climbing up hierarchy or by dimension reduction  Drill down (roll down): reverse of roll-up  from higher level summary to lower level summary or detailed data, or introducing new dimensions  Slice and dice: project and select  Pivot (rotate):  reorient the cube, visualization, 3D to series of 2D planes  Other operations  drill across: involving (across) more than one fact table  drill through: through the bottom level of the cube to its back-end relational tables (using SQL)
  • 30.
  • 31.
    Design of DataWarehouse: A Business Analysis Framework  Four views regarding the design of a data warehouse  Top-down view  allows selection of the relevant information necessary for the data warehouse  Data source view  exposes the information being captured, stored, and managed by operational systems  Data warehouse view  consists of fact tables and dimension tables  Business query view  sees the perspectives of data in the warehouse from the view of end-user
  • 32.
    Data Warehouse DesignProcess  Top-down, bottom-up approaches or a combination of both  Top-down: Starts with overall design and planning (mature)  Bottom-up: Starts with experiments and prototypes (rapid)  From software engineering point of view  Waterfall: structured and systematic analysis at each step before proceeding to the next  Spiral: rapid generation of increasingly functional systems, short turn around time, quick turn around  Typical data warehouse design process  Choose a business process to model, e.g., orders, invoices, etc.  Choose the grain (atomic level of data) of the business process  Choose the dimensions that will apply to each fact table record  Choose the measure that will populate each fact table record
  • 33.
    Data Warehouse: AMulti-Tiered Architecture
  • 34.
    OLAP Server Architectures Relational OLAP (ROLAP)  Use relational or extended-relational DBMS to store and manage warehouse data and OLAP middle ware  Include optimization of DBMS backend, implementation of aggregation navigation logic, and additional tools and services  Greater scalability  Multidimensional OLAP (MOLAP)  Sparse array-based multidimensional storage engine  Fast indexing to pre-computed summarized data  Hybrid OLAP (HOLAP) (e.g., Microsoft SQLServer)  Flexibility, e.g., low level: relational, high-level: array  Specialized SQL servers (e.g., Redbricks)  Specialized support for SQL queries over star/snowflake schemas
  • 35.
    DEPARTMENT OF COMPUTERENGINEERING, Sanjivani COE, Kopargaon 35 Reference  Han, Jiawei Kamber, Micheline Pei and Jian, “Data Mining: Concepts and Techniques”,Elsevier Publishers, ISBN:9780123814791, 9780123814807.  https://onlinecourses.nptel.ac.in/noc24_cs22