Concurrency Control in Distributed Network
Concurrency Control in Distributed Network
Distributed Network
• In today’s world of universal dependence on
information systems, there is a rising need for
secure, reliable and accessible information in
today’s business environment this has resulted
into the increased need for distributed
information Systems. With information
systems come databases implying that
distributed information systems cannot be
separated from distributed databases.
DISTRIBUTED DATABASE DESIGN
• Distributed Database Systems are needed for the
applications where data and its accesses are
inherently distributed and to increase the availability
during failures. The prime examples are the systems
for international air-line reservations, financial
institutions, and automated manufacturing.
• The methodology for designing Distributed Systems
is same as that used for the Centralized Systems.
However, some additional factors have been
considered for a Distributed System:
A. Data Fragmentation:
• In Distributed Databases, we need to define
the logical unit of Database Distribution and
allocation. The database may be broken up
into logical units called fragments which will
be stored at different sites. The simplest
logical units are the tables themselves.
• Three Types of Data Fragmentation are:
Horizontal fragmentation:
A horizontal fragment of a table is a subset of
rows in it. So horizontal fragmentation divides a
table 'horizontally' by selecting the relevant
rows and these fragments can be assigned to
different sides in the distributed system .
Example: Consider a relation PROJ (PNo, Pname, Bugdet, Location)
Vertical fragmentation:
• A vertical fragment of a table keeps only
certain attributes of it. It divides a table
vertically by columns. It is necessary to include
the primary key of the table in each vertical
fragment so that the full table can be
reconstructed if needed.
Example: Consider a Relation PROJ (PNo, Pname, Budget, Location)
Hybrid fragmentation:
Hybrid Fragmentation comprises the
combination of characteristics of both
Horizontal and Vertical Fragmentation. Each
fragment can be specified by a SELECT-PROJECT
combination of operations. In this case the
original table can be reconstructed be applying
union and natural join operations in the
appropriate order.
B. Data Replication:
• A popular option for data distribution as well
as for fault tolerance of a database is to store
a separate copy of the database at each of two
or more sites. A copy of each fragment can be
maintained at several sites. Data replication is
the design process of deciding which
fragments will be replicated .
Fundamentals of Transaction Management and Concurrency Control
What is a Transaction
• A transaction is an atomic unit of database access, which is
either completely executed or not executed at all .
• It includes one or more database access operations (read
and write )
• Transaction error
Failure caused by an operation in the transaction e.g Division by zero
• Local Error
Conditions that cause the cancellation of transactions. E.g data needed
for transaction not found (Missing account number)
• Concurrency control enforcement
Transaction may be aborted by the concurrency control method