SlideShare a Scribd company logo
Combined units of BCA -II & BCA –III Presented by: Aakanksha jain
CONTENT
Distributed Database Design1
Architecture of Distributed database processing system2
Data Communication concept3
Concurrency control and recovery4
Distributed database design
Distributed Database Designs are nothing but multiple, logically related
Database systems, physically distributed over several sites, using a
Computer Network, which is usually under a centralized site control.
Distributed database design refers to the following problem:
Given a database and its workload, how should the database be split
and allocated to sites so as to optimize certain objective function
There are two issues:
(i) Data fragmentation which determines how the data should be
fragmented.
(ii) Data allocation which determines how the fragments should be
allocated.
Architecture of Distributed
Processing system
Distributed Processing architectures are generally developed depending
on three parameters −
Distribution − It states the physical distribution of data across the
different sites.
Autonomy − It indicates the distribution of control of the database
system and the degree to which each constituent DBMS can operate
independently.
Heterogeneity − It refers to the uniformity or dissimilarity of the data
models, system components and databases.
Architectural Models
Client - Server Architecture for DDBMS
This is a two-level architecture where the functionality is divided into
servers and clients. The server functions primarily encompass data
management, query processing, optimization and transaction
management. Client functions include mainly user interface. However,
they have some functions like consistency checking and transaction man
agement.
The two different client - server architecture are −
1. Single Server Multiple Client
2. Multiple Server Multiple Client
Peer- to-Peer Architecture for DDBMS
In these systems, each peer acts both as a client and a server for
imparting database services. The peers share their resource with other p
eers and co-ordinate their activities.
This architecture generally has four levels of schemas −
Global Conceptual Schema − Depicts the global logical view of data.
Local Conceptual Schema − Depicts logical data organization at each
site.
Local Internal Schema − Depicts physical data organization at each
site.
External Schema − Depicts user view of data.
Continue..
Multi - DBMS Architectures
This is an integrated database system formed by a collection of two or
more autonomous database systems.
Multi-DBMS can be expressed through six levels of schemas −
1. Multi-database View Level − Depicts multiple user views comprising
of subsets of the integrated distributed database.
2. Multi-database Conceptual Level − Depicts integrated multi-databa
se that comprises of global logical multi-database structure definitions
3. Multi-database Internal Level − Depicts the data distribution across
different sites and multi-database to local data mapping.
4. Local database View Level − Depicts public view of local data.
5. Local database Conceptual Level − Depicts local data organization
at each site.
6. Local database Internal Level − Depicts physical data organization
at each site.
Design Alternatives
The distribution design alternatives for the tables in a DDBMS are as
follows −
• Non-replicated and non-fragmented
• Fully replicated
• Partially replicated
• Fragmented
• Mixed
Design Alternatives
The distribution design alternatives for the tables in a DDBMS are as
follows −
• Non-replicated and non-fragmented
• Fully replicated
• Partially replicated
• Fragmented
• Mixed
Non-replicated & Non-fragmented
In this design alternative, different tables are placed at different sites.
Data is placed so that it is at a close proximity to the site where it is used
most. It is most suitable for database systems where the percentage of
queries needed to join information in tables placed at different sites is
low. If an appropriate distribution strategy is adopted, then this design
alternative helps to reduce the communication cost during data
processing.
Fully Replicated
In this design alternative, at each site, one copy of all the database
tables is stored. Since, each site has its own copy of the entire database,
queries are very fast requiring negligible communication cost. On the
contrary, the massive redundancy in data requires huge cost during
update operations. Hence, this is suitable for systems where a large
number of queries is required to be handled whereas the number of data
base updates is low.
Partially Replicated
Copies of tables or portions of tables are stored at different sites. The
distribution of the tables is done in accordance to the frequency of
access. This takes into consideration the fact that the frequency of
accessing the tables vary considerably from site to site. The number of
copies of the tables (or portions) depends on how frequently the
access queries execute and the site which generate the access queries.
Fragmented
In this design, a table is divided into two or more pieces referred to as
fragments or partitions, and each fragment can be stored at different
sites. This considers the fact that it seldom happens that all data stored
in a table is required at a given site. Moreover, fragmentation increases
parallelism and provides better disaster recovery. Here, there is only one
copy of each fragment in the system, i.e. no redundant data.
The three fragmentation techniques are −
• Vertical fragmentation
• Horizontal fragmentation
• Hybrid fragmentation
Fragmented
In this design, a table is divided into two or more pieces referred to as
fragments or partitions, and each fragment can be stored at different
sites. This considers the fact that it seldom happens that all data stored
in a table is required at a given site. Moreover, fragmentation increases
parallelism and provides better disaster recovery. Here, there is only one
copy of each fragment in the system, i.e. no redundant data.
The three fragmentation techniques are −
• Vertical fragmentation
• Horizontal fragmentation
• Hybrid fragmentation
Mixed Distribution
This is a combination of fragmentation and partial replications. Here, the
tables are initially fragmented in any form (horizontal or vertical), and
then these fragments are partially replicated across the different sites
according to the frequency of accessing the fragments.
Fragmentation
Fragmentation is the task of dividing a table into a set of smaller tables.
The subsets of the table are called fragments. Fragmentation can be of
three types: horizontal, vertical, and hybrid (combination of horizontal
and vertical). Horizontal fragmentation can further be classified into two
techniques: primary horizontal fragmentation and derived horizontal
fragmentation.
Fragmentation should be done in a way so that the original table can be
reconstructed from the fragments. This is needed so that the original
table can be reconstructed from the fragments whenever required. This
requirement is called “constructiveness.”
Advantages of Fragmentation
• Since data is stored close to the site of usage, efficiency of the
database system is increased.
• Local query optimization techniques are sufficient for most queries
since data is locally available.
• Since irrelevant data is not available at the sites, security and privacy
of the database system can be maintained.
• When data from different fragments are required, the access speeds
may be very high.
• In case of recursive fragmentations, the job of reconstruction will
need expensive techniques.
• Lack of back-up copies of data in different sites may render the
database ineffective in case of failure of a site.
Disadvantages of Fragmentation
Vertical Fragmentation
In vertical fragmentation, the fields or columns of a table are grouped
into fragments. In order to maintain constructiveness, each fragment
should contain the primary key field(s) of the table. Vertical fragmentation
can be used to enforce privacy of data.
For example, let us consider that a University database keeps records of
all registered students in a Student table having the following schema.
Regd_No Name Course Address Semester Fees Marks
Now, the fees details are maintained in the accounts section. In this case, th
e designer will fragment the database as follows −
Vertical Fragmentation
CREATE TABLE STD_FEES AS
SELECT Regd_No, Fees
FROM STUDENT;
Reconstruction of vertical fragmentation is performed by using Full
Outer Join operation on fragments.
Horizontal Fragmentation
Horizontal fragmentation groups the tuples of a table in accordance to values of
one or more fields. Horizontal fragmentation should also confirm to the rule of
constructiveness. Each horizontal fragment must have all columns of the origin
al base table.
For example, in the student schema, if the details of all students of Computer
Science Course needs to be maintained at the School of Computer Science,
then the designer will horizontally fragment the database as follows −
CREATE COMP_STD AS
SELECT * FROM STUDENT
WHERE COURSE = "Computer Science";
Reconstruction of horizontal fragmentation can be performed using UNION
operation on fragments.
Hybrid Fragmentation
In hybrid fragmentation, a combination of horizontal and vertical
fragmentation techniques are used. This is the most flexible
fragmentation technique since it generates fragments with minimal
extraneous information. However, reconstruction of the original table is
often an expensive task.
Hybrid fragmentation can be done in two alternative ways −
• At first, generate a set of horizontal fragments; then generate vertical
fragments from one or more of the horizontal fragments.
• At first, generate a set of vertical fragments; then generate horizontal
fragments from one or more of the vertical fragments.
Hybrid Fragmentation
In hybrid fragmentation, a combination of horizontal and vertical
fragmentation techniques are used. This is the most flexible
fragmentation technique since it generates fragments with minimal
extraneous information. However, reconstruction of the original table is
often an expensive task.
Hybrid fragmentation can be done in two alternative ways −
• At first, generate a set of horizontal fragments; then generate vertical
fragments from one or more of the horizontal fragments.
• At first, generate a set of vertical fragments; then generate horizontal
fragments from one or more of the vertical fragments.
Hybrid Fragmentation
Distribution transparency is the property of distributed databases by the
virtue of which the internal details of the distribution are hidden from the
users. The DDBMS designer may choose to fragment tables, replicate
the fragments and store them at different sites. However, since users are
oblivious of these details, they find the distributed database easy to use
like any centralized database.
The three dimensions of distribution transparency are −
• Location transparency
• Fragmentation transparency
• Replication transparency
Hybrid Fragmentation
Emp_ID Emp_Name Emp_Address Emp_Age Emp_Salary
101 Surendra Baroda 25 15000
102 Jaya Pune 37 12000
103 Jayesh Pune 47 10000
•Hybrid fragmentation can be achieved by performing horizontal and vertical
partition together.
•Mixed fragmentation is group of rows and columns in relation.
Example: Consider the following table which consists of employee information.
Hybrid Fragmentation
Fragmentation1:
SELECT * FROM Emp_Name WHERE Emp_Age < 40
Fragmentation2:
SELECT * FROM Emp_Id WHERE Emp_Address= 'Pune' AND Salary < 14
000
Reconstruction of Hybrid Fragmentation:
The original relation in hybrid fragmentation is reconstructed by performin
g UNION and FULL OUTER JOIN.
Data communication concepts
Data communication refers to the exchange of data between a source and
a receiver via form of transmission media such as a wire cable.
Data communication is said to be local if communicating devices are in the
same building or a similarly restricted geographical area.
A data communication system may collect data from remote locations
through data transmission circuits, and then outputs processed results to
remote locations. The different data communication techniques which are
presently in widespread use evolved gradually either to improve the data
communication techniques already existing or to replace the same with
better options and features.
Infographic Style
Insert the title of your subtitle Here
Modern PowerPoint
Presentation
Get a modern PowerPoint Presentation that is beautifully
designed. Easy to change colors, photos and Text. You
can simply impress your audience and add a unique zing
and appeal to your Presentations. Easy to change colors,
photos and Text. Get a modern PowerPoint Presentation
that is beautifully designed.
Easy to change colors, photos and Text. You can simply
impress your audience and add a unique zing and appeal
to your Presentations.
Your Text Here
Components of data communication system
A Communication system has following components:
1. Message: It is the information or data to be communicated. It can consist
of text, numbers, pictures, sound or video or any combination of these.
2. Sender: It is the device/computer that generates and sends that
message
3. Receiver: It is the device or computer that receives the message. The
location of receiver computer is generally different from the sender
computer. The distance between sender and receiver depends upon the
types of network used in between.
4. Medium: It is the channel or physical path through which the message is
carried from sender to the receiver. The medium can be wired like
twisted pair wire, coaxial cable, fiber-optic cable or wireless like laser, rad
io waves, and microwaves.
Concurrency Control and Recovery
Concurrency control (CC) is a process to ensure that data is updated
correctly and appropriately when multiple transactions are concurrently
executed in DBMS (Connolly & Begg, 2015).
Distributed Databases encounter a number of concurrency control and
recovery problems which are not present in centralized databases.
Some of them are listed below:
• Dealing with multiple copies of data items
• Failure of individual sites
• Communication link failure
• Distributed commit
• Distributed deadlock
Concurrency Control and Recovery
Concurrency control (CC) is a process to ensure that data is updated
correctly and appropriately when multiple transactions are concurrently
executed in DBMS (Connolly & Begg, 2015).
Distributed Databases encounter a number of concurrency control and
recovery problems which are not present in centralized databases.
Some of them are listed below:
• Dealing with multiple copies of data items
• Failure of individual sites
• Communication link failure
• Distributed commit
• Distributed deadlock
Concurrency Control
1. Dealing with multiple copies of data items:
The concurrency control must maintain global consistency. Likewise the recovery
mechanism must recover all copies and maintain consistency after recovery.
2. Failure of individual sites:
Database availability must not be affected due to the failure of one or two sites
and the recovery scheme must recover them before they are available for use.
3. Communication link failure:
This failure may create network partition which would affect database availability e
ven though all database sites may be running.
4. Distributed commit:
A transaction may be fragmented and they may be executed by a number of sites.
This require a two or three-phase commit approach for transaction commit.
Concurrency Control
5. Distributed deadlock:
Since transactions are processed at multiple sites, two or more sites may get
involved in deadlock. This must be resolved in a distributed manner.
Concurrency control protocols can be broadly divided into two categories −
• Lock based protocols
• Time stamp based protocols
Concurrency Control Protocol
1. Lock-based Protocols
Database systems equipped with lock-based protocols use a mechanism by which
any transaction cannot read or write data until it acquires an appropriate lock on it.
Locks are of two kinds −
• Binary Locks − A lock on a data item can be in two states; it is either locked
or unlocked.
• Shared/exclusive − This type of locking mechanism differentiates the locks
based on their uses. If a lock is acquired on a data item to perform a write
operation, it is an exclusive lock. Allowing more than one transaction to write o
n the same data item would lead the database into an inconsistent state. Read
locks are shared because no data value is being changed.
Continue..
1. Binary Locks:
A lock is kind of a mechanism that ensures that the integrity of data is maintained.
A binary lock can have two states or values: locked and unlocked (or 1 and 0, for
simplicity). A distinct lock is associated with each database item X.
If the value of the lock on X is 1, item X cannot be accessed by a database
operation that requests the item. If the value of the lock on X is 0, the item can be
accessed when requested. We refer to the current value (or state) of the lock
associated with item X as LOCK(X).
There are 2 operation in binary locking:
(i) Lock_item(X):
(ii) Unlock_item (X):
Continue..
1. Lock_item(X):
A transaction requests access to an item X by first issuing a lock_item(X)
operation. If LOCK(X) = 1, the transaction is forced to wait. If LOCK(X) = 0,
it is set to 1 (the transaction locks the item) and the transaction is allowed to
access item X.
2. Unlock_item (X):
When the transaction is through using the item, it issues an unlock_item(X)
operation, which sets LOCK(X) to 0 (unlocks the item) so that X may be accessed
by other transactions. Hence, a binary lock enforces mutual exclusion on the data
item ; i.e., at a time only one transaction can hold a lock.
Continue..
2. Shared / Exclusive Locking :
Shared lock :
Shared lock is placed when we are reading the data, multiple shared locks can be
placed on the data but when a shared lock is placed no exclusive lock can be
placed. These locks are referred as read locks, and denoted by 'S'.
If a transaction T has obtained Shared-lock on data item X, then T can read X, but
cannot write X. Multiple Shared lock can be placed simultaneously on a data item.
For example, when two transactions are reading Steve’s account balance, let
them read by placing shared lock but at the same time if another transaction wants
to update the Steve’s account balance by placing Exclusive lock, do not allow it
until reading is finished.
Continue..
Exclusive lock :
Exclusive lock is placed when we want to read and write the data. This lock allows
both the read and write operation, Once this lock is placed on the data no other
lock (shared or Exclusive) can be placed on the data until Exclusive lock is
released.
For example, when a transaction wants to update the Steve’s account balance,
let it do by placing X lock on it but if a second transaction wants to read the data
( S lock) don’t allow it, if another transaction wants to write the data(X lock) don’t
allow that either.
These Locks are referred as Write locks, and denoted by 'X'.
If a transaction T has obtained Exclusive lock on data item X, then T can be read
as well as write X. Only one Exclusive lock can be placed on a data item at a time.
This means multiples transactions does not modify the same data simultaneously.
Continue..
Lock Compatibility Matrix
_________________
| | S | X |
|-----------------------------
| S | True | False |
|-----------------------------
| X | False | False |
-----------------------------
How to read this matrix?:
There are two rows, first row says that when S lock is placed, another S lock can
be acquired so it is marked true but no Exclusive locks can be acquired so
marked False.
In second row, When X lock is acquired neither S nor X lock can be acquired so
both marked false
TIME STAMP BASED PROTOCOL
Time stamp is used to link time with some event or in more particular say
transaction. To ensure serializability, we associate transaction with the time
called as time stamp. In simple words we order the transaction based on the
time of arrival and there is no deadlock.
For each data item, two time stamp are maintained.
Read time stamp – time stamp of youngest transaction which has performed o
peration read on the data item.
Write time stamp – time stamp of youngest transaction which has performed o
peration write on the data item.
Let the transaction T’s time-stamp be denoted by TS(T), Read time-stamp of d
ata-item be denoted by R-timestamp(X), and Write time-stamp of data-item be
denoted by W-timestamp(X).
TIMESTAMP BASED PROTOCOL
The protocol works as follows-
• If a transaction issues read operation
If Ts(T) < W-timestamp(X) then
read request is rejected
else execute the transaction and update the time-stamp.
• If a transaction operates write operation
If Ts(T) < R-timestamp(X) or If TS(T) <W-timestamp(X) then
write request is rejected
else transaction gets executed and update the time-stamp.
TIMESTAMP BASED PROTOCOL
Thomas' Write Rule
This rule states if TS(Ti) < W-timestamp(X), then the operation is rejected and
Ti is rolled back.
Time-stamp ordering rules can be modified to make the schedule view
serializable.
Instead of making Ti rolled back, the 'write' operation itself is ignored.
Need of Recovery
Media failure, e.g. disc-head crash.
Part of persistent store is lost – need to restore it.
Transactions in progress may be using this area –abort uncommitted transactions
System failure e.g. crash - main memory lost.
Persistent store is not lost but may have been changed by uncommitted
transactions.
Also, committed transactions’ effects may not yet have reached persistent objects.
Transaction abort
Need to undo any changes made by the aborted transaction.
Need of Recovery
When a DBMS recovers from a crash, it should maintain the following −
• It should check the states of all the transactions, which were being executed.
• A transaction may be in the middle of some operation; the DBMS must ensure
the atomicity of the transaction in this case.
• It should check whether the transaction can be completed now or it needs to
be rolled back.
• No transactions would be allowed to leave the DBMS in an inconsistent state.
Recovery with Concurrent Transactions
Checkpoint
Keeping and maintaining logs in real time and in real environment may fill out all
the memory space available in the system. As time passes, the log file may grow
too big to be handled at all. Checkpoint is a mechanism where all the previous lo
gs are removed from the system and stored permanently in a storage disk.
Checkpoint declares a point before which the DBMS was in consistent state, and
all the transactions were committed.
Recovery
When a system with concurrent transactions crashes and recovers, it behaves in
the following manner −
• The recovery system reads the logs backwards from the end to the last check
point.
• It maintains two lists, an undo-list and a redo-list.
Recovery with Concurrent Transactions
• If the recovery system sees a log with <Tn, Start> and <Tn, Commit> or just
<Tn, Commit>, it puts the transaction in the redo-list.
• If the recovery system sees a log with <Tn, Start> but no commit or abort log
found, it puts the transaction in undo-list.
All the transactions in the undo-list are then undone and their logs are removed.
All the transactions in the redo-list and their previous logs are removed and then
redone before saving their logs.
Reference
• https://www.tutorialspoint.com.
• Concurrency Control and Recovery in Database Systems First Edition
Philip Bernstein, Vassos Hadzilacos, Nathan Goodman .
• Database System concept ,design and application © Pearson Education
Limited 1995, 2005.
• https://tutorialink.com.
• https://www.geeksforgeeks.org.
Thank you

More Related Content

What's hot

Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
Pooja Dixit
 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
Md. Mashiur Rahman
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Gyanmanjari Institute Of Technology
 
Distributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data ControlDistributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data Control
Gyanmanjari Institute Of Technology
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Gyanmanjari Institute Of Technology
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
Pooja Dixit
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
Mythili Kannan
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
Hardik Patil
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture NotesJasour Obeidat
 
Ordbms
OrdbmsOrdbms
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
Abhilasha Lahigude
 
Chapter25
Chapter25Chapter25
Chapter25
gourab87
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
Ravinder Kamboj
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingankur bhalla
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency control
balamurugan.k Kalibalamurugan
 

What's hot (20)

Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
 
Distributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data ControlDistributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data Control
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture Notes
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
 
Chapter25
Chapter25Chapter25
Chapter25
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency control
 

Similar to Distributed Database Management System

DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdf
SurajGhadge15
 
Lec 8 (distributed database)
Lec 8 (distributed database)Lec 8 (distributed database)
Lec 8 (distributed database)
Sudarshan Mondal
 
Adbms 30 data placement
Adbms 30 data placementAdbms 30 data placement
Adbms 30 data placement
Vaibhav Khanna
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed Databases
MythiliMurugan3
 
DDBS PPT (1).pptx
DDBS PPT (1).pptxDDBS PPT (1).pptx
DDBS PPT (1).pptx
HarshitSingh334328
 
Fragmentation.pdf
Fragmentation.pdfFragmentation.pdf
Fragmentation.pdf
KhuzaimaShahid7
 
Pptofdistributeddb
PptofdistributeddbPptofdistributeddb
Pptofdistributeddb
Mahavir Devmane
 
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptxSantosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
SANTOSH KUMAR MEHER
 
ditributed databases
ditributed databasesditributed databases
ditributed databases
Hira Awan
 
Distributed Database Management System.pptx
Distributed Database Management System.pptxDistributed Database Management System.pptx
Distributed Database Management System.pptx
MajidRajper4
 
Adbms 27 parallel database distribution architecture
Adbms 27 parallel database distribution architectureAdbms 27 parallel database distribution architecture
Adbms 27 parallel database distribution architecture
Vaibhav Khanna
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song songLê Anh Trung
 
1 ddbms jan 2011_u
1 ddbms jan 2011_u1 ddbms jan 2011_u
1 ddbms jan 2011_u
betheperformer
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
Sonia Panesar
 
2.pptx
2.pptx2.pptx
A Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed DatabaseA Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed Database
Jose Katab
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
Md. Mashiur Rahman
 
DDBMS
DDBMSDDBMS
Unit 1 dbms
Unit 1 dbmsUnit 1 dbms
Unit 1 dbms
Sweta Singh
 

Similar to Distributed Database Management System (20)

DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdf
 
Lec 8 (distributed database)
Lec 8 (distributed database)Lec 8 (distributed database)
Lec 8 (distributed database)
 
Adbms 30 data placement
Adbms 30 data placementAdbms 30 data placement
Adbms 30 data placement
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed Databases
 
DDBS PPT (1).pptx
DDBS PPT (1).pptxDDBS PPT (1).pptx
DDBS PPT (1).pptx
 
Fragmentation.pdf
Fragmentation.pdfFragmentation.pdf
Fragmentation.pdf
 
Pptofdistributeddb
PptofdistributeddbPptofdistributeddb
Pptofdistributeddb
 
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptxSantosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
 
ditributed databases
ditributed databasesditributed databases
ditributed databases
 
Distributed Database Management System.pptx
Distributed Database Management System.pptxDistributed Database Management System.pptx
Distributed Database Management System.pptx
 
Adbms 27 parallel database distribution architecture
Adbms 27 parallel database distribution architectureAdbms 27 parallel database distribution architecture
Adbms 27 parallel database distribution architecture
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song song
 
1 ddbms jan 2011_u
1 ddbms jan 2011_u1 ddbms jan 2011_u
1 ddbms jan 2011_u
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
2.pptx
2.pptx2.pptx
2.pptx
 
A Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed DatabaseA Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed Database
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
 
DDBMS
DDBMSDDBMS
DDBMS
 
Unit 1 dbms
Unit 1 dbmsUnit 1 dbms
Unit 1 dbms
 

More from AAKANKSHA JAIN

Random forest and decision tree
Random forest and decision treeRandom forest and decision tree
Random forest and decision tree
AAKANKSHA JAIN
 
Dimension reduction techniques[Feature Selection]
Dimension reduction techniques[Feature Selection]Dimension reduction techniques[Feature Selection]
Dimension reduction techniques[Feature Selection]
AAKANKSHA JAIN
 
Inheritance in OOPs with java
Inheritance in OOPs with javaInheritance in OOPs with java
Inheritance in OOPs with java
AAKANKSHA JAIN
 
OOPs with java
OOPs with javaOOPs with java
OOPs with java
AAKANKSHA JAIN
 
Probability
ProbabilityProbability
Probability
AAKANKSHA JAIN
 
Data Mining & Data Warehousing
Data Mining & Data WarehousingData Mining & Data Warehousing
Data Mining & Data Warehousing
AAKANKSHA JAIN
 
Distributed Database Design and Relational Query Language
Distributed Database Design and Relational Query LanguageDistributed Database Design and Relational Query Language
Distributed Database Design and Relational Query Language
AAKANKSHA JAIN
 
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMSDETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
AAKANKSHA JAIN
 
Fingerprint matching using ridge count
Fingerprint matching using ridge countFingerprint matching using ridge count
Fingerprint matching using ridge count
AAKANKSHA JAIN
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 
Advance image processing
Advance image processingAdvance image processing
Advance image processing
AAKANKSHA JAIN
 

More from AAKANKSHA JAIN (11)

Random forest and decision tree
Random forest and decision treeRandom forest and decision tree
Random forest and decision tree
 
Dimension reduction techniques[Feature Selection]
Dimension reduction techniques[Feature Selection]Dimension reduction techniques[Feature Selection]
Dimension reduction techniques[Feature Selection]
 
Inheritance in OOPs with java
Inheritance in OOPs with javaInheritance in OOPs with java
Inheritance in OOPs with java
 
OOPs with java
OOPs with javaOOPs with java
OOPs with java
 
Probability
ProbabilityProbability
Probability
 
Data Mining & Data Warehousing
Data Mining & Data WarehousingData Mining & Data Warehousing
Data Mining & Data Warehousing
 
Distributed Database Design and Relational Query Language
Distributed Database Design and Relational Query LanguageDistributed Database Design and Relational Query Language
Distributed Database Design and Relational Query Language
 
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMSDETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
DETECTION OF MALICIOUS EXECUTABLES USING RULE BASED CLASSIFICATION ALGORITHMS
 
Fingerprint matching using ridge count
Fingerprint matching using ridge countFingerprint matching using ridge count
Fingerprint matching using ridge count
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Advance image processing
Advance image processingAdvance image processing
Advance image processing
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 

Distributed Database Management System

  • 1. Combined units of BCA -II & BCA –III Presented by: Aakanksha jain
  • 2. CONTENT Distributed Database Design1 Architecture of Distributed database processing system2 Data Communication concept3 Concurrency control and recovery4
  • 3. Distributed database design Distributed Database Designs are nothing but multiple, logically related Database systems, physically distributed over several sites, using a Computer Network, which is usually under a centralized site control. Distributed database design refers to the following problem: Given a database and its workload, how should the database be split and allocated to sites so as to optimize certain objective function There are two issues: (i) Data fragmentation which determines how the data should be fragmented. (ii) Data allocation which determines how the fragments should be allocated.
  • 4. Architecture of Distributed Processing system Distributed Processing architectures are generally developed depending on three parameters − Distribution − It states the physical distribution of data across the different sites. Autonomy − It indicates the distribution of control of the database system and the degree to which each constituent DBMS can operate independently. Heterogeneity − It refers to the uniformity or dissimilarity of the data models, system components and databases.
  • 6. Client - Server Architecture for DDBMS This is a two-level architecture where the functionality is divided into servers and clients. The server functions primarily encompass data management, query processing, optimization and transaction management. Client functions include mainly user interface. However, they have some functions like consistency checking and transaction man agement. The two different client - server architecture are − 1. Single Server Multiple Client 2. Multiple Server Multiple Client
  • 7. Peer- to-Peer Architecture for DDBMS In these systems, each peer acts both as a client and a server for imparting database services. The peers share their resource with other p eers and co-ordinate their activities. This architecture generally has four levels of schemas − Global Conceptual Schema − Depicts the global logical view of data. Local Conceptual Schema − Depicts logical data organization at each site. Local Internal Schema − Depicts physical data organization at each site. External Schema − Depicts user view of data.
  • 9. Multi - DBMS Architectures This is an integrated database system formed by a collection of two or more autonomous database systems. Multi-DBMS can be expressed through six levels of schemas − 1. Multi-database View Level − Depicts multiple user views comprising of subsets of the integrated distributed database. 2. Multi-database Conceptual Level − Depicts integrated multi-databa se that comprises of global logical multi-database structure definitions 3. Multi-database Internal Level − Depicts the data distribution across different sites and multi-database to local data mapping. 4. Local database View Level − Depicts public view of local data. 5. Local database Conceptual Level − Depicts local data organization at each site. 6. Local database Internal Level − Depicts physical data organization at each site.
  • 10. Design Alternatives The distribution design alternatives for the tables in a DDBMS are as follows − • Non-replicated and non-fragmented • Fully replicated • Partially replicated • Fragmented • Mixed
  • 11. Design Alternatives The distribution design alternatives for the tables in a DDBMS are as follows − • Non-replicated and non-fragmented • Fully replicated • Partially replicated • Fragmented • Mixed
  • 12. Non-replicated & Non-fragmented In this design alternative, different tables are placed at different sites. Data is placed so that it is at a close proximity to the site where it is used most. It is most suitable for database systems where the percentage of queries needed to join information in tables placed at different sites is low. If an appropriate distribution strategy is adopted, then this design alternative helps to reduce the communication cost during data processing.
  • 13. Fully Replicated In this design alternative, at each site, one copy of all the database tables is stored. Since, each site has its own copy of the entire database, queries are very fast requiring negligible communication cost. On the contrary, the massive redundancy in data requires huge cost during update operations. Hence, this is suitable for systems where a large number of queries is required to be handled whereas the number of data base updates is low.
  • 14. Partially Replicated Copies of tables or portions of tables are stored at different sites. The distribution of the tables is done in accordance to the frequency of access. This takes into consideration the fact that the frequency of accessing the tables vary considerably from site to site. The number of copies of the tables (or portions) depends on how frequently the access queries execute and the site which generate the access queries.
  • 15. Fragmented In this design, a table is divided into two or more pieces referred to as fragments or partitions, and each fragment can be stored at different sites. This considers the fact that it seldom happens that all data stored in a table is required at a given site. Moreover, fragmentation increases parallelism and provides better disaster recovery. Here, there is only one copy of each fragment in the system, i.e. no redundant data. The three fragmentation techniques are − • Vertical fragmentation • Horizontal fragmentation • Hybrid fragmentation
  • 16. Fragmented In this design, a table is divided into two or more pieces referred to as fragments or partitions, and each fragment can be stored at different sites. This considers the fact that it seldom happens that all data stored in a table is required at a given site. Moreover, fragmentation increases parallelism and provides better disaster recovery. Here, there is only one copy of each fragment in the system, i.e. no redundant data. The three fragmentation techniques are − • Vertical fragmentation • Horizontal fragmentation • Hybrid fragmentation
  • 17. Mixed Distribution This is a combination of fragmentation and partial replications. Here, the tables are initially fragmented in any form (horizontal or vertical), and then these fragments are partially replicated across the different sites according to the frequency of accessing the fragments.
  • 18. Fragmentation Fragmentation is the task of dividing a table into a set of smaller tables. The subsets of the table are called fragments. Fragmentation can be of three types: horizontal, vertical, and hybrid (combination of horizontal and vertical). Horizontal fragmentation can further be classified into two techniques: primary horizontal fragmentation and derived horizontal fragmentation. Fragmentation should be done in a way so that the original table can be reconstructed from the fragments. This is needed so that the original table can be reconstructed from the fragments whenever required. This requirement is called “constructiveness.”
  • 19. Advantages of Fragmentation • Since data is stored close to the site of usage, efficiency of the database system is increased. • Local query optimization techniques are sufficient for most queries since data is locally available. • Since irrelevant data is not available at the sites, security and privacy of the database system can be maintained. • When data from different fragments are required, the access speeds may be very high. • In case of recursive fragmentations, the job of reconstruction will need expensive techniques. • Lack of back-up copies of data in different sites may render the database ineffective in case of failure of a site. Disadvantages of Fragmentation
  • 20. Vertical Fragmentation In vertical fragmentation, the fields or columns of a table are grouped into fragments. In order to maintain constructiveness, each fragment should contain the primary key field(s) of the table. Vertical fragmentation can be used to enforce privacy of data. For example, let us consider that a University database keeps records of all registered students in a Student table having the following schema. Regd_No Name Course Address Semester Fees Marks Now, the fees details are maintained in the accounts section. In this case, th e designer will fragment the database as follows −
  • 21. Vertical Fragmentation CREATE TABLE STD_FEES AS SELECT Regd_No, Fees FROM STUDENT; Reconstruction of vertical fragmentation is performed by using Full Outer Join operation on fragments.
  • 22. Horizontal Fragmentation Horizontal fragmentation groups the tuples of a table in accordance to values of one or more fields. Horizontal fragmentation should also confirm to the rule of constructiveness. Each horizontal fragment must have all columns of the origin al base table. For example, in the student schema, if the details of all students of Computer Science Course needs to be maintained at the School of Computer Science, then the designer will horizontally fragment the database as follows − CREATE COMP_STD AS SELECT * FROM STUDENT WHERE COURSE = "Computer Science"; Reconstruction of horizontal fragmentation can be performed using UNION operation on fragments.
  • 23. Hybrid Fragmentation In hybrid fragmentation, a combination of horizontal and vertical fragmentation techniques are used. This is the most flexible fragmentation technique since it generates fragments with minimal extraneous information. However, reconstruction of the original table is often an expensive task. Hybrid fragmentation can be done in two alternative ways − • At first, generate a set of horizontal fragments; then generate vertical fragments from one or more of the horizontal fragments. • At first, generate a set of vertical fragments; then generate horizontal fragments from one or more of the vertical fragments.
  • 24. Hybrid Fragmentation In hybrid fragmentation, a combination of horizontal and vertical fragmentation techniques are used. This is the most flexible fragmentation technique since it generates fragments with minimal extraneous information. However, reconstruction of the original table is often an expensive task. Hybrid fragmentation can be done in two alternative ways − • At first, generate a set of horizontal fragments; then generate vertical fragments from one or more of the horizontal fragments. • At first, generate a set of vertical fragments; then generate horizontal fragments from one or more of the vertical fragments.
  • 25. Hybrid Fragmentation Distribution transparency is the property of distributed databases by the virtue of which the internal details of the distribution are hidden from the users. The DDBMS designer may choose to fragment tables, replicate the fragments and store them at different sites. However, since users are oblivious of these details, they find the distributed database easy to use like any centralized database. The three dimensions of distribution transparency are − • Location transparency • Fragmentation transparency • Replication transparency
  • 26. Hybrid Fragmentation Emp_ID Emp_Name Emp_Address Emp_Age Emp_Salary 101 Surendra Baroda 25 15000 102 Jaya Pune 37 12000 103 Jayesh Pune 47 10000 •Hybrid fragmentation can be achieved by performing horizontal and vertical partition together. •Mixed fragmentation is group of rows and columns in relation. Example: Consider the following table which consists of employee information.
  • 27. Hybrid Fragmentation Fragmentation1: SELECT * FROM Emp_Name WHERE Emp_Age < 40 Fragmentation2: SELECT * FROM Emp_Id WHERE Emp_Address= 'Pune' AND Salary < 14 000 Reconstruction of Hybrid Fragmentation: The original relation in hybrid fragmentation is reconstructed by performin g UNION and FULL OUTER JOIN.
  • 28. Data communication concepts Data communication refers to the exchange of data between a source and a receiver via form of transmission media such as a wire cable. Data communication is said to be local if communicating devices are in the same building or a similarly restricted geographical area. A data communication system may collect data from remote locations through data transmission circuits, and then outputs processed results to remote locations. The different data communication techniques which are presently in widespread use evolved gradually either to improve the data communication techniques already existing or to replace the same with better options and features.
  • 29. Infographic Style Insert the title of your subtitle Here Modern PowerPoint Presentation Get a modern PowerPoint Presentation that is beautifully designed. Easy to change colors, photos and Text. You can simply impress your audience and add a unique zing and appeal to your Presentations. Easy to change colors, photos and Text. Get a modern PowerPoint Presentation that is beautifully designed. Easy to change colors, photos and Text. You can simply impress your audience and add a unique zing and appeal to your Presentations. Your Text Here
  • 30. Components of data communication system A Communication system has following components: 1. Message: It is the information or data to be communicated. It can consist of text, numbers, pictures, sound or video or any combination of these. 2. Sender: It is the device/computer that generates and sends that message 3. Receiver: It is the device or computer that receives the message. The location of receiver computer is generally different from the sender computer. The distance between sender and receiver depends upon the types of network used in between. 4. Medium: It is the channel or physical path through which the message is carried from sender to the receiver. The medium can be wired like twisted pair wire, coaxial cable, fiber-optic cable or wireless like laser, rad io waves, and microwaves.
  • 31. Concurrency Control and Recovery Concurrency control (CC) is a process to ensure that data is updated correctly and appropriately when multiple transactions are concurrently executed in DBMS (Connolly & Begg, 2015). Distributed Databases encounter a number of concurrency control and recovery problems which are not present in centralized databases. Some of them are listed below: • Dealing with multiple copies of data items • Failure of individual sites • Communication link failure • Distributed commit • Distributed deadlock
  • 32. Concurrency Control and Recovery Concurrency control (CC) is a process to ensure that data is updated correctly and appropriately when multiple transactions are concurrently executed in DBMS (Connolly & Begg, 2015). Distributed Databases encounter a number of concurrency control and recovery problems which are not present in centralized databases. Some of them are listed below: • Dealing with multiple copies of data items • Failure of individual sites • Communication link failure • Distributed commit • Distributed deadlock
  • 33. Concurrency Control 1. Dealing with multiple copies of data items: The concurrency control must maintain global consistency. Likewise the recovery mechanism must recover all copies and maintain consistency after recovery. 2. Failure of individual sites: Database availability must not be affected due to the failure of one or two sites and the recovery scheme must recover them before they are available for use. 3. Communication link failure: This failure may create network partition which would affect database availability e ven though all database sites may be running. 4. Distributed commit: A transaction may be fragmented and they may be executed by a number of sites. This require a two or three-phase commit approach for transaction commit.
  • 34. Concurrency Control 5. Distributed deadlock: Since transactions are processed at multiple sites, two or more sites may get involved in deadlock. This must be resolved in a distributed manner. Concurrency control protocols can be broadly divided into two categories − • Lock based protocols • Time stamp based protocols
  • 35. Concurrency Control Protocol 1. Lock-based Protocols Database systems equipped with lock-based protocols use a mechanism by which any transaction cannot read or write data until it acquires an appropriate lock on it. Locks are of two kinds − • Binary Locks − A lock on a data item can be in two states; it is either locked or unlocked. • Shared/exclusive − This type of locking mechanism differentiates the locks based on their uses. If a lock is acquired on a data item to perform a write operation, it is an exclusive lock. Allowing more than one transaction to write o n the same data item would lead the database into an inconsistent state. Read locks are shared because no data value is being changed.
  • 36. Continue.. 1. Binary Locks: A lock is kind of a mechanism that ensures that the integrity of data is maintained. A binary lock can have two states or values: locked and unlocked (or 1 and 0, for simplicity). A distinct lock is associated with each database item X. If the value of the lock on X is 1, item X cannot be accessed by a database operation that requests the item. If the value of the lock on X is 0, the item can be accessed when requested. We refer to the current value (or state) of the lock associated with item X as LOCK(X). There are 2 operation in binary locking: (i) Lock_item(X): (ii) Unlock_item (X):
  • 37. Continue.. 1. Lock_item(X): A transaction requests access to an item X by first issuing a lock_item(X) operation. If LOCK(X) = 1, the transaction is forced to wait. If LOCK(X) = 0, it is set to 1 (the transaction locks the item) and the transaction is allowed to access item X. 2. Unlock_item (X): When the transaction is through using the item, it issues an unlock_item(X) operation, which sets LOCK(X) to 0 (unlocks the item) so that X may be accessed by other transactions. Hence, a binary lock enforces mutual exclusion on the data item ; i.e., at a time only one transaction can hold a lock.
  • 38. Continue.. 2. Shared / Exclusive Locking : Shared lock : Shared lock is placed when we are reading the data, multiple shared locks can be placed on the data but when a shared lock is placed no exclusive lock can be placed. These locks are referred as read locks, and denoted by 'S'. If a transaction T has obtained Shared-lock on data item X, then T can read X, but cannot write X. Multiple Shared lock can be placed simultaneously on a data item. For example, when two transactions are reading Steve’s account balance, let them read by placing shared lock but at the same time if another transaction wants to update the Steve’s account balance by placing Exclusive lock, do not allow it until reading is finished.
  • 39. Continue.. Exclusive lock : Exclusive lock is placed when we want to read and write the data. This lock allows both the read and write operation, Once this lock is placed on the data no other lock (shared or Exclusive) can be placed on the data until Exclusive lock is released. For example, when a transaction wants to update the Steve’s account balance, let it do by placing X lock on it but if a second transaction wants to read the data ( S lock) don’t allow it, if another transaction wants to write the data(X lock) don’t allow that either. These Locks are referred as Write locks, and denoted by 'X'. If a transaction T has obtained Exclusive lock on data item X, then T can be read as well as write X. Only one Exclusive lock can be placed on a data item at a time. This means multiples transactions does not modify the same data simultaneously.
  • 40. Continue.. Lock Compatibility Matrix _________________ | | S | X | |----------------------------- | S | True | False | |----------------------------- | X | False | False | ----------------------------- How to read this matrix?: There are two rows, first row says that when S lock is placed, another S lock can be acquired so it is marked true but no Exclusive locks can be acquired so marked False. In second row, When X lock is acquired neither S nor X lock can be acquired so both marked false
  • 41. TIME STAMP BASED PROTOCOL Time stamp is used to link time with some event or in more particular say transaction. To ensure serializability, we associate transaction with the time called as time stamp. In simple words we order the transaction based on the time of arrival and there is no deadlock. For each data item, two time stamp are maintained. Read time stamp – time stamp of youngest transaction which has performed o peration read on the data item. Write time stamp – time stamp of youngest transaction which has performed o peration write on the data item. Let the transaction T’s time-stamp be denoted by TS(T), Read time-stamp of d ata-item be denoted by R-timestamp(X), and Write time-stamp of data-item be denoted by W-timestamp(X).
  • 42. TIMESTAMP BASED PROTOCOL The protocol works as follows- • If a transaction issues read operation If Ts(T) < W-timestamp(X) then read request is rejected else execute the transaction and update the time-stamp. • If a transaction operates write operation If Ts(T) < R-timestamp(X) or If TS(T) <W-timestamp(X) then write request is rejected else transaction gets executed and update the time-stamp.
  • 43. TIMESTAMP BASED PROTOCOL Thomas' Write Rule This rule states if TS(Ti) < W-timestamp(X), then the operation is rejected and Ti is rolled back. Time-stamp ordering rules can be modified to make the schedule view serializable. Instead of making Ti rolled back, the 'write' operation itself is ignored.
  • 44. Need of Recovery Media failure, e.g. disc-head crash. Part of persistent store is lost – need to restore it. Transactions in progress may be using this area –abort uncommitted transactions System failure e.g. crash - main memory lost. Persistent store is not lost but may have been changed by uncommitted transactions. Also, committed transactions’ effects may not yet have reached persistent objects. Transaction abort Need to undo any changes made by the aborted transaction.
  • 45. Need of Recovery When a DBMS recovers from a crash, it should maintain the following − • It should check the states of all the transactions, which were being executed. • A transaction may be in the middle of some operation; the DBMS must ensure the atomicity of the transaction in this case. • It should check whether the transaction can be completed now or it needs to be rolled back. • No transactions would be allowed to leave the DBMS in an inconsistent state.
  • 46. Recovery with Concurrent Transactions Checkpoint Keeping and maintaining logs in real time and in real environment may fill out all the memory space available in the system. As time passes, the log file may grow too big to be handled at all. Checkpoint is a mechanism where all the previous lo gs are removed from the system and stored permanently in a storage disk. Checkpoint declares a point before which the DBMS was in consistent state, and all the transactions were committed. Recovery When a system with concurrent transactions crashes and recovers, it behaves in the following manner − • The recovery system reads the logs backwards from the end to the last check point. • It maintains two lists, an undo-list and a redo-list.
  • 47. Recovery with Concurrent Transactions • If the recovery system sees a log with <Tn, Start> and <Tn, Commit> or just <Tn, Commit>, it puts the transaction in the redo-list. • If the recovery system sees a log with <Tn, Start> but no commit or abort log found, it puts the transaction in undo-list. All the transactions in the undo-list are then undone and their logs are removed. All the transactions in the redo-list and their previous logs are removed and then redone before saving their logs.
  • 48. Reference • https://www.tutorialspoint.com. • Concurrency Control and Recovery in Database Systems First Edition Philip Bernstein, Vassos Hadzilacos, Nathan Goodman . • Database System concept ,design and application © Pearson Education Limited 1995, 2005. • https://tutorialink.com. • https://www.geeksforgeeks.org.