CSC475 ยท 2079 ยท 10 marks
Define distributed database. What are the benefits of using distributed databases over centralized database? Explain availability, reliability, and scalability features of distributed databases.
Define distributed database. What are the benefits of using distributed databases over centralized database? Explain availability, reliability, and scalability features of distributed databases.[10]
Quick answer
A distributed database is a collection of logically interrelated data that is physically stored and managed across multiple geographically dispersed locations (nodes/sites), connected through a computer network. Although the data resides at different physical locations, it appears to the user as a single unified database.: > "Portions of a database, known as database fragments, may reside in several physical locations."
Distributed Database: Definition, Benefits, and Key Features
1. Definition of Distributed Database
The primary goal of a distributed database is to provide scalability, fault tolerance, and improved performance compared to a centralized database. It can handle larger data volumes and support higher levels of concurrent access.
2. Benefits of Distributed Databases Over Centralized Databases
The key advantages are as follows:
i. Reflects Organizational Structure
Organizations are naturally distributed over several locations (branches, departments, regions). A distributed database mirrors this structure by allowing each location to manage its own local data while remaining part of the whole system.
ii. Improved Availability
The system is designed to continue operating even if one node fails. Because data can be replicated across multiple nodes, the failure of a single node does not bring down the entire system. This is a major advantage over a centralized database where a single point of failure can make the entire database unavailable.
iii. Improved Performance
Data exists in more than one site, so each site handles only a part of the entire database. This reduces the load on any single node and improves overall query response time. Local queries are processed locally, reducing network traffic and latency.
iv. Modular Growth (Scalability)
New sites (nodes) can be added to the network without affecting the operations of other existing sites. This allows the system to grow incrementally as organizational needs expand, which is not easily achievable in a centralized database.
v. Integration
Distributed databases allow integration of software components from different vendors to meet specific requirements. This is especially useful in heterogeneous environments where different departments may use different DBMS software.
3. Key Features: Availability, Reliability, and Scalability
A. Availability
Availability refers to the ability of the distributed database system to remain accessible and operational at all times, even in the presence of partial failures.
- In a distributed database, data replication plays a central role in ensuring availability. Copies of data are stored on multiple nodes so that if one node fails, the data can still be accessed from another node.
- As noted in the reference: "To improve fault tolerance and availability, copies of data may be stored on multiple nodes, which is data replication. It ensures that if one node fails, the data can still be accessed from other nodes."
- Homogeneous distributed database systems specifically provide high availability and fault tolerance by replicating data and schema across multiple nodes.
- Unlike a centralized database where a server crash makes the entire database unavailable, a distributed database continues to serve users through its surviving nodes.
Example: If a bank's database node in Kathmandu fails, users can still access their account data from the replicated node in Pokhara.
B. Reliability
Reliability refers to the ability of the distributed database to consistently deliver correct results and recover from failures without data loss or corruption.
- Reliability is achieved through data replication and redundancy. Since multiple copies of data exist across different nodes, the system can recover from node failures without losing data.
- Fault tolerance is a core design principle: homogeneous distributed systems are specifically noted to provide fault tolerance.
- Distributed databases use mechanisms such as distributed transaction management and commit protocols (e.g., two-phase commit) to ensure that transactions are completed correctly across all nodes, maintaining data consistency and reliability.
- Even if a network partition or node failure occurs mid-transaction, the system can roll back or complete the transaction reliably.
Comparison with Centralized DB: In a centralized database, hardware failure can lead to complete data loss if backups are not maintained. In a distributed database, the inherent redundancy ensures reliability.
C. Scalability
Scalability refers to the ability of the distributed database to handle increasing amounts of data, users, and transactions by adding more nodes without disrupting existing operations.
-
As stated in the reference: "New site can be added to hardware without affecting operations of other site." This is called modular growth.
-
A distributed database supports horizontal scalability: instead of upgrading a single powerful server (as in centralized databases), new nodes are simply added to the network.
-
Data distribution strategies such as:
- Horizontal partitioning: Each node holds a portion of the rows of a table.
- Vertical partitioning: Each node holds a subset of columns of a table.
These strategies allow the workload to be distributed evenly, ensuring the system scales efficiently.
-
The reference also notes: "A distributed database can handle larger data volumes and support higher levels of concurrent access."
Comparison with Centralized DB: A centralized database has a physical limit on how much it can scale (bounded by a single machine's capacity). A distributed database scales out horizontally with minimal disruption.
Summary Table
| Feature | Centralized Database | Distributed Database |
|---|---|---|
| Availability | Single point of failure | Continues if one node fails |
| Reliability | Vulnerable to hardware failure | Redundancy ensures data safety |
| Scalability | Limited by single machine | New nodes added without disruption |
| Performance | Bottleneck at central server | Load distributed across nodes |
| Data Location | Single physical location | Multiple geographic locations |
In conclusion, distributed databases offer significant advantages over centralized databases in terms of availability through replication, reliability through fault tolerance and redundancy, and scalability through modular growth and data partitioning, making them ideal for large-scale, geographically distributed organizations.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.