Chapter 24 Replication and Mobile Databases Transparencies © Pearson Education Limited 1995, 2005.

Slides:



Advertisements
Similar presentations
1 Senn, Information Technology, 3 rd Edition © 2004 Pearson Prentice Hall James A. Senns Information Technology, 3 rd Edition Chapter 7 Enterprise Databases.
Advertisements

1 Concurrency: Deadlock and Starvation Chapter 6.
1
Distributed Systems Architectures
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Part 3 Probabilistic Decision Models
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
DCV: A Causality Detection Approach for Large- scale Dynamic Collaboration Environments Jiang-Ming Yang Microsoft Research Asia Ning Gu, Qi-Wei Zhang,
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
Create an Application Title 1A - Adult Chapter 3.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Custom Services and Training Provider Details Chapter 4.
Distributed databases 1. 2 Outline introduction principles / objectives problems.
1 Term 2, 2004, Lecture 9, Distributed DatabasesMarian Ursu, Department of Computing, Goldsmiths College Distributed databases 3.
Database Systems: Design, Implementation, and Management
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Week 2 The Object-Oriented Approach to Requirements
Chapter 18 Methodology – Monitoring and Tuning the Operational System Transparencies © Pearson Education Limited 1995, 2005.
EU market situation for eggs and poultry Management Committee 20 October 2011.
Chapter 10: Virtual Memory
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
Lecture plan Transaction processing Concurrency control
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Introduction to Databases
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.1 Module 2 Networking Fundamentals.
April 2003 ONLINE SERVICE DELIVERY Presentation. 2 What is Online Service Delivery? Vision The current vision of the Online Service Delivery program is.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Chapter 10: The Traditional Approach to Design
Analyzing Genes and Genomes
Systems Analysis and Design in a Changing World, Fifth Edition
Distributed Database Management Systems
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Chapter 13 The Data Warehouse
Outline Introduction Background Distributed Database Design
Energy Generation in Mitochondria and Chlorplasts
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 8Integrating Access Data.
Manajemen Basis Data Pertemuan 12 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Database Architectures and the Web
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
Overview Distributed vs. decentralized Why distributed databases
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
III. Current Trends: 2 - Distributed DBMSsSlide 1/47 III. Current Trends Distributed DBMSs: Advanced Concepts 3C13/D63C13/D6.
Distributed DBMSs - Concepts and Design Transparencies
Distributed and mobile DBMSs Transparencies. ©Pearson Education 2009 Chapter 16 - Objectives Main concepts of distributed DBMSs (DDBMSs) Differences between.
Overview – Chapter 11 SQL 710 Overview of 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.
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Chapter Name Replication and Mobile Databases Transparencies
Distributed DBMS Concepts of Distributed DBMS
Presentation transcript:

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

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

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

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

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

6 Introduction to Database Replication u 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

7 Benefits of Database Replication © Pearson Education Limited 1995, 2005

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

9 Basic Components of Database Replication u Replication object is a database object such as a relation, index, view, procedure, or function existing on multiple servers in a distributed database system. u 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

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

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

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

13 Basic Components of Database Replication u A master site controls a replication group and the objects in that group. u 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

14 Basic Components of Database Replication u 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. u Typically, a snapshot site is refreshed periodically to synchronize it with its master site. © Pearson Education Limited 1995, 2005

15 Basic Components of Database Replication u 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

16 Synchronous Versus Asynchronous Replication u 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. u 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

17 Data Ownership u Ownership relates to which site has privilege to update the data. u 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

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

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

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

21 Workflow Ownership u Avoids update conflicts, while providing more dynamic ownership model. u Allows right to update replicated data to move from site to site. u However, at any one moment, only ever one site that may update that particular data set. u 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

22 Workflow Ownership © Pearson Education Limited 1995, 2005

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

24 Update-Anywhere Ownership © Pearson Education Limited 1995, 2005

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

26 Implementation Issues u 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

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

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

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

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

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

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

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

34 Conflict Detection and Resolution u When multiple sites are allowed to update replicated data, need to detect conflicting updates and restore data consistency. u For a single table, source site could send both old and new values for any rows updated since last refresh. u 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

35 Conflict Detection and Resolution u Also want to detect other types of conflict such as violation of referential integrity. u 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

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

37 Mobile Database u 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

38 Mobile DBMS © Pearson Education Limited 1995, 2005

39 Mobile DBMS u 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