Distributed Database Management Systems: Lecture 21. The main topics covered in this chapter include: types of fragmentation with horizontal fragmentation, vertical fragmentation; storing a separate copy of database at each of two or three or more sites;...
Trang 1Distributed Database Management Systems
Trang 2Lecture # 21
Trang 3Fragmentation: One of the possible way we can implement
a DDBS
In the previous lectures
Trang 4Types of Fragmentation
• Horizontal Fragmentation
• Vertical Fragmentation
Trang 5Types of Horizontal
Fragmentation
1 Primary Horizontal Fragmentation
2 Derived Horizontal Fragmentation
Trang 6Vertical Fragmentation
Vertical Fragmentation is relatively more complex Why ?
Trang 7In today’s Lecture
Trang 8Storing a separate copy of database
at each of two or
three or more sites
Trang 9integrity routines (if
replicated data is refreshed
at scheduled intervals.)
Trang 10–De-couples nodes
(transactions proceed
even if some nodes are
down.)
–Reduced network traffic at
prime time (if updates can
be delayed.)
Trang 11• Disadvantages of
Replication
–Additional requirements
for storage space.
–Additional time for
update operations.
Trang 12–Complexity and cost of
updating.
–Integrity exposure of getting
incorrect data if replicated
data is not updated
simultaneously.
• Therefore, better when
used for non-volatile data
Trang 13Replication Architecture in SQL
Server
Trang 14Replication uses a
publish-subscribe
model for distributing data
Trang 15A Publication is group of related data and objects that we want to replicate together.
Publication
Trang 16A Publisher is a server
that is the source of data
to be replicated
Publisher
Trang 17A Subscriber is a server that receives the data
replicated by the
publisher
Subscriber
Trang 18• The Subscriber
defines a
subscription to a
particular publication
Trang 19• A Distributor is a server
that performs various tasks when moving articles from Publishers to Subscribers
• The actual tasks performed
depend on the type of
replication performed
Trang 20SQL Server Replication Agents
Agents are the software components used in
replication
Trang 21Types Of SQL Server Replication Agents
Trang 22• Snapshot Agent: Runs at least once
in all replicas
different activities, mainly distributes publication to subscribers
transactional rep, reads log files of all servers involved
different servers made since last
snapshot
Trang 23Push/Pull subscriptions; depends where the
distributor is running.
Trang 24Replication Models
Trang 25Central Publisher / Distributor
Publ/Dist Sever
Trang 26Central Publisher / Remote Distributor
Publisher Remote
Distr
Trang 27Replication Methods
• Snapshot Replication
• Transaction Replication.
• Merge Replication.
Trang 28Snapshot Replication
Trang 29• Preferred when
subscribers need only access
read-• Higher latency (working
without updated data)
low Bandwidth
Trang 30• Used in all types,
initially
Trang 31Summary