DDBS BCS 2 distributed database notes
DDBS BCS 2 distributed database notes
Definitions
• Distributed Database: A single logical
database that is spread physically across
computers in multiple locations that are connected
by a data communications link
• Database systems that run on each site are
independent of each other
• Transactions may access data at one or more sites
Distributed DBMS
• Distributed database requires distributed DBMS
• Functions of a distributed DBMS:
• Locate data with a distributed data dictionary
• Determine location from which to retrieve data and process
query components
• DBMS translation between nodes with different local DBMSs
(using middleware)
• Data consistency (via multiphase commit protocols)
• Scalability
• Maintains Security, concurrency, query optimization, failure
recovery
Reasons for
Distributed Database
• Business unit autonomy and distribution
• Data sharing
• Data communication costs
• Data communication reliability
• Multiple application vendors
• Database recovery
Reasons for
Distributed Database
• Location Transparency
• User does not have to know the location of the data
• Data requests automatically forwarded to appropriate
sites
• Local Autonomy
• Local site can operate with its database when network
connections fail
• Each site controls its own data, security, logging,
recovery
Homogeneous vs heterogeneous
Distributed Databases
• In a homogeneous distributed database
• All sites have identical software
• In a heterogeneous distributed database
• Different sites may use different schemas and software
• Local access is done using the local DBMS and schema
• Remote access is done using the global schema
Homogeneous Database
Identical DBMSs
Non-identical DBMSs
• Increased reliability/availability
• Local control over data
• Modular growth
• Lower communication costs
• Faster response for certain queries
Disadvantages of
Distributed Database Compared to
Centralized Databases
3 5
4
Local transaction –
all data stored locally
Global Transaction Steps
1. Application makes request to distributed DBMS
2. Distributed DBMS checks distributed data repository for location of
data. Finds that it is remote
3. Distributed DBMS routes request to remote site
4. Distributed DBMS at remote site translates request for its local
DBMS if necessary, and sends request to local DBMS
5. Local DBMS at remote site processes request
6. Local DBMS at remote site sends results to distributed DBMS at
remote site
7. Remote distributed DBMS sends results back to originating site
8. Distributed DBMS at originating site sends results to application
Distributed DBMS architecture (cont.) (showing
global transaction steps)
2
3
1
7 6
8
4
5
Global transaction – some
data is at remote site(s)