0% found this document useful (0 votes)
7 views14 pages

Overview of Distributed Database Systems

The document discusses Distributed Database Systems (DDBMS), highlighting their definition, advantages, design strategies, and implementation issues. Key benefits include increased reliability, local control, and faster data access, while design considerations involve location transparency and data fragmentation. It also covers client-server architecture, emphasizing the two-tier model and the functions and capabilities of DBMS, including data security and integrity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views14 pages

Overview of Distributed Database Systems

The document discusses Distributed Database Systems (DDBMS), highlighting their definition, advantages, design strategies, and implementation issues. Key benefits include increased reliability, local control, and faster data access, while design considerations involve location transparency and data fragmentation. It also covers client-server architecture, emphasizing the two-tier model and the functions and capabilities of DBMS, including data security and integrity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT – V

Distributed Database Systems(DDS OR DDBMS)

1. DDBMS? Need, Advantages. (IMPORTANT)


2. DDS design
3. Distributed query processing (IMPORTANT)
4. Client-Server (2-tier) architecture (VERY IMPORTANT)
5. DBMS functions & Capabilities
6. Implementation issues
7. DBMS feature requirements
8. Database Integrity(2PL, DL, Time Stamp, D2PL) (VERY
IMPORTANT)

1. What is Distributed Database System? Explain its advantages.


Distributed Database:
 A Distributed Database is a database in which portions of the database
are stored on multiple computers within a network.
 A Database which is distributed across different geographical locations
(sites) through a communication network (internet) is also called as
Distributed Database System.
 The users will have access to the portions of database at their locations.
 The users can access the data relevant to their tasks without interfering with
the work of others.
 The Centralized Database Systems are the systems where the database
is located or stored centrally at one place. If this central database system
fails, the entire system will not work properly. That means, there is no
availability and reliability of the data. So, in order to overcome this problem,
we need Distributed Database Systems.

Advantages of Distributed
Database:
The following are the various
advantages or benefits of the
Distributed Database
Systems:

1. Increased Reliability &


Availability
2. Local control
3. Modular growth
4. Improved communications
5. Faster data access
6. Faster data processing
7. Faster response
1. Increased Reliability & Availability: when a centralized system fails, the
database is unavailable to all users. But, in a distributed systems even when
one site fails, the remaining sites will work properly without any
interruptions. In distributed systems, the reliable data always will be
available to the database users.
2. Local control: in the distributed database system environment, each site
will have its own Local Database Administrators to control the local database
and its local database users. The local administration will have the more
control over the local databases. With this, they will maintain the data
integrity.
3. Modular growth: if the organization wants to expand their business to new
locations (branches), it is easier to add a local computers and its associated
data (database) to the communication network without disturbing other
sites.
4. Improved communications: with the local sites, the communication
among departments and customers and company staff made easy. In the
distributed environment, the communication cost is also very low.
5. Faster data access: whenever the database user needs any information
from the database, he will access the required data or information from his
local database system easy and very quickly. If the required data is not
available at local system, then he will access the same data from other sites
without stopping his work.
6. Faster data processing: if the data is available or accessed quickly, then it
makes data processing also very quickly. In the distributed database system
environment, the data processing or database operations will be done fast.
7. Faster response: if the data access is fast and data processing is fast, then
the database system will provides the faster response to the database users
while performing the database operations by the database users.

2. Explain Distributed Database System Design.


OR
Explain the Strategies and Objectives to implement distributed
database systems.
Distributed Database System Design:
The design of a distributed database system can be a complex task. While
designing a distributed database system, we need to give careful
consideration to the strategies (methods) and objectives to be served by the
design and we need to take parallel decisions regarding how the data are to
be distributed among various network sites.

Strategies & Objectives:


The following are some of the strategies that are common to most
implementations of distributed database systems:
1. Location Transparency
2. Replication Transparency
3. Configuration Independence
4. Non-Homogeneous DBMSs
5. Data Replication
6. Database Partitioning
7. Data Fragmentation
1. Location Transparency: Location Transparency means allowing the
user to access the data without knowing the site where actually the actual
data is stored.
The location of the data is hidden from the user is also called as Location
Transparency.
2. Replication Transparency: Replication Transparency means the when
more than one copy of the data available, one copy must be chosen when
retrieving data and all the remaining copies must be updated when changes
are made.
3. Configuration Independence: Configuration Independence allows the
organization to add or replace hardware without changing the existing
software components of the DDBMS (Distributed Database Management
System).
4. Non-Homogeneous DBMSs: Non-Homogenous DBMSs means
maintaining different DBMS software’s at different sites which are provided by
the different DBMS software vendors (Sellers).
If the organization is maintaining these non-homogeneous DMBSs, then the
organization has to integrate these databases and database models.
The main aim of integrating these databases is to provide a single user
interface that can be used to access the data maintained by the non-
homogeneous DBMSs.
The different data models supported by the non-homogenous DMBSs are
hidden from the user by this single interface.
5. Data Replication: Data Replication means, maintaining the same copy
of data or relations at different database sites.
The data replication increases the availability of the system. If one copy of a
relation is unavailable due to site failures, then the same copy of relation will
be found from other sites.
6. Database Partitioning: Database Partitioning means dividing or
partitioning the single database and distributing these partitions into various
network sites without replication (or duplication).
If there is no duplication of data, the costs associated with storing and
maintaining redundant data are avoided. But, data availability may be limited
and reliability may be affected.
7. Data Fragmentation: Data Fragmentation means fragmenting or
dividing the relation into sub relations and distributing these fragments (or
sub relations) into various network sites.
In this technique, instead of storing a single relation at one site, the
fragments of the relation are stored at several sites and these fragments may
be replicated (or duplicated).
The data fragmentation is of two types. They are as follows:
a) Horizontal Fragmentation
b) Vertical Fragmentation
a) Horizontal Fragmentation: Horizontal Fragmentation means the
division of tuples (or records or rows) of a given relation (or table) into
fragments. Dividing the relation into sub relations based on the tuples or rows
is also called as “Horizontal Fragmentation”.
b) Vertical Fragmentation: Vertical Fragmentation means the division of
attributes (or columns or fields) of a given relation into fragments. Dividing
the relation into sub relations based on the columns or fields is also called as
“Vertical Fragmentation”.

3. Explain Distributed query processing briefly?


 Different relations might reside at different sites, multiple copies of a single relation
can be distributed among several sites, or one relation might be partitioned into sub
relations and these sub relations are (can be) being distributed.
 In order to evaluate a query posed at a given site, it may be necessary to transfer
data between various sites. (since data being distributed) & the combined result
from all locations of the query will sent back to the user.
 The key consideration here is that the time required to process such a query will
largely be comprised of the time spent transmitting data between sites rather than
the time spent on retrieval from secondary storage.
 Some database systems (DDBMS) support relational databases whose parts are
physically separated.
 DDBMS is a collection of location each of which operates a local database system.
Each computer is able to process local database as well as other databases of other
location (global databases).
 In DDBMS, when a user issues a query for execution, it is divided in sub queries
each of which transferred to separate location. Each location executes the sub
query independently, and the combined result of all locations sent back to the
requested user.

Query Execution Techniques for Distributed Databases:


 Row blocking, Multi-cast optimization, Multi-threaded execution Joins with Data
(horizontal) partitioning and Semi Joins
 The above techniques are used to reduce communications costs/performance
overhead
Example:-
- A relations R and S are stored at sites 1 and 2, respectively. To respond to a
query at site 1 which requires the computation: JOIN (R,S),
- All the records of S are transferred from site 2 to site 1 and compute the join
operation at site 1. This would involve the transmission of all values of S.
 Double-pipelined hash joins: Non-blocking join operators to deliver first results
quickly: fully exploit pipelined parallelism, and reduce overall response time.

4. Explain Client/server systems? (2-Tier Architecture)


Client/server architecture is a networked computing model that distributes processes between
clients and servers, which supply the requested services. In a database system, the database
generally resides on a server that processes the DBMS. The clients may process the application
systems or request services from another server that holds the application programs.
Server is the one, which has sharable resource. Client is the one, which shares the information
available from the server. Generally, client sends the commands and server processes them.
Advantages of client/server architecture
 It allows for simultaneous processing on multiple processors for the same application, thus
improving data processing speed.
 It is possible to take advantage of the best data processing features of each computer
platform.
 You can mix client technologies and share common data. In addition, you can change
technologies at any tier with limited impact on the modules on other tiers.
 Processing can be performed close to the source of processed data, there by reducing
network traffic.
 Functionality can be delivered in stages to the end users. Thus, it arrives more quickly.
 The graphic user interface is common in client/server environments. It encourages users to
utilize the applications functionality.
 Client/server architectures allow the development of web-enabled application to conduct
business over the Internet.
Types of Client/server architecture:
1. File server architecture 2. Database server architecture 3. Three-tired 4. n-tired architecture

As per our syllabus now let us 2-tier architecture:


 Two tier architecture is another form of C/S architecture.
 Two tier C/S architecture improves usability and scalability.
 Scalability is improved because this architecture can hold up to 100 users.
 Two tier architecture consists of three components.

User system interface: User can communicate with the server with the help of this interface. It acts like
middleware between a client and server. It provides a user friendly layer of communication to make
request to the server.
Process management: It includes process development, process implementation process monitoring
Database management: It is responsible 0 provide data to the requested user. Database management
distributes processing between client and server. Both other are responsible for some of the process
management

1. File server architecture:


File server is a device that manages file operations and is shared by each of the client PCs attached
to the LAN
These were the first developed Client/server architectures.
All data manipulation occurs at the workstation i.e. clients. The file server acts like a shared data
storage device.
The client handles the presentation logic, processing logic and much of the storage logic.
One or more file servers are attached to the LAN
The client here is of type Fact client.
Fast client is a client PC that is responsible for processing presentation logic, extensive application
and business rules logic, and many DBMS functions.

Limitation (Disadvantages) of file servers:


The server does very little work, the client is busy with huge data manipulation, and the network is
transferring large blocks of data.
Each client workstation must devote memory to the entire DBMS. This means that there is less
memory for application programs on the client PC. Each client must be powerful to provide a
suitable response time.
The DBMS copy in each workstation must manage the shared database integrity. Application
programmers must understand various conditions of multiple-user database environment.
The following figure shows a typical model for File Server architecture
2. Database server architecture:
 Database server is a computer that is responsible for database storage, access, and
processing in a Client/server environment. Some people also use this term to describe a
two-tier client/server environment.
 The client computer is responsible for managing the user interface including presentation
logic, processing logic, and business rule logic
 Here LAN traffic is reduced, because only requested information is sent to clients instead of
the whole file.
 Here the DBMS functions can be called as back-end functions and the client programs as
front-end programs.
 Here the advantage is database is stored at the server not client. Therefore the database
can be tuned to optimized performance.
 Since less data is sent across the LAN, the communication load is reduced.
 User authorization, integrity checking and query processing take place at the database
server.
 The use of Stored Procedures is included here.
 Stored procedure: It is a module of code, usually written in a proprietary language such as
Oracle’s PL/SQL that implements application logic or a business rule. It is stored on the
server and runs when it is called
 Advantages of stored procedures:
 Performance improves for compiled SQL statements.
 Network traffic decreases as processing moves from client to the server.
 Security improves
 Data integrity improves as multiple applications access the same stored procedure.
 Stored procedures result in a thinner client and a fatter database server.
 The following figure shows a typical model for Database Server architecture

5. Explain the DBMS Selection and Implementation (or) what are the factors
involved in Selecting and Implementing a DBMS? (or) Explain the Functions
and Capabilities of DBMS.

DBMS SELECTION & IMPLEMENTATION:


The following are the various factors that are involved in selecting and
implementing (or using) the DBMS (Database Management System) software:
I. Analyzing Management Information Needs
II. DBMS Functions and Capabilities
I. Analyzing Management Information Needs:
 Analyzing Management Information needs means analyzing (or studying) the
information needs or requirements of the management people in the
organization while selecting and implementing the DBMS software.
 Before selecting and implementing the DBMS software in the organization,
the Organization has to identify the various management information needs
and make detailed study on them. After the detailed analysis over those
management information requirements, the organization has to select and
implement the DBMS to fulfil those requirements.
 Determining or identifying the information requirements and applications to
be supported by a database system is a complex process. The selected
DBMS should be able to support these applications and satisfy the
information requirements.

II. DBMS Functions & Capabilities:


The following are the various functions and capabilities of the DBMS
(Database Management System):
1) The Data Dictionary (DD)
2) Data Security and Integrity
3) Query, Data Manipulation and Reporting Capabilities
4) Support for Specialized Programming Requirements

1)The Data Dictionary (DD): The Data Dictionary contains the data
definitions or data structures of the database relations. It is a collection of
data definitions to be maintained separately from the data. This allows the
changes to be made on data definitions with no effect on the stored data. The
following are the benefits provided by the Data Dictionary:
 Physical storage structures can be changed without affecting the
programs that use the data.
 Passwords and other security mechanisms can be stored in the Data
Dictionary to provide control over the data access.

2)Data Security & Integrity: Data security and integrity are the essential to
make effective database operations. They are also important considerations
in selecting a DBMS. The following are different capabilities to be considered
for data security and integrity:
i. Access Controls: Access controls are used to prevent the
unauthorized access to the data by the unauthorized users.
ii. Concurrency Controls: Concurrency controls are used to maintain the
data integrity (or data consistency) in the multi-user environment.
iii. View Controls: View Controls are used to limiting which users are
allowed to access the data from the database. This means, providing
the necessary data to the respective users only.
iv. Encryption Facilities: Encryption is important for the maintenance of
a secure password directory. This technique is used where the
database contains the sensitive data.
v. Effective Backup and Recovery: The effective backup & recovery are
needed to make efficient operations of the database system.
3)Query, Data Manipulation, and Reporting Capabilities: The DBMS
should be able to support reporting requirements along with user’s query and
data manipulation needs. A good DBMS will provide the capability to generate
structured reports in a variety formats. In addition, the DBMS should provide
a query language (ex: SQL) that is powerful.

4)Support of Specialized Programming Requirements: To provide better


and efficient user interfaces to the database users in order to access the
database efficiently and effectively, the specialized programs must be
developed. In order to develop these specialized programs, the DBMS should
support the program development and program testing.

6. Explain the Implementation Issues of DBMS.


OR

Briefly explain important considerations associated with DBMS


implementation issues.
(10
Marks)
IMPLEMENTATION ISSUES:
The issues or considerations which are associated (or related) with the
DBMS implementation are called the “Implementation Issues’. The following
are some of the important considerations that are associated with the
DBMS implementation:
1) Database Administration
2) Database Testing
3) Preparing Users for Change
4) Loading the Database
5) Database Maintenance
1) Database Administration:
 The responsibility of database administration assigning (or giving) to the
person called a “Database Administrator (DBA)”.
 The DBA’s daily activities are the following tasks:
i. Servicing end-user requirements
ii. Database Security and Integrity
iii. Backup and Recovery procedures
i. Servicing end-user requirements: The DBA is responsible for observing
the frequency of database use by end users and the response time needed
by their database applications. The DBA has to provide necessary services to
end-users based on their requirements.
ii. Database Security and Integrity: The data security means protecting
the data or database from the accidents that cause data inconsistencies or
data loss. In the organizations, the database must be protected from the
following risks or problems:
a) Theft of information
b) Unauthorized access, modification and deletion of data by the
unauthorized users (or illegal users).
The data integrity means maintaining the consistent (or accurate or
correct) data in the database. The integrity is concerned with making certain
operations performed by users are correct and maintain data consistency.
The DBA will make the user to enter correct data into the database by
applying or enforcing some database standards or rules or restrictions. These
restrictions on user’s data are called “Integrity Constrains”.

iii. Backup and Recovery Procedures: The DBA has to take periodic or
regular backup of the database onto the tapes or disks to prevent loss of
data in case of system failures or hardware failures or software failures or
from theft. Backup means making duplicate copies of the original database
and Recovery means replacing the backup data into database system
whenever such failures are occurred.

2) Database Testing:
 After development of database by the database developers or programmers
in the organization, the DBA has to test or check that database whether that
database will meet the customer or end user’s requirements or not.
 If the database is developed according to the customer requirements, then
the DBA should allow the users for database access. Otherwise, the database
should be redeveloped by the developers until it meets customer
requirements.
 Testing is normally focused on validating the following operations:
 The loading of the database without violating the data integrity.
 The user interface is correct with the database.
 The performance of the system satisfies the DBMS requirements.
3) Preparing Users for Change:
 The database administrator has to give proper trainings to the database
users in order to make use of effective and efficient database access by the
end users in the organization.
 The users need to participate (or involve) in the development and
implementation of the database system in order prepare them for the user
trainings.
 In the training, the user will know how to process documents, present input,
produce reports, correct errors, generate queries and so on.

4) Loading the Database:


 Loading the database means, loading or storing the necessary data into the
new database system by installing.
 Loading the data from the secondary storage devices into the new database
system is also called as “Loading the Database”.
 The conversions of old file system into new database system by loading the
data is also called as “Loading the Database”.
5) Database Maintenance:
 Once the DBMS is installed and it is in operation, the maintenance activities
are needed to organize and provide necessary services to the end-users.
 The Database Maintenance includes the following tasks:
o Managing database system resources such as storage devices, buffers
and tables.
o Taking regular and periodical database backup and recovery.
o Managing the database system when changes are made according to
the requirements of database users.
o Monitoring (or checking) user’s input and output operations on the
database.

[Link] database feature requirements?


DBMS is a collection of program that enables users to create and maintain
database.
In the present market we can have different types of DBMS software’s and
organizations must select a DBMS based on the requirements & the functions
provided by DBMS software.
The functions may include data dictionary, security and Integrity.
Before selecting a DBMS we must consider organization feature requirements.
1. Mandatory features:
- To achieve organization goals, every DBMS must satisfy mandatory
features of the organization.
- If a DBMS is not providing these features, org. Must not select that DBMS
2. Important features:.
- It is a feature that makes the DBMS more attentive; without this feature
system is less responsive and implementation may be more difficult.
3. Optional requirement:
- These are certain features which optional in-case. We can select a DBMS
even though it is not considering optional requirements
4. Un-necessary features:
- These are certain features which contribute nothing to Database
application.
- We won’t feel comfort with these requirements.
5. Un-desirable features:
- These features are not often a factor. Organizations will never show
interest on these features
- While developing Database applications these features are not
required and it degrades the performance of applications.

8. Explain Data Integrity?


Students Note:
 Blue coloured data (or) Red coloured data + Black coloured data

- Blue coloured data – Easy to understand


- Red coloured data – Technical data
- Black coloured data – Must Read
 Concurrent execution: Executing 2 or more transactions which operate on same data at same
time
 Data Integrity is a concept to deal in executing two or more transactions operating at same time
on same data
In the DDBMS Data is distributed at number of locations, Transactions are no longer linearly
ordered sequences of actions on data. Since the data is distributed, the transaction activities may
take place at a number of sites, and it can be difficult to maintain a time ordering among actions.
 And it is important to update the transactions at all locations at same time.
 Concurrency control is achieved by scheduled algorithms, controlling duplicate data etc...
Or
Controlling data integrity becomes a harder problem in the Distributed Database Systems (network
environment). The most common problem is when two or more transactions are executing at the
same time, and both require access to the same data record in order to complete their processing.
There may be multiple copies of the same record. All copies must have the same value at all times,
or else transactions may operate on inaccurate data in DDB.

 When transactions are executed serially (one after other), they cannot interface with one
another since only one transaction is active at a time.
 An interleaved execution of transactions is said to be serializable if it produces the same result
that some serial execution of those same transactions would produce.
 To enforce serializability, the transactions located at each site must cooperate to provide
concurrency control by use of locking mechanisms or by time stamping.
 It is a simple attempt to provide a means for preventing anomalies (errors) that may arise when
transactions are executed in parallel against the database, consideration of these issues by
examining some of the following principal methods of maintaining data integrity in a
distributed database system.
- Data integrity is achieved by the following techniques:
1. 2-Phase commit protocol
2. Distributed locking
3. Distributed 2-phase locking
4. Time stamping

1. 2-Phase Commit Protocol:


- A transaction consists of n-number of sub-transactions (T  T1, T2, T3, T4, ..... Tn)
- Un-successful transactions will be aborted
- Successful transactions are allowed for further process (execution)
Phase-1:
- Transaction which is Home site/Home location is called co-ordinator and all the sub-
transactions are called participants.
a. During execution, co-ordinator will send a message ‘prepare’ to all participants
b. Participants which are prepared will respond if they are prepared
c. Co-ordinator waits till it receives a message ‘prepared’ from all participants
Phase-2:
d. The co-ordinator after verifying ‘prepared’ message, it Sends “commit” message to all
participants
e. If all participants vote to commit, Transaction will be updated
Else
Transaction will be aborted.
- Thus by 2-phase commit protocol, all transactions will be updated at same time.

Two Phase Commit Protocol: (2PC)


The two-phase commit strategy is designed to ensure that either all the resources are updated or
none of them, so that the resources under transactional control remain synchronized.
 Commit protocols are used to ensure atomicity across sites
a) A transaction which executes at multiple sites must either be committed at all the sites, or
aborted at all the sites.
b) Not acceptable to have a transaction committed at one site and aborted at another
 The two-phase commit 2PC protocol is widely used
 The three-phase commit 3PC protocol is more complicated and more expensive, but avoids
some drawbacks of two-phase commit protocol. This protocol is not used in practice.
Implementation Process:
Phase 1: The coordinator gets the participants ready to write the results into the database
Phase 2: Everybody writes the results into database
- Coordinator: The process at the site where the transactions originated & which controls the
execution
- Participant: The process at the order sites that participate in executing the transaction
Phase 1: Obtaining a Decision
 Coordinator asks all participants to prepare to commit transaction Ti.
a) Ci adds the records <prepare T> to the log and forces log to stable storage
b) Sends prepare T messages to all sites at which T executed.
 Upon receiving message, transaction manager at site determines if it can commit the
transaction
a) If not, add a record <no T> to the log and sent abort T message to Ci
b) If the transaction can be committed, then:
c) Add the record <ready T> to the log
d) Force all records for T to stable storage
e) Send ready T message to Ci
Phase 2: Recording the Decision
 T can be committed of Ci received a ready T message from all the participating sites:
otherwise T must be aborted.
 Coordinator adds a decision record, <commit T> or <abort T>, to the log and forces record
onto stable storage. Once the record stable storage it is irrevocable (even if failures occur)
 Coordinator sends a message to each participant informing it of the decision (commit or
abort)
 Participants take appropriate action locally.
2. Distributed Locking:
- Transaction which is Home site/Home location is called Global transaction.
- Locking is a mechanism used in this technique – Lock & Un-Lock
- In this technique, we have two types of locks, Shared lock & Exclusive lock.
- Shared Lock: A transaction which holds Shared lock is allowed to read the data, but cannot
write/modify the data
- Exclusive Lock: A transaction which holds Exclusive lock is allowed to read and write the data,
and no-other transaction is allowed to read/modify the data.
- Lock/Un-Lock the transactions is managed by the Lock Manager

More info on Types of Locks:


a) Shared Locks: Shared locks (S locks or read locks) allow other
transactions to read (but not update) a record. A transaction should
place a shared lock on a record when it will only read that record.
Placing an exclusive lock, but not a shared lock, on that record.
b) Exclusive locks: Exclusive locks (X locks, or write locks) prevent
another transaction from reading (and therefore updating) a record
until it is unlocked. A transaction should pace an exclusive lock on a
record when it is about to update that record. Placing an exclusive
lock on a record/prevents another user from placing any type of lock
on that record.
Deadlock: Deadlock is a situation that results when two or more
transactions have locked a common resource, and each waits for the other
to unlock that resource. To prevent this user programs must lock as records
they require at the beginning of a transaction (rather than one at a time).
Deadlock resolution is an approach that allows deadlocks to occur but
builds mechanisms into the DBMS for detecting and breaking the
deadlocks.

3. Distributed 2-Phase Locking:


- The locking mechanism is done in two phases.
- Phase-1: Acquire the lock
- Phase-2: Release the lock
- Assigning or releasing the lock is managed by the Transaction Manager.
- This locking system is helpful to read and/or write the data
- Read and write permissions are to be synchronised

There are actually 3 activities that take place in the “two phase” update algorithm:
a. Lock Acquisition
b. Modification of Data
c. Release Locks
- The modification of data and the subsequent release of the locks that protected the data are
generally grouped together and called the second phase.
- Two phase locking prevents deadlock from occurring in distributed systems by releasing all the
resources it has acquired if it is not possible to obtain all the resources required without waiting
for another process to finish using a lock. This means that no process is ever in a state where it
is holding some shared resources, and waiting for another process to release a shared resource
which it requires. This means that deadlock cannot occur due to resource contention.
- The resource (or lock) acquisition phase of a “two phase” shared data access protocol is usually
implemented as a loop with n which all the locks required to access the shared data are
acquired one by one. If any lock is not acquired on the first attempt the algorithm gives u all the
locks it had previously been able to get, and starts to try to get all the locks again.
4. Time Stamping:
- All the transactions are assigned with a time stamp value.
- A transaction with highest time stamp value will be executed first
- All transactions will be executed based on the assigned time stamp values and thus achieves
data integrity
- A Time Stamp can be thought of as a label or key that contains the current simulation time. An
Event Log adds this key to an entity when it either enters or leaves a Process or Activity. Pairs of
keys can be specified and Entity cycle times can be computed between them.
- Time Stamping can be performed upon entry (and/or) exit from an Activity. Time Stamp
specification can be defined between two stamp keys enabling the monitoring of cycle time and
counts between two Time Stamps.
- Define Start and Stop Keys, select statistics options, and press OK button.
- Define as many Start and end Keys that you desire reporting on, and press Close button when
finished.
- The next step is to add the Start and End Keys to the Event Logs on the Activities or Processes
that the cycle time and counts will be monitored between.
- Timestamp based concurrency-control protocols can be used in distributed systems
- Each transaction must be give a unique time stamp
- Main problem: how to generate a timestamp in a distributed fashion
- Each site generates a unique local timestamp using either a logical counter or the local clock
- A site with a slow clock will assign smaller timestamps
- This is hard for real time

Common questions

Powered by AI

User interface testing in database implementation is crucial for verifying that the interface aligns with user needs and is intuitive to navigate. It assures that the system is user-friendly, which fosters user acceptance and efficiency in database interactions. If testing reveals alignment with user requirements, users are more likely to embrace and utilize the new database system effectively .

Timestamp-based concurrency control preserves data integrity by ordering transactions based on timestamps, enabling sequential execution and preventing rollback errors. Limitations include challenges in generating unique timestamps across distributed sites, potential clock discrepancies, and the complexity of managing global timestamps in real-time environments .

Exclusive locks prevent others from reading or writing a record, ensuring secure and isolated transactions. Shared locks allow reading but prevent writing, permitting multiple transactions to access a record without altering it. These locking mechanisms manage data access and maintain transaction consistency in distributed databases by preventing conflicting access .

Challenges during the transition include data compatibility issues, data loss risks, and user adaptation to new systems. These can be mitigated by careful data conversion processes, thorough backup and testing phases to ensure data integrity, and comprehensive user training programs to ease the transition for users .

Analyzing management information needs involves understanding the specific information requirements of management within an organization. This is crucial because these needs dictate the type of data the DBMS must handle, ensuring it supports all necessary applications and meets the information requirements effectively . Proper analysis helps in selecting a DBMS that aligns with organizational goals and efficiently fulfills managerial needs .

A DBA manages data security and integrity by implementing measures to protect databases from unauthorized access and accidental data inconsistencies. This includes enforcing integrity constraints, ensuring correct data input, and maintaining consistent and accurate data. The DBA performs regular backups and administers recovery processes to safeguard against data loss, maintaining the integrity and security of the database .

Data security and integrity are vital for effective DBMS operations, as they prevent unauthorized data access, ensure data consistency, and maintain data accuracy. These factors are achieved through access controls, concurrency controls, view controls, encryption, and backup and recovery systems . Without these mechanisms, the DBMS's reliability and trustworthiness would be compromised, leading to potential data loss or corruption .

The data dictionary in a DBMS provides system flexibility by maintaining data definitions separately from stored data, allowing storage structures to change without affecting data operations . Additionally, it enhances security by storing passwords and other security mechanisms, offering control over data access .

The 2-Phase Commit Protocol ensures consistency by coordinating the final transaction outcomes across all participating sites. In Phase 1, the coordinator confirms readiness to commit from all sites; in Phase 2, it either commits the transaction at all sites if all are ready, or aborts it everywhere if any site cannot commit. This guarantees that all sites either reflect the transaction consistently or not at all, adhering to atomicity principles .

Failure to prepare users can lead to resistance, decreased productivity, and ineffective use of the DBMS. Users may struggle with new processes without adequate training. Solutions include comprehensive training programs emphasizing new system advantages, hands-on practice sessions, and ongoing support. Engaging users in development phases increases acceptance and smooths transitions .

You might also like