WHAT IS DISTRIBUTED DATABASE

WHAT IS DISTRIBUTED DATABASE

WHAT IS DISTRIBUTED DATABASE: This is a database that consists of two or more files located in different sites either on the same network or on entirely different networks. Portions of the database are stored in multiple physical locations and processing is distributed among multiple database nodes.

WHAT IS DISTRIBUTED DATABASE

A distributed database is a database in which data is stored across different physical locations. It may be stored in multiple computers located in the same physical location; or maybe dispersed over a network of interconnected computers.

A distributed database is basically a database that is not limited to one system, it is spread over different sites, i.e., on multiple computers or over a network of computers. A distributed database system is located on various sites that don’t share physical components.

Distributed databases allow local users to manage and access the data in the local databases while providing some sort of global data management which provides global users with a global view of the data.

A centralized distributed database management system (DDBMS) integrates data logically so it can be managed as if it were all stored in the same location. The DDBMS synchronizes all the data periodically and ensures that data updates and deletes performed at one location will be automatically reflected in the data stored elsewhere.

By contrast, a centralized database consists of a single database file located at one site using a single network.

When in a collection, distributed databases are logically interrelated with each other, and they often represent a single logical database. With distributed databases, data is physically stored across multiple sites and independently managed. The processors on each site are connected by a network, and they don’t have any multiprocessing configuration.

A common misconception is that a distributed database is a loosely connected file system. In reality, it’s much more complicated than that. Distributed databases incorporate transaction processing, but are not synonymous with transaction processing systems.

In general, distributed databases include the following features:

  • Location independent
  • Distributed query processing
  • Distributed transaction management
  • Hardware independent
  • Operating system independent
  • Network independent
  • Transaction transparency
  • DBMS independent

Types of Distribute Database:

  1. Homogeneous Database: 
    In a homogeneous database, all different sites store database identically. The operating system, database management system, and the data structures used – all are the same at all sites. Hence, they’re easy to manage.
  2. Heterogeneous Database: 
    In a heterogeneous distributed database, different sites can use different schema and software that can lead to problems in query processing and transactions. Also, a particular site might be completely unaware of the other sites. Different computers may use a different operating system, different database application. They may even use different data models for the database. Hence, translations are required for different sites to communicate.

Distributed Data Storage:
There are 2 ways in which data can be stored on different sites. These are:

  1. Replication 
    In this approach, the entire relationship is stored redundantly at 2 or more sites. If the entire database is available at all sites, it is a fully redundant database. Hence, in replication, systems maintain copies of data.

This is advantageous as it increases the availability of data at different sites. Also, now query requests can be processed in parallel.
However, it has certain disadvantages as well. Data needs to be constantly updated. Any change made at one site needs to be recorded at every site that relation is stored or else it may lead to inconsistency. This is a lot of overhead. Also, concurrency control becomes way more complex as concurrent access now needs to be checked over a number of sites.

  1. Fragmentation 
    In this approach, the relations are fragmented (i.e., they’re divided into smaller parts) and each of the fragments is stored in different sites where they’re required. It must be made sure that the fragments are such that they can be used to reconstruct the original relation (i.e., there isn’t any loss of data).
    Fragmentation is advantageous as it doesn’t create copies of data, consistency is not a problem.

Fragmentation of relations can be done in two ways:

  • Horizontal fragmentation – Splitting by rows –
    The relation is fragmented into groups of tuples so that each tuple is assigned to at least one fragment.
  • Vertical fragmentation – Splitting by columns –
    The schema of the relation is divided into smaller schemas. Each fragment must contain a common candidate key so as to ensure a lossless join.

In certain cases, an approach that is hybrid of fragmentation and replication is used.

Applications of Distributed Database:

  • It is used in Corporate Management Information System.
  • It is used in multimedia applications.
  • Used in Military’s control system, Hotel chains etc.
  • It is also used in manufacturing control system

Advantages of distributed databases

There are many advantages to using distributed databases.

Distributed databases are capable of modular development, meaning that systems can be expanded by adding new computers and local data to the new site and connecting them to the distributed system without interruption.

When failures occur in centralized databases, the system comes to a complete stop. When a component fails in distributed database systems, however, the system will continue to function at reduced performance until the error is fixed.

Admins can achieve lower communication costs for distributed database systems if the data is located close to where it is used the most. This is not possible in centralized systems.

Examples of distributed databases

Though there are many distributed databases to choose from, some examples of distributed databases include Apache Ignite, Apache Cassandra, Apache HBase, Couchbase Server, Amazon Simple DB, Cluster  point, and Foundation DB.

Apache Ignite specializes in storing and computing large volumes of data across clusters of nodes. In 2014, Ignite was open sourced by Grid Gain Systems and later accepted into the Apache Incubator program. Apache Ignite’s database uses RAM as the default storage and processing tier.

Apache Cassandra offers support for clusters that span multiple locations, and it features its own query language, Cassandra Query Language (CQL). Additionally, Cassandra’s replication strategies are configurable.

Apache HBase runs on top of the Hadoop Distributed File System and provides a fault-tolerant way to store large quantities of sparse data. It also features compression, in-memory operation and Bloom filters on a per-column basis. HBase is not intended as a replacement for SQL database, although Apache Phoenix provides a SQL layer for HBase.

Couchbase Server is a NoSQL software package that is ideal for interactive applications that serve multiple concurrent users by creating, storing, retrieving, aggregating, manipulating and presenting data. To support these many application needs, Couchbase Server provides scalable key value and JSON document access.

Amazon Simple DB is used as a web service with Amazon Elastic Compute Cloud and Amazon S3. Amazon Simple DB enables developers to request and store data with minimal database management and administrative responsibility.

Cluster point removes the complexity, scalability issues and performance limitations of relational database architectures. Data is managed in XLM or JSON format using open APIs. Because Cluster point is a schema-free document database, it removes the scalability problems and performance issues that most relational database architectures face.

Foundation DB is a multi model database designed around a core database that exposes an ordered key valued store with each transaction. These transactions support ACID properties and are capable of reading and writing keys that are stored on any machine within the cluster. Additional features appear in layers around this core.