DBMS
DBMS
In India there are many branches are there multiple users are
using this big platform. For Example
DELHI
Network
CHENNAI
MUMBAI
Each cities has a different data through the network database are inter
connected. So maintaining database in various cities it’s all inter
connected by means of network (internet) Eg: Mumbai uses will
access their database.
It’s like a server.
With the help of distributed database easy to access and speed level
will be high.
Simply we can use and access at any place in any location. Through
the network connecting each cities database, then it is called as
distributed database.
DISTRIBUTED DATABASE MANAGEMENT SYSTEM
• A Distributed database management system (DDBMS) is a
centralized software system that manages a distributed
database is a manner as fit it were all stored is a single
location.
• It will control and manage the overall database.
ARCHITECTURE DIAGRAM FOR DISTRIBUTED DATABASE:
1. CLIENT-SERVER ARCHITECTURE OF DISTRIBUTED
SYSTEM:
Client-server architecture has a no. of clients and few
servers connected in a network.
A client sends a query to one of the server the earliest
available server solves it and replies.
A client-server architecture is simple of implement and
execute due to centralized server system.
Client 1
Communication
network
Client 2 Server
FEATURES OF DATABASE
➢ Data is stored at a no.of sites.
➢ Sites are interconnected by a network.
➢ Distributed database is logically a single database.
➢ DDBMS has full functionality of DBMS.
TYPES OF LOCKS
There are two types of lock :
▫️Shared Lock
▫️Exclusive Lock
Shared Lock: (Lock-S):
Conversion of Locks :
upgrading :
● Converting from shared Lock to Exclusive Lock.
● Read Lock → write Lock.
Downgrading :
● converting from Exclusive Lock to shared Lock.
● write Lock → Read Lock.
Example of shared lock
🔸T1—>LOCK_S(B)
R(B)
🔸
UNLOCK (B)
T2—>LOCK_S(B)
R(B)
UNLOCK(B)
🔸LOCK_X(B,)
R(B)
B=B-50
W(B)
UNLOCK(B)
Growing Phase: In this phase, we can acquire new locks on data items,
but none of these locks can be released.
Shrinking Phase: In this phase, the existing locks can be released, but
no new locks can be obtained.
● Two-phase locking helps to reduce the amount of concurrency in a
schedule but just like the two sides of a coin two-phase locking has
a few cons too.
● The protocol raises transaction processing costs and may have
unintended consequences.
● The likelihood of establishing deadlocks is one bad result.