Distributed Processing and Distributed Database
Distributed processing does not require a distributed database, but a distributed database requires distributed processing.
Distributed processing may be based on a single database located on a single computer. In order to manage distributed data, copies or parts of the database processing functions must be distributed to all data storage sites.
Both distributed processing and distributed databases require a network to connect all components.
A distributed database management system ( DDBMS ) governs the storage and processing of logically related data over interconnected computer systems in which both data and processing functions are distributed among several sites.
Example (Figure 10.9): Employee data (EMPLOYEE) are distributed over three locations: New York, Atlanta, and Miami. Depending on the level of distribution transparency support, three different cases of queries are possible:
Transaction transparency ensures that database transactions will maintain the database’s integrity and consistency. The transaction will be completed only if all database sites involved in the transaction complete their part of the transaction.
The two-phase commit protocol guarantees that, if a portion of a transaction operation cannot be committed, all changes made at the other sites participating in the transaction will be undone to maintain a consistent database state.
Each DP maintains its own transaction log . The two-phase protocol requires that each individual DP’s transaction log entry be written before the database fragment is actually updated.
The two-phase commit protocol requires a DO-UNDO-REDO protocol and a write-ahead protocol .
Horizontal Fragmentation Division of a relation into subsets ( fragments ) of tuples ( rows ). Each fragment is stored at a different node, and each fragment has unique rows. Each fragment represents the equivalent of a SELECT statement, with the WHERE clause on a single attribute.
Table 10.3 Horizontal Fragmentation of the CUSTOMER Table By State
Table Fragments In Three Locations Figure 10.17
Vertical Fragmentation Division of a relation into attribute ( column ) subsets . Each subset (fragment) is stored at a different node, and each fragment has unique columns -- with the exception of the key column. This is the equivalent of the PROJECT statement.
Table 10.4 Vertical Fragmentation of the CUSTOMER Table