Materialized views (snapshot tables)

Slides:



Advertisements
Similar presentations
Active database concepts
Advertisements

Oracle Materialized Views for Replication COUG Presentation, Feb 20, 2014 Jane Lamont,
Basic SQL Introduction Presented by: Madhuri Bhogadi.
On Replication July 2006 Yin Chen. What is? Why need? Types? Investigation of existing technologies –IBM SQL replication –Sybase replication –Oracle replication.
Data Replication with Materialized Views ISYS 650.
View Sen Zhang. Views are very common in business systems users view of data is simplified a form of security - user sees only the data he/she needs to.
View and Materialized view. What is a view? Logically represents subset of data from one or more table. In sql, a view is a virtual relation based on.
Materialized views1 Materialized views (snapshot tables) Using Oracle.
Mid-term Class Review.
INTEGRITY Enforcing integrity in Oracle. Oracle Tables mrobbert owner granted access.
CS 603 Data Replication in Oracle February 27, 2002.
Jennifer Widom SQL Data Modification Statements. Jennifer Widom Insert Into Table Values(A 1,A 2,…,A n ) SQL: Modifications Inserting new data (2 methods)
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Defining Data Warehouse Concepts and Terminology.
ADVANCE REPLICATION Oracle Coretech Surabaya (OCS) One Day Seminar Surabaya, August 30 th 2008.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Database Project Team 4 Group c v Menna Hamza Mohamad Hesham Mona Abdel Mageed Yasmine Shaker.
1 Moshe Shadmon ScaleDB Scaling MySQL in the Cloud.
Materialized Views Acknowledgement to Author: Willie Albino.
CSE 3330 Database Concepts Stored Procedures. How to create a user CREATE USER.. GRANT PRIVILEGE.
Administration and Monitoring the Database Oracle 10g.
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.
Access Class Outline Data Organization Tables Import and Export of Data Queries Select Calculate Values Aggregation (Count, Sum) Create Append Delete Crosstab.
DBMS Implementation Chapter 6.4 V3.0 Napier University Dr Gordon Russell.
CRUD Matrix Presented by Trisha Cummings. Background to a CRUD Matrix CRUD stands for :- Create, Read, Update and Delete. A CRUD Matrix is very useful.
Views In some cases, it is not desirable for all users to see the entire logical model (that is, all the actual relations stored in the database.) In some.
Chapter 13 Subqueries and Views Part C. SQL Copyright 2005 Radian Publishing Co.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Oracle's Distributed Database Bora Yasa. Definition A Distributed Database is a set of databases stored on multiple computers at different locations and.
Information Building and Retrieval Using MySQL Track 3 : Basic Course in Database.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
Persistance Android. Adding Persistance SQL Refresher Understand how to create and migrate SQLLite database with android APIs. – Get all tasks – Add a.
Chapter 9 Databases Objectives Understand a DBMS and define its components. Understand the architecture of a DBMS and its levels. Distinguish between.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Management Systems II, Hyunja Lee1 Transaction Support in SQL.
Database Design And Implementation. Done so far… Started a design of your own data model In Software Engineering, recognised the processes that occur.
Ing. Erick López Ch. M.R.I. Replicación Oracle. What is Replication  Replication is the process of copying and maintaining schema objects in multiple.
Chapter 13 Views Oracle 10g: SQL. Oracle 10g: SQL2 Objectives Create a view, using CREATE VIEW command or the CREATE OR REPLACE VIEW command Employ the.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  Basic SQL syntax  Data retrieve  Data query  Data conditions  Arithmetic operations on data  Data transactions.
1 Announcements Reading for next week: Chapter 4 Your first homework will be assigned as soon as your database accounts have been set up.  Expect an .
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Advanced Databases More Advanced PL/SQL Programing 1.
Oracle9i Performance Tuning Chapter 11 Advanced Tuning Topics.
Oracle 10g Database Administrator: Implementation and Administration Chapter 10 Basic Data Management.
14 Copyright © 2004, Oracle. All rights reserved. Using Materialized Views.
Microsoft SQL Server Database & Business Intelligence Training Training/Placement/Certification Classroom/Online/Corporate Fast track/Regular/Weekend Contact.
CSED421 Database Systems Lab View. Page 2  Virtual or logical table which is defined as SELECT query with joins  Act as table but not real data, only.
Distributed Database Management Systems
Advanced Accounting Information Systems
© 2016, Mike Murach & Associates, Inc.
Database Systems: Design, Implementation, and Management Tenth Edition
Working in the Form Builder Environment
ITEC 313 Database Programming
Introduction to Oracle9i: SQL
Chapter 8 Advanced SQL Pearson Education © 2014.
SQL Data Modification Statements.
PL/SQL Programing : Triggers
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Chapter 13 Subqueries and Views
Database Processing: David M. Kroenke’s Chapter Seven:
HAVING,INDEX,COMMIT & ROLLBACK
Chapter 8 Advanced SQL.
Chapter 9 Query-by-Example Pearson Education © 2009.
Performance And Scalability In Oracle9i And SQL Server 2000
So What are Views and Triggers anyway?
Updating Databases With Open SQL
Database SQL.
Updating Databases With Open SQL
Presentation transcript:

Materialized views (snapshot tables) Using Oracle Materialized views

Ordinary views vs. materialized views Virtual table Named select statement Part of the SQL standard Syntax CREATE VIEW viewName AS selectStatement Physical table Replication of master data at a single point in time Not part of the SQL standard Syntax CREATE MATERIALIZED VIEW viewName AS selectStatement Materialized views

Why use materialized views? Replicate data to non-master sites To save network traffic when data is used in transactions Cache expensive queries Expensive in terms of time or memory Example: Sum, average or other calculations on large amounts of data Materialized views

Refreshing a materialized view Refresh types Complete refresh Recreates the materialized view Fast refresh Only changed data is refreshed Initiating a refresh Scheduled refresh On-demand refresh execute DBMS_REFRESH.REFRESH('hr_refg') Materialized views

Different kinds of materialized views Read-only Insert, update or delete NOT allowed Updateable Insert, update and delete on the view is allowed Changes made to the view are pushed back to the master tables at refresh SQL syntax CREATE MATERIALIZED VIEW viewName FOR UPDATE AS aSelectStatement Writeable Changes made to the view are NOT pushed back to the master tables at refresh Same as updateable. The difference lies in the definitio of “refresh groups” … Materialized views

References and further reading Oracle9i Advanced Replication Release 2 (9.2) 3 Materialized View Concepts and Architecture http://download.oracle.com/docs/cd/B10500_01/server.920/a96567/repmview.htm Oracle® Database SQL Reference 10g Release 2 (10.2) CREATE MATERIALIZED VIEW http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm Materialized views