Distributed Database
Distributed Database
ON
DISTRIBUTED DATABASE
Submitted BY
Rosemelyne Wartde
MTech IT 1st Semester
Roll No- 20MTechIT02
What is a Distributed database?
it is easier to expand
It is quite complex
It is more expensive
Homogeneous Heterogeneous
Non-
Autonomous Federated Multidatabase
Autonomous
Homogeneous Distributed Databases
Properties:
The sites use identical DBMS or DBMS from the same vendor.
Each site is aware of all other sites and cooperates with other
sites to process user requests.
different sites have different operating systems, DBMS products and data
models.
Properties:
A site may not be aware of other sites and so there is limited co-operation in
processing user requests.
Types of Heterogeneous Distributed Databases
Example:
WHERE Branch_Name=“Baroda”
Vertical Fragmentation
Divides a relation vertically into groups of column to create subsets
of tables.
Acc_No Balance Branch-
Name
A_101 50000 Pune
A-102 40000 Baroda
Fragmentation1:
Fragmentation2:
Fragmentation1:
Fragmentation2:
read_item()
modify_item()
write_item()
Transaction Operations
The low level operations performed in a transaction are −
begin_transaction
read_item or write_item
end_transaction
commit − A signal to specify that the transaction has been successfully completed
in its entirety and will not be undone.
rollback − A signal to specify that the transaction has been unsuccessful and so all
temporary changes in the database are undone. A committed transaction cannot
be rolled back.
Transaction States
Active − The initial state where the transaction enters is the active state. The transaction
remains in this state while it is executing read, write or other operations.
Partially Committed − The transaction enters this state after the last statement of the
transaction has been executed.
Committed − The transaction enters this state after successful completion of the
transaction and system checks have issued commit signal.
Failed − The transaction goes from partially committed state or active state to failed
state when it is discovered that normal execution can no longer proceed or system checks
fail.
Aborted − This is the state after the transaction has been rolled back after failure and
the database has been restored to its state that was before the transaction began.
Desirable Properties of Transactions
ACID Properties:
Atomicity − This property states that a transaction is an atomic unit of processing, that
is, either it is performed in its entirety or not performed at all. No partial update should
exist.
Consistency − A transaction should take the database from one consistent state to
another consistent state. It should not adversely affect any data item in the database.
Isolation − A transaction should be executed as if it is the only one in the system. There
should not be any interference from the other concurrent transactions that are
simultaneously running.
2. Hold and Wait-A process can hold multiple resources and still
request more resources from other processes which are holding them.
3. No Preemption-A resource cannot be preempted from a process by force. A
process can only release a resource voluntarily.
4. Circular Wait-A process is waiting for the resource held by the second
process, which is waiting for the resource held by the third process and so on,
till the last process is waiting for a resource held by the first process.
THANK YOU