Part Two: - The use of views. 1. Topics What is a View? Why Views are useful in Data Warehousing? Understand Materialised Views Understand View Maintenance.

Slides:



Advertisements
Similar presentations
Oracle Materialized Views for Replication COUG Presentation, Feb 20, 2014 Jane Lamont,
Advertisements

BY LECTURER/ AISHA DAWOOD DW Lab # 4 Overview of Extraction, Transformation, and Loading.
Incremental Maintenance for Non-Distributive Aggregate Functions work done at IBM Almaden Research Center Themis Palpanas (U of Toronto) Richard Sidle.
ICS 421 Spring 2010 Data Warehousing 3 Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 4/1/20101Lipyeow.
Data Warehouse IMS5024 – presented by Eder Tsang.
Decision Support and Data Warehouse. Decision supports Systems Components Data management function –Data warehouse Model management function –Analytical.
CS 286, UC Berkeley, Spring 2007, R. Ramakrishnan 1 Decision Support Chapter 25.
CS240A: Databases and Knowledge Bases Applications of Active Database Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
Materialized views1 Materialized views (snapshot tables) Using Oracle.
Introduction to Data Warehousing Enrico Franconi CS 636.
Data Warehousing. On-Line Analytical Processing (OLAP) Tools The use of a set of graphical tools that provides users with multidimensional views of their.
CS 603 Data Replication in Oracle February 27, 2002.
Data Warehouse View Maintenance Presented By: Katrina Salamon For CS561.
1 © Prentice Hall, 2002 Chapter 11: Data Warehousing.
An Overview of Data Warehousing and OLTP Technology Presenter: Parminder Jeet Kaur Discussion Lead: Kailang.
CS 345: Topics in Data Warehousing Tuesday, September 28, 2004.
Business Intelligence Instructor: Bajuna Salehe Web:
Data Cube Computation Model dependencies among the aggregates: most detailed “view” can be computed from view (product,store,quarter) by summing-up all.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Decision Support Chapter 23.
Joachim Hammer 1 Data Warehousing Overview, Terminology, and Research Issues Joachim Hammer.
CPSC 404, Laks V.S. Lakshmanan 1 Data Warehousing & OLAP Chapter 25, Ramakrishnan & Gehrke (Sections )
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Data Warehousing and Decision Support Chapter 25, Part B.
1 Data Warehouses BUAD/American University Data Warehouses.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Decision Support Chapter 23.
Data Warehouse & OLAP Kuliah 1 Introduction Slide banyak mengambil dari acuan- acuan yang dipakai.
Overview – Chapter 11 SQL 710 Overview of Replication
Data Warehousing.
BI Terminologies.
The Relational Model1 ER-to-Relational Mapping and Views.
Ahsan Abdullah 1 Data Warehousing Lecture-10 Online Analytical Processing (OLAP) Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center.
Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical.
1 On-Line Analytic Processing Warehousing Data Cubes.
ADVANCED TOPICS IN RELATIONAL DATABASES Spring 2011 Instructor: Hassan Khosravi.
OLAP On Line Analytic Processing. OLTP On Line Transaction Processing –support for ‘real-time’ processing of orders, bookings, sales –typically access.
OLAP & Data Warehousing. R. Ramakrishnan and J. Gehrke1 Decision Support Chapter 23.
Two-Tier DW Architecture. Three-Tier DW Architecture.
Data Warehousing.
Advanced Database Concepts
Indexes- What?  Optional structures associated with tables  Provides a quick access path to table data  You can create indexes on one or more columns.
Copyright© 2014, Sira Yongchareon Department of Computing, Faculty of Creative Industries and Business Lecturer : Dr. Sira Yongchareon ISCG 6425 Data Warehousing.
Materialized views (snapshot tables)
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Data Warehousing and Decision Support.
1 Introduction to Database Systems, CS420 SQL Views and Indexes.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Data Warehousing and Decision Support Chapter 25.
Introduction to OLAP and Data Warehouse Assoc. Professor Bela Stantic September 2014 Database Systems.
9 Copyright © 2006, Oracle. All rights reserved. Summary Management.
Data Mining and Data Warehousing: Concepts and Techniques What is a Data Warehouse? Data Warehouse vs. other systems, OLTP vs. OLAP Conceptual Modeling.
Plan for Populating a DW
CS122A: Introduction to Data Management Lecture #11: SQL (4) -- Triggers, Views, Access Control Instructor: Chen Li.
Pertemuan <<13>> Data Warehousing dan Decision Support
On-Line Analytic Processing
Data warehouse and OLAP
MIS5101: Extract, Transform, Load (ETL)
Data Warehouse.
On-Line Analytical Processing (OLAP)
MIS5101: Extract, Transform, Load (ETL)
Data Warehouse and OLAP
MIS5101: Extract, Transform, Load (ETL)
CS 440 Database Management Systems
Typically data is extracted from multiple sources
Introduction to Data Warehousing
Data Warehousing and Decision Support
DATA CUBES E0 261 Jayant Haritsa Computer Science and Automation
CUBE MATERIALIZATION E0 261 Jayant Haritsa
Views 1.
Data Warehousing Concepts
Data Warehouse and OLAP
David Gilmore & Richard Blevins Senior Consultants April 17th, 2012
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

Part Two: - The use of views. 1

Topics What is a View? Why Views are useful in Data Warehousing? Understand Materialised Views Understand View Maintenance policies 2

Views and Decision Support OLAP queries are typically aggregate queries. Precomputation is essential for interactive response times. The CUBE is in fact a collection of aggregate queries, and precomputation is especially important: lots of work on what is best to precompute given a limited amount of space to store precomputed results. Warehouses can be thought of as a collection of asynchronously replicated tables and periodically maintained views. 3

What is a VIEW A “virtual table” Does not exist as a base table in the database Automatically activated when referenced in an SQL statement. Views are stored SQL statements. Created with the Create View statement Can be dropped with Drop View 4

To create a simple view on the employee table Create view empdept30 As Select ename, sal, comm From Emp Where deptno = 30; The View can then be used and referenced as if it were a normal table:- Select ename, sal from empdept30; 5

Another example 6

View Modification (Evaluate On Demand) CREATE VIEW RegionalSales(category,sales,state) AS SELECT P.category, S.sales, L.state FROM Products P, Sales S, Locations L WHERE P.pid=S.pid AND S.locid=L.locid SELECT R.category, R.state, SUM (R.sales) FROM RegionalSales AS R GROUP BY R.category, R.state SELECT R.category, R.state, SUM (R.sales) FROM ( SELECT P.category, S.sales, L.state FROM Products P, Sales S, Locations L WHERE P.pid=S.pid AND S.locid=L.locid) AS R GROUP BY R.category, R.state View Query Modified Query 7

Materialized Views A view whose tuples are stored in the database is said to be materialized. Provides fast access, like a (very high-level) cache. Need to maintain the view as the underlying tables change. Ideally, we want incremental view maintenance algorithms. Views are closely related to data warehousing, and OLAP. 8

Extract, Transform and Load (ETL) Transforming data is typically accomplished by defining a relational View over the tables in the data sources. Loading data then consists of materializing such views and storing them in the warehouse. 9

Issues in View Materialization What views should we materialize, and what indexes should we build on the precomputed results? Given a query and a set of materialized views, can we use the materialized views to answer the query? How frequently should we refresh materialized views to make them consistent with the underlying tables? (And how can we do this incrementally?) 10

View Maintenance A View Maintenance policy is a decision about when a view is refreshed. Immediate Refresh: Can be refreshed as part of the transaction that modifies the underlying data tables. (+ Materialized view is always consistent; - updates are slowed) Deferred Refresh: Some time later, in a separate transaction. (- View becomes inconsistent; + can scale to maintain many views without slowing updates. Updates are captured in a log and applied subsequently to the materialised views.) 11

Deferred Maintenance Three flavors: Lazy: Delay refresh until next query on view; then refresh before answering the query. Periodic (Snapshot): Refresh periodically (say once per day). Queries will possibly be answered using outdated version of view tuples. Widely used for warehouse applications. Forced: E.g., Refresh after a fixed number of updates to underlying data tables. 12

Note: In periodic and forced view maintenance queries may see data that is not consistent with the underlying tables. A price to be paid for fast updates and queries. A snapshot (Oracle) is a local materialization of a view on data stored at a master site. 13