0% found this document useful (0 votes)
30 views7 pages

ADBMS Notes 4

The document discusses various concepts related to distributed databases including data fragmentation, replication, transparency, transaction management, and concurrency control. It provides definitions and examples of different fragmentation techniques like horizontal, vertical and mixed fragmentation. It also explains replication and notes on transaction management and concurrency control in distributed databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

ADBMS Notes 4

The document discusses various concepts related to distributed databases including data fragmentation, replication, transparency, transaction management, and concurrency control. It provides definitions and examples of different fragmentation techniques like horizontal, vertical and mixed fragmentation. It also explains replication and notes on transaction management and concurrency control in distributed databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Module:4

1. What is data fragmentation?


Ans: The process of dividing the database into smaller multiple parts is called fragmentation.
These fragments may be stored at different locations. The data fragmentation process should
be carried out in such a way that the reconstruction of the original database from the fragments
is possible.

2. Define replication.
Ans: Data replication is the process in which the data is copied at multiple locations (Different
computers or servers) to improve the availability of data.

3. Define transparency.
Ans: 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.

4. Write notes on transaction management in distributed databases.


Ans. Distributed transaction management deals with the problems of always providing a
consistent distributed database in the presence of a large number of transactions (local and
global) and failures (communication link and/or site failures). This is accomplished through (i)
distributed commit protocols that guarantee atomicity property; (ii) distributed concurrency
control techniques to ensure consistency and isolation properties; and (iii) distributed recovery
methods to preserve consistency and durability when failures occur.

5. Write notes on concurrency control in distributed databases.


Ans. Concurrency control is the activity of coordinating concurrent accesses to a database in a
multiuser database management system (DBMS). Concurrency control permits users to access
a database in a multi-programmed fashion while preserving the illusion that each user is
executing alone on a dedicated system. The main technical difficulty in attaining this goal is to
prevent database updates performed by one user from interfering with database retrievals and
updates performed by another. The concurrency control problem is aggravated in a distributed
DBMS (DDBMS) because (1) users may access data stored in many different computers in a
distributed system, and (2) a concurrency control mechanism at one computer cannot
instantaneously know about interactions at other computers.

6. Explain Horizontal fragmentation technique with example.


Ans:Horizontal fragmentation can similarly increase efficiency by
reducing the size of the table corresponding to an entity by identifying
“rarely” used instances. This technique is similar to “archiving” rarely
used data. Again considering an Employee entity used in a payroll
application, terminated employees must be retained for end of year
processing, but are no longer used in normal payroll processing.
Segmenting them to a separate table can reduce normal payroll
processing time.

7. Explain Vertical fragmentation technique with example.


Ans: Vertical fragmentation can increase efficiency if clusters of
“frequently” used and “rarely” used attributes can be identified.
Frequently used attributes can be stored in the table corresponding to
the entity and rarely used attributes can be stored in a separate table.
This reduction in the size of the table corresponding to the entity can
significantly reduce processing requirements. Consider, for example,
an Employee entity used in a payroll application. The Employee entity
may contain attributes such as emergency contact, emergency
contact address, and emergency contact telephone number that are
rarely, if ever, used in payroll processing. Segmenting them to a
separate table, related to the Employee table by a foreign key reduces
the size of the Employee table, which is likely scanned for payroll
processing.
8. Explain Mixed fragmentation technique with example.
Ans:

9. Describe about replication.


Ans: Replication is useful in improving the availability of data. The most extreme case is
replication of the whole database at every site in the distributed system, thus creating a fully
replicated distributed database. This can improve availability remarkably because the system
can continue to operate as long as at least one site is up. It also improves performance of
retrieval for global queries because the results of such queries can be obtained locally from any
one site; hence, a retrieval query can be processed at the local site where it is submitted, if that
site includes a server module. The disadvantage of full replication is that it can slow down
update operations drastically, since a single logical update must be performed on every copy of
the database to keep the copies consistent. This is especially true if many copies of the
database exist. Full replication makes the concurrency control and recovery techniques more
expensive than they would be if there was no replication. The other extreme from full replication
involves having no replication—that is, each fragment is stored at exactly one site. In this case,
all fragments must be disjoint, except for the repetition of primary keys among vertical (or mixed)
fragments. This is also called non-redundant allocation. Between these two extremes, we have
a wide spectrum of partial replication of the data—that is, some fragments of the database may
be replicated whereas others may not. The number of copies of each fragment can range from
one up to the total number of sites in the distributed system. A special case of partial replication
is occurring heavily in applications where mobile workers—such as sales forces, financial
planners, and claims adjusters—carry partially replicated databases with them on laptops and
PDAs and synchronize them periodically with the server database. A description of the
replication of fragments is sometimes called a replication schema.

10. Write short notes on transaction management in distributed databases.


● Ans: The global and local transaction management software modules, along with the
concurrency control and recovery manager of a DDBMS, collectively guarantee the
ACID properties of transactions.
● A component called the global transaction manager is introduced for supporting
distributed transactions. The site where the transaction originated can temporarily
assume the role of global transaction manager and coordinate the execution of database
operations with transaction managers across multiple sites.
● Transaction managers export their functionality as an interface to the application
programs. The operations exported by this interface areBEGIN_TRANSACTION, READ
or WRITE, END_TRANSACTION, COMMIT_TRANSACTION, and ROLLBACK (or
ABORT).
● The manager stores bookkeeping information related to each transaction, such as a
unique identifier, originating site, name, and so on. For READ operations, it returns a
local copy if valid and available. For WRITE operations, it ensures that updates are
visible across all sites containing copies (replicas) of the data item.
● For ABORT operations, the manager ensures that no effects of the transaction are
reflected in any site of the distributed database. For COMMIT operations, it ensures that
the effects of a write are persistently recorded on all databases containing copies of the
data item.
● Atomic termination (COMMIT/ ABORT) of distributed transactions is commonly
implemented using the two-phase commit protocol which is explained in the following
section.
● The transaction manager passes to the concurrency controller the database operation
and associated information. The controller is responsible for acquisition and release of
associated locks. If the transaction requires access to a locked resource, it is delayed
until the lock is acquired.
● Once the lock is acquired, the operation is sent to the runtime processor, which handles
the actual execution of the database operation. Once the operation is completed, locks
are released and the transaction manager is updated with the result of the operation.

Distributed Concurrency Control –2 Phase Locking Protocol

You might also like