Chapter Name Replication and Mobile Databases Transparencies

Slides:



Advertisements
Similar presentations
Manajemen Basis Data Pertemuan 12 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Advertisements

Chapter 24 Replication and Mobile Databases Transparencies © Pearson Education Limited 1995, 2005.
Database Architectures and the Web
SQL Server Replication
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 13 (Web): Distributed Databases
Distributed Database Management Systems
Overview Distributed vs. decentralized Why distributed databases
Distributed Databases
1 © Prentice Hall, 2002 Chapter 13: Distributed Databases Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden.
Chapter 12 Distributed Database Management Systems
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
CS 603 Data Replication in Oracle February 27, 2002.
Chapter 1 Introduction to Databases
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Distributed Databases
Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically.
Passage Three Introduction to Microsoft SQL Server 2000.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
Database Architectures and the Web Session 5
III. Current Trends: 2 - Distributed DBMSsSlide 1/47 III. Current Trends Distributed DBMSs: Advanced Concepts 3C13/D63C13/D6.
Distributed DBMSs - Concepts and Design Transparencies
Database Design – Lecture 16
Replication Database replication is the process of sharing data between databases in different locations. Tables and/or fragments (replicas) copied at.
Distributed and mobile DBMSs Transparencies. ©Pearson Education 2009 Chapter 16 - Objectives Main concepts of distributed DBMSs (DDBMSs) Differences between.
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
Chapter 23 Distributed DBMSs - Advanced Concepts Transparencies.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 12 Distributed Database Management Systems.
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
Overview – Chapter 11 SQL 710 Overview of Replication
Publish / Subscribe Database Log Shipping over Bittorent P2P CS 848 Fall 2006 Univeristy of Waterloo Project Presentation by N. T c h e r v e n s k i.
Module 11: Introducing Replication. Overview Introduction to Distributed Data Introduction to SQL Server Replication SQL Server Replication Agents SQL.
Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using.
Distributed Databases
1 Distributed Databases BUAD/American University Distributed Databases.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
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.
MBA 664 Database Management Systems Dave Salisbury ( )
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
1 Lecture 10: Distributed Databases – Replication and Fragmentation Advanced Databases CG096 Nick Rossiter.
1 Lecture 8 Distributed Data Bases: Replication and Fragmentation.
Distributed Databases
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Introduction to Databases Transparencies
Database Architectures and the Web
Distributed Database Management Systems
Chapter 12 Distributed Database Management Systems
Glasgow, SQL Server Meetup
Transaction Management and Concurrency Control
Introduction to Replication
Introduction to Databases Transparencies
6.4 Data and File Replication
Distributed DBMS Concepts of Distributed DBMS
Database Architectures and the Web
#01 Client/Server Computing
Introduction There are many situations in which we might use replicated data Let’s look at another, different one And design a system to work well in that.
Outline Midterm results summary Distributed file systems – continued
Database Processing: David M. Kroenke’s Chapter Nine: Part One
7.1. CONSISTENCY AND REPLICATION INTRODUCTION
Introduction to Databases Transparencies
Chapter 10 Transaction Management and Concurrency Control
Typically data is extracted from multiple sources
Distributed Databases
Introduction to Databases Transparencies
Introduction of Week 14 Return assignment 12-1
Distributed Databases
#01 Client/Server Computing
Presentation transcript:

Chapter Name Replication and Mobile Databases Transparencies September 98 Chapter 24 Replication and Mobile Databases Transparencies © Pearson Education Limited 1995, 2005

Chapter 24 - Objectives How a replicated database differs from a distributed database. The benefits of database replication. Distributed deadlock detection. Examples of applications that use database replication. Basic components of a replication system. © Pearson Education Limited 1995, 2005

Chapter 24 - Objectives How synchronous replication differs from asynchronous replication. The main types of data ownership are master/salve, workflow, and update-anywhere. The functionality of a database replication server. Main implementation issues associated with database replication. © Pearson Education Limited 1995, 2005

Chapter 24 - Objectives How mobile computing supports the mobile worker. Functionality of a mobile DBMS. How Oracle DBMS supports database replication. © Pearson Education Limited 1995, 2005

Introduction to Database Replication Functionality of DDBMS is attractive. However, implementations of required protocols and algorithms are complex and can cause problems that may outweigh advantages. Alternative and more simplify approach to data distribution is provided by a replication server. Every major database vendor has replication solution. © Pearson Education Limited 1995, 2005

Introduction to Database Replication Database Replication is the process of copying and maintaining database objects, such as relations, in multiple databases that make up a distributed database system. © Pearson Education Limited 1995, 2005

Benefits of Database Replication © Pearson Education Limited 1995, 2005

Applications of Replication Replication supports a variety of applications that have very different requirements. Some applications are supported with only limited synchronization between the copies of the database and the central database system. Other applications demand continuous synchronization between all copies of the database. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication Replication object is a database object such as a relation, index, view, procedure, or function existing on multiple servers in a distributed database system. In a replication environment, any updates made to a replication object at one site are applied to the copies at all other sites. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication Replication objects are managed using replication groups. A replication group is a collection of replication objects that are logically related. A replication group can exist at multiple replication sites. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication Replication environments support two basic types of sites: master sites and slave sites. A replication group can be associated with one or more master sites and with one or more slave sites. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication One site can be both master site for one replication group and slave site for different replication group. However, one site cannot be both the master site and slave site for same replication group. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication A master site controls a replication group and the objects in that group. This is achieved by maintaining a complete copy of all objects in a replication group and by propagating any changes to a replication group to any slave sites. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication A slave site can contain all or a subset of objects from a replication group. However, slave sites only contain a snapshot of a replication group. Typically, a snapshot site is refreshed periodically to synchronize it with its master site. © Pearson Education Limited 1995, 2005

Basic Components of Database Replication For a replication environment with many master sites, all of those sites communicate directly with one another to continually propagate data changes in the replication group. © Pearson Education Limited 1995, 2005

Synchronous Versus Asynchronous Replication Synchronous – updates to replicated data are part of enclosing transaction. If one or more sites that hold replicas are unavailable transaction cannot complete. Large number of messages required to coordinate synchronization. Asynchronous - target database updated after source database modified. Delay in regaining consistency may range from few seconds to several hours or even days. © Pearson Education Limited 1995, 2005

Data Ownership Ownership relates to which site has privilege to update the data. Main types of ownership are: Master/slave (or asymmetric replication), Workflow, Update-anywhere (or peer-to-peer or symmetric replication). © Pearson Education Limited 1995, 2005

Master/Slave Ownership Asynchronously replicated data is owned by one (master) site, and can be updated by only that site. Using ‘publish-and-subscribe’ metaphor, master site makes data available. Other sites ‘subscribe’ to data owned by master site, receiving read-only copies. Potentially, each site can be master site for non-overlapping data sets, but update conflicts cannot occur. © Pearson Education Limited 1995, 2005

Master/Slave Ownership – Data Dissemination © Pearson Education Limited 1995, 2005

Master/Slave Ownership – Data Consolidation © Pearson Education Limited 1995, 2005

Workflow Ownership Avoids update conflicts, while providing more dynamic ownership model. Allows right to update replicated data to move from site to site. However, at any one moment, only ever one site that may update that particular data set. Example is order processing system, which follows series of steps, such as order entry, credit approval, invoicing, shipping, and so on. © Pearson Education Limited 1995, 2005

Workflow Ownership © Pearson Education Limited 1995, 2005

Update-Anywhere Ownership Creates peer-to-peer environment where multiple sites have equal rights to update replicated data. Allows local sites to function autonomously, even when other sites are not available. Shared ownership can lead to conflict scenarios and have to employ methodology for conflict detection and resolution. © Pearson Education Limited 1995, 2005

Update-Anywhere Ownership © Pearson Education Limited 1995, 2005

Replication Servers Functionality Basic function is copy data from one database to another (using synch. or asynch. replication). Other functions include: Scalability Mapping and Transformation Object Replication Specification of Replication Schema Subscription mechanism Initialization mechanism Easy Administration © Pearson Education Limited 1995, 2005

Implementation Issues Issues associated with the provision of data replication by the replication server include: transactional updates; snapshots and database triggers; conflict detection and resolution. © Pearson Education Limited 1995, 2005

Non-Transactional versus Transactional Update Early replication mechanisms were non-transactional. Data was copied without maintaining atomicity of transaction. With transactional-based mechanism, structure of original transaction on source database is also maintained at target site. © Pearson Education Limited 1995, 2005

Non-Transactional versus Transactional Update © Pearson Education Limited 1995, 2005

Snapshots Allow asynchronous distribution of changes to individual tables, collections of tables, views, or partitions of tables according to pre-defined schedule. Common approach for snapshots uses the recovery log, minimizing the extra overhead to the system. © Pearson Education Limited 1995, 2005

Snapshots In some DBMSs, process is part of server, while in others it runs as separate external server. In event of network or site failure, need queue to hold updates until connection is restored. To ensure integrity, order of updates must be maintained during delivery. © Pearson Education Limited 1995, 2005

Database Triggers Could allow users to build their own replication applications using database triggers. Users’ responsibility to create code within trigger that will execute whenever appropriate event occurs. © Pearson Education Limited 1995, 2005

Database Triggers CREATE TRIGGER StaffAfterInsRow BEFORE INSERT ON Staff FOR EACH ROW BEGIN INSERT INTO StaffDuplicate@Rentals.Glasgow.North.Com VALUES (:new.staffNo, :new:fName, :new:lName, :new.position, :new:sex, :new.DOB, :new:salary, :new:branchNo); END; © Pearson Education Limited 1995, 2005

Database Triggers - Drawbacks Management and execution of triggers have a performance overhead. Burden on application/network if master table updated frequently. Triggers cannot be scheduled. Difficult to synchronize replication of multiple related tables. Activation of triggers cannot be easily undone in event of abort or rollback. © Pearson Education Limited 1995, 2005

Conflict Detection and Resolution When multiple sites are allowed to update replicated data, need to detect conflicting updates and restore data consistency. For a single table, source site could send both old and new values for any rows updated since last refresh. At target site, replication server can check each row in target database that has also been updated against these values. © Pearson Education Limited 1995, 2005

Conflict Detection and Resolution Also want to detect other types of conflict such as violation of referential integrity. Some of most common mechanisms are: Earliest and latest timestamps. Site Priority. Additive and average updates. Minimum and maximum values. User-defined. Hold for manual resolution. © Pearson Education Limited 1995, 2005

Mobile Databases Increasing demands on mobile computing to provide types of support required by growing number of mobile workers. Work as if in the office but in reality working from remote locations. ‘Office’ may accompany remote worker in form of laptop, PDA (Personal Digital Assistant), or other Internet access device. © Pearson Education Limited 1995, 2005

Mobile Database Database that is portable and physically separate from a centralized database server but is capable of communicating with server from remote sites allowing the sharing of corporate data. © Pearson Education Limited 1995, 2005

Mobile DBMS © Pearson Education Limited 1995, 2005

Mobile DBMS Functionality required of mobile DBMSs includes ability to: communicate with centralized database server through modes such as wireless or Internet access; replicate data on centralized database server and mobile device; synchronize data on centralized database server and mobile device; capture data from various sources such as Internet; manage/analyze data on the mobile device; create customized mobile applications. © Pearson Education Limited 1995, 2005