Database develop. life cycle - Centralized vs. distributed databases

1. Centralized Database

Definition:

  • All data is stored and managed in a single location (server or mainframe).

  • Users access the data through terminals or client applications connected to the central server.

Characteristics:

  • Single point of control and management.

  • Easier to maintain and backup.

  • All users share the same database instance.

Advantages:

  • Simpler design and administration.

  • Data consistency is easier to maintain.

  • Strong security control since everything is in one place.

Disadvantages:

  • Limited scalability; server can become a bottleneck.

  • Single point of failure → if the server crashes, the whole system is down.

  • Slower access for geographically distant users.

Example:

  • Traditional payroll systems or a university database hosted on a single server.


2. Distributed Database

Definition:

  • Data is stored across multiple locations (servers) connected via a network.

  • Each location can process queries locally or coordinate with others.

Characteristics:

  • Data can be replicated or fragmented across sites.

  • Supports multiple locations for better performance and reliability.

  • Users may not know the physical location of data (transparent access).

Advantages:

  • Better scalability: add more nodes to handle growth.

  • High availability and fault tolerance: if one node fails, others can continue.

  • Can improve performance for geographically distributed users.

Disadvantages:

  • More complex design and administration.

  • Maintaining consistency across sites is challenging.

  • Higher cost for setup, network, and management.

Example:

  • Google Spanner, Amazon DynamoDB, or a global banking system where branches share data.


Quick Comparison Table

Feature Centralized DB Distributed DB
Location Single site/server Multiple sites/servers
Control Single control Multiple nodes, coordinated
Scalability Limited vertical scaling High horizontal scaling
Reliability Single point of failure High availability/fault-tolerant
Complexity Simple Complex design & maintenance
Performance Good locally Better for distributed users
Cost Moderate Higher (network, servers)

Summary:

  • Centralized → simple, consistent, but limited scalability and reliability.

  • Distributed → scalable, reliable, better performance across locations, but complex and costly.