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. Unlike parallel systems, in which the processors are tightly coupled and constitute a single database system, a distributed database system consists of loosely coupled sites that share no physical components.
System administrators can distribute collections of data across multiple physical locations. A distributed database can reside on organised network servers or decentralised independent computers on the Internet, on corporate intranets or extranets, or on other organisation networks. Because distributed databases store data across multiple computers, distributed databases may improve performance at end-user worksites by allowing transactions to be processed on many machines, instead of being limited to one.
Two processes ensure that the distributed databases remain up-to-date and current: replication and duplication.
  1. Replication involves using specialized software that looks for changes in the distributive database. Once the changes have been identified, the replication process makes all the databases look the same. The replication process can be complex and time-consuming, depending on the size and number of the distributed databases. This process can also require much time and computer resources.
  2. Duplication, on the other hand, has less complexity. It identifies one database as a master and then duplicates that database. The duplication process is normally done at a set time after hours. This is to ensure that each distributed location has the same data. In the duplication process, users may change only the master database. This ensures that local data will not be overwritten.
Both replication and duplication can keep the data current in all distributive locations.
Besides distributed database replication and fragmentation, there are many other distributed database design technologies. For example, local autonomy, synchronous, and asynchronous distributed database technologies. The implementation of these technologies can and do depend on the needs of the business and the sensitivity/confidentiality of the data stored in the database and the price the business is willing to spend on ensuring data security, consistency and integrity.
When discussing access to distributed databases, Microsoft favors the term distributed query, which it defines in protocol-specific manner as "ny SELECT, INSERT, UPDATE, or DELETE statement that references tables and rowsets from one or more external OLE DB data sources".
Oracle provides a more language-centric view in which distributed queries and distributed transactions form part of distributed SQL.

Architecture

A database user accesses the distributed database through one of the following methods:
A homogeneous distributed database has identical software and hardware running all database instances, and may appear through a single interface as if it were a single database. A heterogeneous distributed database may have different hardware, operating systems, database management systems and even data models for different databases.

Homogeneous Distributed Databases Management System

With a homogeneous distributed database, all sites have identical software and are aware of each other and agree to cooperate in processing user requests. Each site surrenders part of its autonomy in terms of the right to change schema or software. A homogeneous DBMS appears to the user as a single system. The homogeneous system is much easier to design and manage. The following conditions must be satisfied for the homogeneous database:
In a heterogeneous distributed database, different sites may use different schema and software. The difference in a schema is a major problem for query processing and transaction processing. Sites may not be aware of each other and may provide only limited facilities for cooperation in transaction processing. In heterogeneous systems, different nodes may have different hardware and software and data structures at various nodes or locations are also incompatible. Different computers and operating systems, database applications, or data models may be used at each of the locations. For example, one location may have the latest relational database management technology, while another location may store data using conventional files or old versions of the database management system. Similarly, one location may have the Windows operating system, while another may have UNIX. Heterogeneous systems are usually used when individual sites use their hardware and software. On heterogeneous systems, translations are required to allow communication between different sites. In this system, the users must be able to make requests in a database language at their local sites. Usually, the SQL database language is used for this purpose. If the hardware is different, then the translation is straightforward, in which computer codes and word-length is changed. The heterogeneous system is often not technically or economically feasible. In this system, a user at one location may be able to read but not update the data at another location.

Important considerations

Care must be taken to ensure the following:
There are two principal approaches to store a relation r in a distributed database system: replication and fragmentation/partitioning.

Replication

In replication, the system maintains several identical replicas of the same relation r in different sites.

Fragmentation

The relation r is fragmented into several relations r1, r2, r3....rn in such a way that the actual relation could be reconstructed from the fragments and then the fragments are scattered to different locations. There are basically two schemes of fragmentation:
A distributed database can be run by independent or even competing parties as, for example, in bitcoin or Hasq.

Advantages

The Merge Replication Method is popularly used to consolidate the data between databases.

Disadvantages