Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Course : M0744 - Database Management

Year : 2015
Replication And Mobile
Databases

Session 08-09
TOPICS

• Introduction to Database Replication


• Benefits of Database Replication
• Applications of Replication
• Basic Components of Database Replication
• Database Replication Environments
• Replication Servers
• Introduction to Mobile Databases
• Oracle Replication
Bina Nusantara University 2
Introduction to Database
Replication

• The process of copying and maintaining database object, such as


relations, in multiple databases that make up a distributed database
system.

• Replication Servers
• Currently some prototype and special-purpose DDBMSs, and many
of the protocols and problems are well understood.
• However, to date, general purpose DDBMSs have not been widely
accepted.
• Instead, database replication, the copying and maintenance of data
on multiple servers, may be more preferred solution.
• Every major database vendor has replication solution.
Bina Nusantara University 3
Introduction to Database
Replication

• Functionality
• At basic level, has to be able to copy data from one
database to another (synch. or asynch.).
• Other functions include:
• Scalability.
• Mapping and Transformation.
• Object Replication.
• Specification of Replication Schema.
• Subscription mechanism.
• Initialization mechanism.
Bina Nusantara University 4
Benefits of Database Replication

• Availability
• Reliability
• Performance
• Load Reduction
• Disconnected computing
• Supports many users
• Supports advanced applications
Bina Nusantara University 5
Applications of Replication

• Replication supports a variety of application


that have very different requirements
• Some applications are adequately supported
with only limited synchronization between the
copies of the database and the corporate
database system, while other applications
demand continuos synchronization between
all copies of the database
Bina Nusantara University 6
Applications of Replication

• For example
• support for a remote sales team typically
requires the periodic synchronization of a large
number of small

• remote mobile sites with the corporate database


system

Bina Nusantara University 7


Basic Components of Database Replication

• Replication Object

• Replication Group

• Replication Sites
• Master sites
• Slaves sites

Bina Nusantara University 8


Database Replication
Environments

• Synchronous versus Asynchronous


Replication

• Data Ownership

Bina Nusantara University 9


Database Replication
Environments

• 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.

Bina Nusantara University 10


Database Replication
Environments

• Asynchronous - target database


updated after source database
modified.
• Delay in regaining consistency may
range from few seconds to several
hours or even days.
Bina Nusantara University 11
Database Replication
Environments

• 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

Bina Nusantara University 12


Database Replication
Environments

• Master/Slave
• Workflow
• Update-anywhere

Bina Nusantara University 13


Replication Servers

• 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
Bina Nusantara University 14
Database Replication
Environments

• Master/Slave Ownership – Data


Dissemination

Bina Nusantara University 15


Database Replication
Environments

• Master/Slave Ownership – Data


Consolidation

Bina Nusantara University 16


Database Replication
Environments

• 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.
Bina Nusantara University 17
Database Replication
Environments

• Workflow Ownership

Bina Nusantara University 18


Database Replication
Environments

• 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.

Bina Nusantara University 19


Database Replication
Environments

• Update-Anywhere Ownership

Bina Nusantara University 20


Replication Servers

• Replication Server Functionality

• Implementation Issues

Bina Nusantara University 21


Replication Servers

• Replication Server Functionality


Scalability
Mapping and Transformation
Object Replication
Specification of Replication Schema
Subscription Mechanism
Initialization Mechanism
Easy Administration
Bina Nusantara University 22
Replication Servers

• Implementation Issues
• Transactional updates
• Snapshots and database triggers
• Conflict detection and resolution

Bina Nusantara University 23


Replication Servers

• (a) Non-transactional replication


updates
• (b) Transactional replication updates

Bina Nusantara University 24


Introduction to Mobile Databases

• Mobile database
• A database that is portable and
physically separate from the corporate
database server but is capable of
communicating with that server from
remote sites allowing the sharing of
corporate data
Bina Nusantara University 25
Introduction to Mobile Databases

• Typical Architecture for a mobile


database environment

Bina Nusantara University 26


Introduction to Mobile Databases

• The components of a mobile


database environment include :
• Corporate database server and DBMS
• Remote database and DBMS
• Mobile database plaftorm
• Two-way communication links between the
corporate and mobile DBMS

Bina Nusantara University 27


Oracle Replication

• Oracle’s Replication Functionality


• Types of replication
• Replication Groups
• Replication Sites
• Refresh Groups

Bina Nusantara University 28


Oracle Replication
Read-only snapshots
Updatable snapshots
• Types of replication
Multimaster replication
Procedural replication

Bina Nusantara University 29


Oracle Replication

• Replication Sites
• Master site
• Snapshots site

Bina Nusantara University 30


Oracle Replication

• Refresh Groups
• Refresh Types
• Complete
• Fast
• Force

Bina Nusantara University 31

You might also like