Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views10 pages

DBMS Important Notes For BCA

The document provides an overview of Database Management System (DBMS) architecture, detailing the three primary types: Single-tier, Two-tier, and Three-tier architectures, with a focus on the Three-level architecture defined by ANSI/SPARC. It explains key concepts such as Internal Level, Conceptual Level, and External Level, along with benefits like data abstraction and independence. Additionally, it covers DBMS terminology, normalization forms, relational algebra operations, keys in databases, and aggregate functions.
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)
15 views10 pages

DBMS Important Notes For BCA

The document provides an overview of Database Management System (DBMS) architecture, detailing the three primary types: Single-tier, Two-tier, and Three-tier architectures, with a focus on the Three-level architecture defined by ANSI/SPARC. It explains key concepts such as Internal Level, Conceptual Level, and External Level, along with benefits like data abstraction and independence. Additionally, it covers DBMS terminology, normalization forms, relational algebra operations, keys in databases, and aggregate functions.
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/ 10

The architecture of a DBMS (Database Management System) refers to the structure that defines how users

interact with the system, how data is stored, processed, and accessed. It determines how components of the
DBMS communicate with each other and perform database functions efficiently.
There are primarily three types of DBMS architecture:
Single-tier architecture
1. What is the architecture of DBMS . Explain
Two-tier architecture
Three-tier architecture
However, the most commonly followed and important one is the Three-level architecture defined by
ANSI/SPARC, which includes:
Internal Level (Physical Level)
Conceptual Level (Logical Level)
External Level (View Level)
1. Internal Level (Physical Level):
It is the lowest level of the DBMS architecture.
It describes how the data is physically stored in the database.
Focuses on:
File organization (heap, sequential, indexed files)
Indexing, compression
Record placement
Concerned with performance, storage space, and access speed.
Users do not see this level—only DBMS and system administrators interact with it.
Example: A table stored using B+ Tree indexing or hashed file structure.
2. Conceptual Level (Logical Level):
This is the middle level of the architecture.
Describes what data is stored in the database and the relationships among the data.
It provides a logical view of the entire database independent of physical storage.
Deals with:
Entities, attributes, constraints
Data types, relationships
Security rules, integrity constraints
It hides physical details from users and application programs.
Example: Tables like STUDENT(ID, Name, Age) with primary and foreign key constraints.
3. External Level (View Level):
This is the highest level of DBMS architecture.
It describes individual user views of the database.
Each user may see only a part of the database relevant to them.
Multiple views can exist for different users.
Ensures security by restricting access to sensitive data.
Example: A finance manager may see only salary data, while an HR manager sees employee profiles
without salary.
Benefits of Three-Level Architecture:
Data Abstraction: Hides complexity by separating physical, logical, and user views.
Data Independence:
Logical Data Independence: Changes in conceptual schema do not affect external views.
Physical Data Independence: Changes in physical storage do not affect the conceptual schema.
Security and Authorization: Limits what part of data users can access.
Improved System Design: Each level can be developed and maintained independently.
Alternative Architectures:
1. Two-Tier Architecture:
Client directly communicates with the database server.
Suitable for small applications.
Issues: Poor scalability, difficult to manage concurrent users.
2. Three-Tier Architecture:
Has an additional application server between the client and the database server.
Client ↔ Application Server ↔ Database
Improves security, scalability, and flexibility.
Common in modern web-based applications.
Explain DBMS terminology

DBMS Terminology Explained Briefly 7x1x`


Entity Set
A collection of similar types of entities.
1 Database Example: All students in a college form the STUDENT entity
A collection of related data stored in an set.
organized way.
Example: A college database may store data 8 Schema
about students, courses, and faculty. The structure of a database.
Defines tables, fields, data types, relationships.
2 DBMS (Database Management System) Example: STUDENT(ID INT, Name VARCHAR(20), Age INT)
A software system that allows users to define,
create, maintain, and control access to the 9 Instance
database. The actual content of the database at a given time.
Example: MySQL, Oracle, PostgreSQL. The current data in the tables.

Table / Relation 10 Primary Key


A structured format to store data in rows and An attribute (or set of attributes) that uniquely identifies
columns. each record in a table.
Each table represents an entity (e.g., Student, Example: Roll_no in STUDENT table.
Employee).
11 Foreign Key
4 Tuple / Row / Record An attribute in one table that refers to the primary key of
A single row in a table. another table.
Represents a single item or record. Used to maintain relationships between tables.
Example: (101, 'Raj', 20) is one tuple in a Example: Course_ID in STUDENT table referring to COURSE
STUDENT table. table.

5 Attribute / Column / Field 12 Normalization


A property or characteristic of the entity. The process of organizing data to reduce redundancy and
Each column in a table is an attribute. improve data integrity.
Example: Name, Age, Roll_no in STUDENT table. Achieved using normal forms (1NF, 2NF, 3NF, etc.).

6 Entity 13 Query
A real-world object or concept that can have A request to retrieve or manipulate data from a database.
data stored about it. Written using SQL (Structured Query Language).
Example: STUDENT, EMPLOYEE, BOOK.
SQL (Structured Query Language)
The standard language to interact with relational databases.
Includes commands like SELECT, INSERT, UPDATE, DELETE.

14 Data Redundancy
Occurs when the same piece of data is stored in multiple places.
Leads to wastage of space and inconsistenc
15 Data Integrity
Ensures that data in the database is accurate and consistent.
Maintained using constraints like PRIMARY KEY, NOT NULL, UNIQUE.
16 Transaction
A sequence of database operations that must be executed as a whole.
Follows ACID properties (Atomicity, Consistency, Isolation, Durability).
17 Indexing
A technique to speed up data retrieval by creating indexes on table columns.
18 Concurrency Control
Ensures that multiple users can access the database simultaneously without conflict.
19 Data Independence
Ability to change schema at one level without affecting other levels.
Two types: Logical and Physical data independence.
explain 1nf 2nf 3nf briefly

Normalization 2NF (Second Normal Form)


Normalization is the process of organizing data in a Definition:
database to: A table is in 2NF if:
Remove data redundancy (duplicate data) It is already in 1NF
Ensure data integrity All non-prime attributes are fully functionally dependent on the
Make the database more efficient entire primary key
Rule:
1NF (First Normal Form) No partial dependency (i.e., a non-key attribute should not
Definition: depend on part of a composite key)
A relation is in 1NF if: Example (Not in 2NF):
It contains only atomic (indivisible) values Student_ID Course_ID Student_Name Course_Name
There are no repeating groups or arrays
1 C1 Raj Math
Rules:
Each column must contain only one value per row 1 C2 Raj Science
All entries in a column must be of the same data type Here:
Example (Not in 1NF): Composite Key = (Student_ID, Course_ID)
Student_Name depends only on Student_ID → Partial
Student_ID Name Courses
dependency
1 Raj Math, Science Converted to 2NF:
2 Priya English Student Table:
Problem: Courses column contains multiple values → Not Student_ID Student_Name
atomic 1 Raj
Converted to 1NF:
Course Table:
Student_ID Name Course
Course_ID Course_Name
1 Raj Math
C1 Math
1 Raj Science
C2 Science
2 Priya English Enrollment Table:
What is Normalization? Student_ID Course_ID
Normalization is the process of organizing data in a 1 C1
database to: 1 C2
Eliminate data redundancy (duplicate data)
Ensure data integrity and consistency 3NF (Third Normal Form)
Improve efficiency in data storage and querying Definition:
It divides large tables into smaller ones and defines A table is in 3NF if:
relationships among them using keys. It is in 2NF
There is no transitive dependency between non-prime
Objectives of Normalization: attributes
Avoid data duplication Rule:
Eliminate update, insert, and delete anomalies A non-key attribute should not depend on another non-
Maintain data consistency key attribute
Improve database design for easier maintenance Example (Not in 3NF):
Student_ID Student_Name Department HOD_Name
Anomalies Before Normalization: 1 Raj CS Dr. Mehta
Insertion Anomaly: Cannot insert data because of Here:
missing values. Student_ID → Department
Update Anomaly: Changes in one place require changes Department → HOD_Name → Transitive dependency
in multiple rows.
Converted to 3NF:
Deletion Anomaly: Deleting one record causes loss of
Student Table:
useful data.
Student_ID Student_Name Department
Types of Normal Forms: 1 Raj CS
Normalization is done in steps called normal forms (NF): Department Table:
Department HOD_Name
CS Dr. Mehta
Q. What is Relational Algebra?
Explain its types with examples.
Introduction to Relational Algebra:
Relational Algebra is a procedural query language in DBMS used to access and manipulate data stored in relational databases.
It uses a set of operations to perform queries on relations (tables) and returns a new relation as a result. It forms the
theoretical foundation of Structured Query Language (SQL).
Types of Relational Algebra Operations:
Relational Algebra operations are mainly divided into:
1. Basic (Fundamental) Operations:
Operation Symbol Description
a) Selection (σ)
Selects rows that satisfy a given condition.
Syntax: σ<sub>condition</sub>(Relation)
Example: σ<sub>Dept = 'IT'</sub>(Employee) → selects all employees from IT department.
b) Projection (π)
Selects specific columns (attributes).
Syntax: π<sub>columns</sub>(Relation)
Example: π<sub>Name, Salary</sub>(Employee)
c) Union (∪)
Combines tuples from two relations (eliminates duplicates).
Syntax: R ∪ S
Note: Both relations must be union-compatible (same number and type of columns).
d) Set Difference (−)
Finds tuples present in one relation but not in the other.
Syntax: R − S Derived (Advanced) Operations in Relational Algebra
e) Cartesian Product (×) Derived operations are those that can be expressed using basic
(primitive) operations like selection (σ), projection (π), union (∪), set
Combines all tuples of one relation with all tuples of another.
Syntax: R × S difference (−), Cartesian product (×), and rename (ρ), but are used
Used to build join operations. frequently enough to be treated as independent operations.
f) Rename (ρ) Why Derived?
Renames a relation or its attributes. Because they are not basic, but can be derived from combinations of
Syntax: ρ<sub>NewName</sub>(R) the basic relational operations. These are useful for more complex
Example: ρ<sub>Emp</sub>(Employee) queries.
1. JOIN Operation (⨝)
3. Division (÷)
Purpose:
Purpose:
Combines related tuples from two relations based on a condition.
Used when we need to find tuples in one relation that are
associated with all tuples in another relation. Types of Join:
Theta Join (⨝<sub>θ</sub>): Based on any condition using
Syntax:
operators like =, <, >.
nginx
R ⨝<sub>R.A = S.B</sub> S
CopyEdit
Equi Join: Theta join using only equality (=).
R÷S
Natural Join: Automatically joins relations using common attribute
Use Case: names and removes duplicate columns.
Find students who have taken all courses.
2. Intersection (∩)
Example:
Purpose:
Relation A (Student, Course):
Returns tuples that are common to both relations.
Student Course
Syntax:
A Math R∩S
A Science Example:
B Math If R = {1, 2, 3} and S = {2, 3, 4}, then
Relation B (Course): R ∩ S = {2, 3}
5. Outer Joins (Used in Extended
Course Note: Can be derived as:
Relational Algebra / SQL)
R ∩ S = R − (R − S)
Math Left Outer Join (⟕): All rows from the
Science left relation + matched from right.
Right Outer Join (⟖): All rows from the
Result of A ÷ B = { A }
right relation + matched from left.
→ because only A has taken both Math and Science.
Full Outer Join (⟗): All rows from both,
Keys are one of the basic requirements of a relational database model. It is widely used to
identify the tuples(rows) uniquely in the table. We also use keys to set up relations amongst various
columns and tables of a relational database.
Different Types of Keys :-
1. Candidate Key
2. Primary Key . x`
3. Super Key
4. Alternate Key
5. Foreign Key
6. Composite Key The foreign key is used to link one
1 Primary Key: or more than one table together. It 3 Super Key :-
There can be more than one candidate key in is also known as The set of attributes that can
students table out of which one can be the referencing key. A foreign key uniquely identify a tuple is known as
chosen as the primary key. For Example, matches the primary key field of Super Key. A super key
stud_id, as well as phone, are candidate keys another table. It means is a group of single or multiple keys
for a foreign key field in one table that identifies rows in a table. It
students table but stud_id can be chosen as refers to the primary key field of supports NULL
the primary key (only one out of many the other table. It identifies values.
candidate keys). each row of another table uniquely • Adding zero or more attributes to
Example : that maintains the referential the candidate key generates the
Student(RollNo, Name, Age) integrity in MySQL. super key.
• A candidate key is a super key but
2 Candidate Key :- vice versa is not true.
For example, (stud_id, stud_name)
A part from primary key if there is any column or set of column which can in the following students database,
uniquely identify two students’
record. names can be the same, but their
A characteristic or group of attributes that can uniquely identify a tuple is stud_id cannot
known as a
candidate key in MySQL Keys. 4 Alternate Key :-
The remaining properties, with the exception of the primary key, are
considered candidate The candidate key other than the
keys. Candidates have the same strength as the primary key. primary key is called an alternate
Take a look at the “students” table as an example. Stud_id, stud_name, address key.
and • All the keys which are not primary
phone are the four attributes in this table. Stud_id and phone will have unique keys are called alternate keys.
values, • It is a secondary key.
however, stud_name and address may contain duplicate values because • It contains two or more fields to
multiple students identify two or more records.
may have the same name. • These values are repeated.
The candidate keys here are [ stud_id ] and [ phone ]. Example : - In the students table,
• It is a minimal super key. stud_id and phone are candidate
• It is a super key with no repeated data is called a candidate key. key for student but phone will
• The minimal set of attributes that can uniquely identify a record. be an alternate key.
• It must contain unique values.
• It can contain NULL values. 7. Unique Key
• Every table must have at least a single candidate key. Similar to primary key but allows
• A table can have multiple candidate keys but only one primary key (the only one NULL value.
primary key A table can have multiple unique
cannot have a NULL value, so the candidate key with a NULL value can’t be the keys.
Employee(EmpID, Email, Phone) Ensures that all values in the column
are different.
Example:

CREATE TABLE Users (


UserID INT PRIMARY KEY,
Email VARCHAR(50) UNIQUE
);
Q: Explain Aggregate Functions in DBMS with Examples.

Introduction to Aggregate Functions:


Aggregate functions in DBMS are built-in SQL functions that perform
a calculation on a set of values and return a single summarizing
result. These functions are widely used for data analysis, report
generation, and to extract summarized information from large
datasets.
They are most commonly used in SELECT statements, often
combined with the GROUP BY clause.
Types of Aggregate Functions:
There are five commonly used aggregate functions in SQL:
1. SUM( ) – Summation Function
Returns the total sum of a numeric column.
Ignores NULL values.
Syntax:
SELECT SUM(column_name) FROM table_name;
Example:
SELECT SUM(Salary) FROM EMPLOYEE;
Explanation: Adds all salaries in the EMPLOYEE table.
2. AVG( ) – Average Function
Returns the average value of a numeric column.
Ignores NULL values.
Syntax:
SELECT AVG(column_name) FROM table_name;
Example:
SELECT AVG(Marks) FROM STUDENT;
Explanation: Calculates average marks of all students.
3. COUNT( ) – Count Function
Returns the number of rows that match a condition.
COUNT(*) counts all rows, including NULLs.
COUNT(column_name) ignores NULL values.
Syntax:
SELECT COUNT(*) FROM table_name;
Example:
SELECT COUNT(Emp_ID) FROM EMPLOYEE;
Explanation: Counts number of employees.
4. MAX( ) – Maximum Function
Returns the highest value in a column.
Syntax:
SELECT MAX(column_name) FROM table_name;
Example:
SELECT MAX(Salary) FROM EMPLOYEE;
Explanation: Returns the highest salary.
5. MIN( ) – Minimum Function
Returns the lowest value in a column.
Syntax:
SELECT MIN(column_name) FROM table_name;
Example:
SELECT MIN(Age) FROM STUDENT;
Explanation: Returns the youngest student’s age.
Example Table: EMPLOYEE
4. TCL (Transaction Control Language) Commands:
SQL Commands Manage the changes made by DML statements and
maintain the integrity of the database.
o SQL commands are instructions. It is used to Command Description
communicate with the database. It is Saves all changes made by the
also used to perform specific tasks, functions, and COMMIT transaction permanently.
queries of data. Example: COMMIT;
o SQL can perform various tasks like create a table, Undoes changes since the last
add data to tables, drop the table, ROLLBACK COMMIT.
modify the table, set permission for users. Example: ROLLBACK;
1. DDL (Data Definition Language) Commands: Sets a point within a transaction to
These commands define or alter the structure of database objects like SAVEPOINT which you can roll back later.
tables, schemas, etc. Example: SAVEPOINT sp1;
Command Description Sets the characteristics of the
Used to create a new database object like a table, view, or SET transaction.
index. TRANSACTION Example: SET TRANSACTION READ
CREATE ONLY;
Example: CREATE TABLE Students (ID INT, Name
VARCHAR(50));
Modifies an existing database object, such as adding or 5. DQL (Data Query Language):
ALTER dropping columns. Only includes the SELECT command, used to query
Example: ALTER TABLE Students ADD Age INT; data.
Deletes an object from the database permanently. Command Description
DROP
Example: DROP TABLE Students; Used to retrieve data from the
Removes all rows from a table but keeps the structure database based on specified criteria.
SELECT
TRUNCATE intact. Example: SELECT Name, Age FROM
Example: TRUNCATE TABLE Students; Students WHERE Age > 18;
Changes the name of a database object.
RENAME
Example: RENAME TABLE Students TO Pupils;
6. Additional Commands and
2. DML (Data Manipulation Language) Commands: Clauses:
These commands are used to manipulate the data stored in tables. Command/Clause Description
Command Description
Filters records
Retrieves data from one or more tables.
SELECT
Example: SELECT * FROM Students;
WHERE based on a
Inserts new rows into a table. condition.
INSERT
Example: INSERT INTO Students VALUES (1, 'Rahul', 20); Sorts the result
Modifies existing data in a table.
ORDER BY
UPDATE set.
Example: UPDATE Students SET Age = 21 WHERE ID = 1;
Groups rows that
Deletes one or more rows from a table.
DELETE GROUP BY have the same
Example: DELETE FROM Students WHERE ID = 1;
values.
Sets a condition
on groups
3. DCL (Data Control Language) Commands: HAVING
created by
Used to control access to data in the database.
GROUP BY.
Command Description
Gives specific privileges to users.
Combines rows
GRANT from two or
Example: GRANT SELECT ON Students TO user1;
JOIN more tables
based on a
Removes previously granted privileges. related column.
REVOKE Example: REVOKE SELECT ON Students FROM
user1;
1. DDL (Data Definition Language):

DDL commands are used to define and manage database structure or schema. These commands do not manipulate
data, but rather the structure of database objects.

Common DDL Commands:

Command Description Example

CREATE Creates a new table or database object CREATE TABLE Students (ID INT, Name VARCHAR(50));

ALTER Modifies the structure of a table ALTER TABLE Students ADD Age INT;

DROP Deletes an object like a table DROP TABLE Students;

TRUNCATE Removes all data from a table but keeps its structure TRUNCATE TABLE Students;

2. DML (Data Manipulation Language):

DML commands are used to manipulate or manage data in the tables. These commands affect the rows in a table.

Common DML Commands:

Command Description Example

SELECT Retrieves data from a table SELECT * FROM Students;

INSERT Adds new rows of data INSERT INTO Students VALUES (1, 'Anil');

UPDATE Modifies existing data UPDATE Students SET Name='Sunil' WHERE ID=1;

DELETE Deletes rows from a table DELETE FROM Students WHERE ID=1;

3. DCL (Data Control Language):

DCL commands are used to control access to the data in the database. These are mainly used for security purposes.

Common DCL Commands:

Command Description Example

GRANT Gives privileges to users GRANT SELECT ON Students TO user1;

REVOKE Removes privileges REVOKE SELECT ON Students FROM user1;

Summary Table:

Type Full Form Purpose Key Commands

DDL Data Definition Language Defines structure CREATE, ALTER, DROP, TRUNCATE

DML Data Manipulation Language Manages data SELECT, INSERT, UPDATE, DELETE

DCL Data Control Language Controls access GRANT, REVOKE


Q: Explain Concurrency Control in DBMS. (16 Marks)

Introduction to Concurrency Control


In a multi-user database system, multiple transactions can occur
simultaneously. Concurrency control is the management of concurrent 2. Timestamp-Based Protocol
operations on the database without conflicting with each other and Each transaction gets a unique timestamp. Order of
without violating data integrity. operations is determined by these timestamps.
Objective: Ensure ACID properties (Atomicity, Consistency, Isolation, If a transaction tries to perform an operation that violates
Durability) are preserved even when transactions execute concurrently.timestamp ordering, it is rolled back.
Advantages:
Need for Concurrency Control Avoids deadlocks.
When multiple users access and update the database at the same time,Maintains serializability.
problems may arise, such as:
Lost Update 3. Optimistic Concurrency Control
Two transactions read the same data and update it, but the second Assumes conflicts are rare and lets transactions execute
update overwrites the first. without restriction. At commit time, validation is
Dirty Read performed.
A transaction reads uncommitted changes made by another Phases:
transaction. Read phase – Transactions read data and make changes in
Non-Repeatable Read a local copy.
A transaction reads the same data twice but gets different values due Validation phase – System checks for conflicts.
to another transaction’s update. Write phase – If no conflict, changes are committed.
Phantom Read Best for systems with low contention.
A transaction re-executes a query and finds new rows added by
another transaction. 4. Multiversion Concurrency Control (MVCC)
Multiple versions of data are maintained.
Techniques for Concurrency Control Readers get a consistent snapshot.
1. Lock-Based Protocols Writers work on new versions without blocking readers.
Locks are used to control access to data. Used in: PostgreSQL, Oracle, etc.
Shared Lock (S-Lock): For reading.
Exclusive Lock (X-Lock): For writing. Deadlock in Concurrency
Types of Locks: When two or more transactions are waiting for each
Binary Locks (lock/unlock) other to release locks, a deadlock occurs.
Read/Write Locks (shared/exclusive) Deadlock Handling Techniques:
Two-Phase Locking Protocol (2PL): Deadlock Prevention: Use ordering or pre-checks.
Growing Phase: Transaction acquires all locks. Deadlock Detection: Wait-for graph analysis.
Shrinking Phase: Transaction releases locks and can’t acquire new ones.Deadlock Recovery: Abort one or more transactions.
Strict 2PL ensures serializability and avoids cascading rollbacks.

Isolation Level Description Problems Avoided

Read
Allows dirty reads –
Uncommitted

Read Committed Prevents dirty reads Dirty Read

Prevents dirty and non-repeatable


Repeatable Read Dirty, Non-Repeatable Read
reads

Dirty, Non-Repeatable,
Serializable Highest level – prevents all issues
Phantom
Explain Distributed Databases in DBMS. (16 Marks)
Introduction to Distributed Database
A Distributed Database System (DDBMS) is a database system in which data is stored across multiple physical locations
(nodes) but appears to users as a single logical database.
Each site (node) in the distributed system is connected via a network and can manage its own database operations while
cooperating with other sites to complete user requests.
Key Characteristics of Distributed Databases
Data Distribution :Data is stored at multiple locations to improve access speed and reliability.
Location Transparency :Users can access data without knowing the physical location of the data.
Replication :Data may be duplicated at multiple sites to enhance availability.
Autonomy: Each site can operate independently.
Concurrency Control: Must ensure correct execution of transactions occurring at different sites.
Fault Tolerance : System continues to work even if some nodes fail.
Types of Distributed Databases
Homogeneous DDBMS
All sites use the same DBMS software.
Easier to manage.
Example: Oracle to Oracle at all nodes.
Heterogeneous DDBMS
Different sites use different DBMS software (e.g., Oracle + MySQL).
More complex and may require translation layers.
Data Distribution Strategies
Fragmentation
Data is split into fragments and distributed across sites.
Horizontal Fragmentation: Rows of a table are divided.
Vertical Fragmentation: Columns of a table are divided.
Mixed Fragmentation: Combination of both.
Replication
Full or partial copies of data are stored at multiple sites for faster access and higher availability.
Centralized Replication (Hybrid)
Combines fragmentation and replication to get the best of both.
Architecture of Distributed Database
Client-Server Architecture
Clients send requests; servers process and return data.
Peer-to-Peer Architecture
All nodes are equal; each can act as both client and server.
Multidatabase System
Appears as one system but consists of independent databases.
Advantages of Distributed Database
Advantage Description
Reliability System is fault-tolerant; failure at one site doesn’t crash the whole system.
Scalability Easy to add new nodes without disturbing the system.
Faster Access Data can be accessed locally, reducing latency.
Modular Growth New databases can be added at remote locations.
Location Transparency User doesn’t need to know where data is stored.

Disadvantages of Distributed Database


Disadvantage Description
Complexity Managing distributed transactions and consistency is difficult.
Security Issues Data is distributed across multiple locations, increasing security risks.
Higher Cost Network and maintenance costs are higher.
Data Integrity Ensuring consistent data across sites is challenging.
Backup and Recovery More complex due to data distribution.

Distributed Transaction Management


A transaction in DDBMS may access data at multiple sites.
To maintain consistency, two-phase commit protocol (2PC) is used:
Phase 1 – Prepare: Coordinator asks all sites to prepare.

You might also like