Distibuted Database Summary2022

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

Sudan Academy for Banking & Financial Sciences

Advanced Database Systems – 3rd IS + 4th IT

Distributed Databases
Outlines: 2

Definitionof terms .
Distributed database components .
Data Replication ‫ استخراج ن سخة مطابقة‬.
Types of Distributed Databases .
Advantages of Distributed Database
Distributed DBMS

Chapter 13 08/17/2022
Definitions 3

 Distributed Database:-

A single logical database that is spread physically across computers in


multiple locations that are connected by a data communications link. ‫ق اعدة‬
‫ب ياناتواحدة موزعة علىأجهزة حواسيبمتباعدة جغ رافيا ً ومتصلة مع ب عضها ا لبعضب واسطة‬
‫ش بكة‬.
 Decentralized Database:-
A collection of independent databases on non-networked computers.
‫مجموعة منق واعد ا لبياناتا لمستقلة وتوجد علىأجهزة حواسيبغير متصلة ب شبكة‬

They are NOT the same thing!


Chapter 13 08/17/2022
4
Distributed DB >>

Chapter 13 08/17/2022
5
Distributed database components

 Computer workstations
 Network hardware and software
 Allows all sites to interact and exchange data .
 Communications media
 Carry the data from one workstation to another.
 Transaction processor (application‫مع ا لج ا لعمليات‬
processor or transaction manager)
 Software component found in each computer that
receives and processes the application’s requests
data.

Chapter 13 08/17/2022
6
Data Replication

 Storage of data copies at multiple sites served by a


computer network.
 Fragment copies can be stored at several sites to serve
specific information requirements.
 Can enhance data availability and response time.
 Can help to reduce communication and total query costs.
 Imposes‫ ي ستغلأو ي فرض‬additional processing overhead
 Which copy do you read when submitting a query? .
 All copies must be updated when a write occurs.? (i.e Write(balance)).

Chapter 13 08/17/2022
7
Data Replication

Chapter 13 08/17/2022
8
DDBS from users point of view

Chapter 13 08/17/2022
9
Distributed Database Design

 Types of Distributed Databases


 If data is distributed but all servers run the same DBMS software, we
have a homogeneous‫متجانسة‬
 ‫ نطلق عليها‬،‫إذا تم توزيع البيانات وكل الخوادم تعمل بنفس نظم إدارة قواعدة البيانات‬
‫قواعد بيانات موزعة ومتجانسة‬
 distributed database system. If different sites run under the control of
different DBMSs, essentially independently, and are connected
somehow(inter-operability) to enable access to data from multiple
sites, we have a heterogeneous distributed database ‫إذا ت م ت وزيع‬
‫ ن طلقعليها ق واعد ب يانات‬،‫ا لبياناتوكل ا لخوادم ت عمل ب نظم إدارة ق واعدة ا لبياناتمختلفة‬
‫موزعة غير متجانسة‬
Chapter 13 08/17/2022
10
Homogeneous, Non-Independent
Database

 Data is distributed across all the nodes.


 Same DBMS at each node.
 All data is managed by the distributed DBMS (no exclusively
local data).
 All access is through one, global schema.
 The global schema is the union of all the local schema.

Chapter 13 08/17/2022
Figure 13-2: Homogeneous Database 11

Identical DBMSs

Chapter 13 08/17/2022
12
Typical Heterogeneous Environment

 Data distributed across all the nodes.


 Different DBMSs may be used at each node.
 Local access is done using the local DBMS and schema.
 Remote access is done using the global schema.

Chapter 13 08/17/2022
Typical Heterogeneous Environment 13

Non-identical DBMSs Access Sql Server


Oracle MySql

Source: adapted from Bell and Grimson, 1992.

Chapter 13 08/17/2022
14
Advantages of Distributed Database

 Increased reliability/availability.
 Local control over data.
 Integrated(flexible) growth.
 Lower communication costs.
 Faster response for certain queries.

Chapter 13 08/17/2022
15
Disadvantages of Distributed Database

 Software cost and complexity.


 Processing overhead.
 Data integrity disclosure.
 Slower response for certain queries.

Chapter 13 08/17/2022
16
Options for Distributing a Database

 Data replication
 Copies of data distributed to different sites.
 Horizontal partitioning
 Different rows of a table distributed to different sites.
 Vertical partitioning
 Different columns of a table distributed to different sites.
 Combinations of the above(hybrid)

Chapter 13 08/17/2022
17
Data Replication

 Advantages:
 Reliability
 Fast response
 May avoid complicated distributed transaction integrity routines (if
replicated data is refreshed at scheduled intervals).
 Decouples nodes (transactions proceed even if some nodes are
down).
 Reduced network traffic at prime time (if updates can be delayed).
‫ت قليلا الزدحام ف يا لشبكة ف يا لساعاتا ألوليمنا لنهار إذا ك انت‬
‫ا لتع ديالتي مكنت أخيرها‬

Chapter 13 08/17/2022
18
Data Replication (cont.)

 Disadvantages:
 Additional requirements for storage space
 Additional time for update operations
 Complexity and cost of updating
 Integrity exposure of getting incorrect data if replicated data is not
updated simultaneously

Therefore, better when used for


(read-only) data
Chapter 13 08/17/2022
19
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)
 Global primary key control
 Scalability
 Security, concurrency, query optimization, failure recovery

Chapter 13 08/17/2022
Figure 13-10: Distributed DBMS architecture
20

08/17/2022
21
Local Transaction Steps

1. Application makes request to distributed DBMS


2. Distributed DBMS checks distributed data repository for location of
data. Finds that it is local
3. Distributed DBMS sends request to local DBMS
4. Local DBMS processes request
5. Local DBMS sends results to application

Chapter 13 08/17/2022
Figure 13-10: Distributed DBMS Architecture (cont.)
(showing local transaction steps)
22

3 5

4
Local transaction –
all data stored locally

08/17/2022
23
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

Chapter 13 08/17/2022
Figure 13-10: Distributed DBMS architecture (cont.)
(showing global transaction steps) 24

2
3
1
7 6
8
4

5
Global transaction – some
data is at remote site(s)

08/17/2022

You might also like