Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Distributed database, Study notes of Distributed Database Management Systems

Introduction to distributed databases chapter 1

Typology: Study notes

2018/2019

Uploaded on 03/16/2019

krishna-priya-chakir
krishna-priya-chakir 🇮🇳

2 documents

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Distributed Databases
Unit 1
-
Introduction
Unit
1
Introduction
1VijaykumarMantri,Assoc.Prof.inIT,BVRIT
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Distributed database and more Study notes Distributed Database Management Systems in PDF only on Docsity!

Distributed DatabasesUnit 1 - IntroductionUnit 1^ Introduction

Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Distributed^ Databases • Distributed^ database^ is^ a^ collection

of^ data which belong logically to the same system butwhich^ belong^ logically^

to^ the^ same^ system^ but are^ spread^ over^ the^ sites

of^ computer^ network. 1 Distribution^ : The fact that the data are not1.^ Distribution^ :‐^ The^ fact

that^ the^ data^ are^ not resident^ at^ the^ same^ site. 2 L^ i^ l^ l ti^ Th

f^ t th t th^ d t^ h

2.^ Logical^ correlation^ :

‐^ The^ fact^ that^ the^ data

have some^ properties^ which

tie^ them^ together. Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

DB1^ DB2T

T

Branch^1

Branch^2 Computer^ Center T T T Comp 1 Comp^2

T T p^ p Local^ N/W Comp^3 DB3 A distributed databaseA distributed database on a local networkT^ T^ T Branch^3 Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Features^ of^ Distributed

VS^ Centralized^ Databases

-^ Centralized^ ControlD t^ i d^ d •^ Data^ independence •^ Reduction^ of^ redundancy •^ Complex^ physical^ structures

and^ efficient^ accessExample

-^ Integrity,^ Recovery^ and

Concurrency^ Control

-^ Privacy & Security •^ Privacy^ &^ Security

Next^5 Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

  1. At^ site^1 Send^ sites^2 and^3 the

supplier^ number^ SN

  1. At sites 2 and 32)^ At^ sites^2 and^3 execute^ in^ parallel,^

upon^ receipt^ of^ the^ supplier number the following program:number, the following^ program: Find all PARTS records^ having^ SUP#=SN;Send result to site^ 1. 3)^ At^ site^1 Merge^ results^ from^

sites^2 and^ 3; BACKBACK Output the result (^) Output the result. Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Why Distributed DatabasesWhy^ Distributed^

Databases

-^ Organizational and economic reasonsOrganizational^ and^ economic

reasons.

-^ Interconnection^ of^ existing

databases.l G h

-^ Incremental^ Growth. •^ Reduced^ communication

overhead.

-^ Performance^ considerations. •^ Reliability and AvailabilityReliability^ and^ Availability .^8 Vijaykumar Mantri, Assoc. Prof.^ in^ IT,^ BVRIT

Global SchemaSiteFragmentation^ Independent Schema^ SchemaAllocationReference^ Schema

Architecture^ for Distributed Databases Local Local Mapping M i Distributed^ Databases Mapping Mapping Schema2 Schema1DBMS of Site 1 DBMS^ of^ Site^2 Local^ DB^ atLocal DB at^ site^2 site 1 Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

(^1) (R^1 R 1 )^1 R 1 (^1) (R^2 R (Site^ 1)) (^) R^2 R (^2) (R)^1 2 R (Site^ 2)(^ ) (^2) (R)^2 R 3 Physical ImagesPhysical^ ImagesR 34 (R)^2 33 R (Site^ 3)^3 (R)^3 Global^ Relation^ Fragments

(^3) (R)^4^11 Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Following^ are^ the^ rules

which^ must^ be^ followed C l C di i^ ll h^ d^ f h

-^ Completeness^ Condition

:‐^ All^ the^ data^ of^ the global^ relation^ must^ be

mapped^ into^ fragments.

-^ Reconstruction^ Condition

:‐^ It^ must^ always possible^ to^ reconstruct

each^ global^ relation from^ its^ fragments. • Disjointness^ Condition

:‐^ It^ is^ convenient^ that j fragments^ be^ disjoint,^

so^ that^ the^ replication^

of data^ can^ be^ controlled^

at^ each^ allocation^ level. Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Horizontal^ Fragmentation • Horizontal^ Fragmentation

:‐^ Horizontal Fragmentation^ consists

of^ partitioning^ the tuples of a global relation into subsets, whereeach^ subset^ can^ contain

data^ which^ have common geographical properties. • This^ can^ be^ defined

by^ using^ selectiony^ g operation on the global relation. Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Derived^ Horizontal

Fragmentation

S^ ti^ H^ i^ t l F

t ti^ b

-^ Sometimes^ Horizontal

Fragmentation^ may^ be derived from Horizontal^ Fragmentation^ of th l tianother relation Eg:‐^ Consider^ the^ global

relationSUPPLY(SNUM, PNUM,^ DEPTNUM,^ QUAN) We can fragment the tuples for suppliers which areWe^ can^ fragment^ the^ tuples

for^ suppliers^ which^ are in^ given^ city.^ The^ derived

fragmentation^ can^ be defines^ asde^ es as SUPPLY=^ SUPPLY^ SJ^1 SNUM

SUPPLIER = SNUM 1

SUPPLY^ SUPPLY^ SJ^

SUPPLIER

SUPPLY=^ SUPPLY^ SJ^2 SNUM

SUPPLIER = SNUM 2^16 Vijaykumar Mantri, Assoc. Prof. in IT, BVRIT

Vertical^ Fragmentation • The Vertical Fragmentation of a global relation isthe subdivision of its attributes into groups. • The fragmentation is correct if each attributes ismapped^ into^ at^ least^ one^

attribute^ of^ the ppfragments. • It must^ be^ possible^ to^ reconstruct

the^ original It^ must^ be^ possible^ to

reconstruct^ the^ original relation by joining fragments. Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

Mixed^ FragmentationEg:‐ Consider^ the^ global^ schema.EMP(EMPNUM,^ NAME,^ SAL,^ TAX,^ MGRNUM,

DEPTNUM)

-^ The^ following^ is^ a^ mixed

fragmentation^ obtained by^ vertical^ fragmentation

followed^ by^ horizontal y^ g^

y fragmentation Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT

•^ EMP=^ SL^1 DEPTNUM<=

PJ^ EMPNUM,^ NAME,^ MGRNUM, EMPEMP DEPTNUM

•^ EMP=^ SL^2 10 DEPTNUM

PJ^ EMP SL PJ^20 EMPNUM NAME MGRNUM 2 10 <DEPTNUM<=20 EMPNUM,^ NAME,^ MGRNUM

, EMP DEPTNUM (^) • EMP= SL^ PJ 3 DEPTNUM>^ EMPNUM,^ NAME,^ MGRNUM, EMPEMP DEPTNUM (^) DEPTNUM (^) • EMP= PJ^4 EMPNUM NAME SAL TAX

EMP

4 EMPNUM,^ NAME,^ SAL,^ TAX Vijaykumar^ Mantri,^ Assoc.^ Prof.^ in^ IT,^ BVRIT