0% found this document useful (0 votes)
2 views

Databases in a distributed environment

The document discusses centralized and distributed databases, highlighting that centralized databases store information in a single location while distributed databases store it across multiple interconnected sites. It explains the concepts of partitioned and replicated databases, as well as issues like deadlock and livelock in process management, along with methods for resolution. Additionally, it covers the importance of concurrency control in maintaining data consistency during simultaneous access.

Uploaded by

yoomina076
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Databases in a distributed environment

The document discusses centralized and distributed databases, highlighting that centralized databases store information in a single location while distributed databases store it across multiple interconnected sites. It explains the concepts of partitioned and replicated databases, as well as issues like deadlock and livelock in process management, along with methods for resolution. Additionally, it covers the importance of concurrency control in maintaining data consistency during simultaneous access.

Uploaded by

yoomina076
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Databases in a distributed environment

1. Centralized databases
2. Distributed databases
Centralized databases Distributed databases
 information is stored and  information is stored in
maintained in a single multiple databases across
location. different physical locations
 usually accessed using an but interconnected with
internet connection such as each other.
a LAN or WAN

A distributed system is a group of interconnected computers — making it appear


like a single system. Typically, in a distributed database management system
(DBMS), several “sites” are managed by the system, which appears as a single
logical database stored at one site. Distributed databases provide location
transparency, which means that applications do not need to know the exact site
location where the data is stored. When a query is run on a distributed database, a
collective set of sites across different data centers work together to answer the
question.

Centralized database management system is the system in which all


the data is stored and managed in a single unit. This is also known as
central computer database system. This system is mostly used in an
organization, in any Business Company or in institution to centralize
the tasks. Data can be accessed through a network Local Area Network
(LAN) or Wide Area Network (WAN). Mainframe computer is the
example of centralized database management system.
Distributed databases can be distributed using either:
1. Partitioned databases – splits the central database into segments/
partitions.
Partitioning is the process of splitting the data of a software system into smaller,
independent units. Each one of those units is typicalled called a partition. We can
then assign one or more partitions to a single machine, where this machine will be
responsible for serving requests for the associated data. These requests can
generally belong in two main categories: requests that retrieve some data (read
requests) and requests that update some data or create new data (write requests).
2. Replicated databases – process of creating multiple copies of the same
data and storing them into multiple machine
The main benefit of replication is increased fault tolerance. Since the same data is
stored redundantly in multiple machines, the whole system can tolerate failure of
one or more machines since the users can access the data from a different machine
that functions normally.

Deadlock is a situation where a set of processes are blocked because each


process is holding a resource and waiting for another resource acquired by
some other process.
Example: Consider an example when two trains are coming toward each other
on same track and there is only one track, none of the trains can move once
they are in front of each other. Similar situation occurs in operating systems
when there are two or more processes hold some resources and wait for
resources held by other(s). There is a variant of deadlock called lovelock. This
is a situation in which two or more processes continuously change their state
in response to changes in the other processes without doing any useful work.
This is similar to deadlock in that no progress is made but differs in that
neither process is blocked or waiting for anything. A human example of
livelock would be two people who meet face-to-face in a corridor and each
moves aside to let the other pass, but they end up swaying from side to side
without making any progress because they always move the same way at the
same time.
Deadlock resolution
1. Preemption. We can take a resource from one process and give it to other.
This will resolve the deadlock situation, but sometimes it does causes
problems.
2. Terminate one or more processes this is the simplest but it works.

To achieve data currency

Database lockout - a software control (usually a function of the DBMS) that prevents multiple
simultaneous accesses to data

To maintain data consistency

manages simultaneous access to a database. It


Concurrency control -
prevents two users from editing the same record at the same time
and also serializes transactions for backup and recovery.
process to maintain the data where there are multiple resources or
users are accessing the data element and performing the database
operations, such as in banking.
Concurrency can simply be said to be executing multiple transactions at a time. It is
required to increase time efficiency. If many transactions try to access the same data,
then inconsistency arises. Concurrency control required to maintain consistency data.
For example, if we take ATM machines and do not use concurrency, multiple persons
cannot draw money at a time in different places. This is where we need concurrency.

You might also like