+ All Categories
Home > Documents > ADB Chapter 7

ADB Chapter 7

Date post: 06-Jul-2018
Category:
Upload: muluken-hussen
View: 213 times
Download: 0 times
Share this document with a friend

of 28

Transcript
  • 8/17/2019 ADB Chapter 7

    1/28

    Chapter 7

    Distributed Databases system

  • 8/17/2019 ADB Chapter 7

    2/28

  • 8/17/2019 ADB Chapter 7

    3/28

    Distributed DatabaseConcepts

    • A transaction can be e&ecuted by multiplenet'or(ed computers in a uni)ed manner.

    • A distributed database (DDB) processes*nit o! e&ecution +a transaction in adistributed manner. A distributed database+DD- can be de)ned as – A distributed database +DD- is a collection o!

    multiple logically related database distributed oer

    a computer net'or(, and a distributed databasemanagement system as a so!t'are system thatmanages a distributed database 'hile ma(ing thedistribution transparent to the user.

    3

  • 8/17/2019 ADB Chapter 7

    4/28

    Distribution ransparency

    • An important goal o! a distributedsystem is to hide the !act that itsprocesses and resources are physically

    distributed across multiple computers.• A distributed system that is able to

    present itsel! to users and applications

    as i! it 'ere only a single computersystem is said to be transparent.

    #

  • 8/17/2019 ADB Chapter 7

    5/28

    Distribution ransparency

    /

  • 8/17/2019 ADB Chapter 7

    6/28

  • 8/17/2019 ADB Chapter 7

    7/28

    Distributed Database"ystem

    • Adantages +transparency, contd. – he 40%5O644, %RO4C, and

    8OR9":O; tables may be !ragmented

    hori

  • 8/17/2019 ADB Chapter 7

    8/28

    Distributed Database"ystem

    • Adantages +transparency, contd. – Distribution and Network

    transparency

    • *sers do not hae to 'orry aboutoperational details o! the net'or(.

     – here is 5ocation transparency, 'hich re!ers to!reedom o! issuing command !rom any location'ithout aecting its 'or(ing.

     – hen there is ;aming transparency, 'hich allo'saccess to any names ob=ect +)les, relations, etc.!rom any location.

    >

  • 8/17/2019 ADB Chapter 7

    9/28

  • 8/17/2019 ADB Chapter 7

    10/28

    Distributed Database"ystem

    • Other Adantages – Increased reliability and

    availability

    • Reliability re!ers to system lie time, that is,system is running eBciently most o! thetime. Aailability is the probability that thesystem is continuously aailable +usable or

    accessible during a time interal.• A distributed database system has multiple

    nodes +computers and i! one !ails thenothers are aailable to do the =ob.

    1

  • 8/17/2019 ADB Chapter 7

    11/28

  • 8/17/2019 ADB Chapter 7

    12/28

    Data Fragmentation, Replication andAllocation

    • Data Fragmentation – "plit a relation into logically related and

    correct parts. A relation can be

    !ragmented in t'o 'ays• !ori"ontal Fragmentation

    • #ertical Fragmentation

    12

  • 8/17/2019 ADB Chapter 7

    13/28

  • 8/17/2019 ADB Chapter 7

    14/28

    Data Fragmentation, Replication andAllocation

    • #ertical fragmentation

     – ?t is a subset o! a relation 'hich is created by asubset o! columns. hus a ertical !ragment o! arelation 'ill contain alues o! selected columns.

     here is no selection condition used in ertical!ragmentation.

     – Consider the 4mployee relation. A ertical!ragment o! can be created by (eeping the alueso! ;ame, -date, "e&, and Address.

     – -ecause there is no condition !or creating a ertical!ragment, each !ragment must include the primary(ey attribute o! the parent relation 4mployee. ?nthis 'ay all ertical !ragments o! a relation are

    connected. 1#

  • 8/17/2019 ADB Chapter 7

    15/28

    Data Fragmentation, Replication andAllocation

    • Representation

     – !ori"ontal fragmentation

    • 4ach hori

  • 8/17/2019 ADB Chapter 7

    16/28

  • 8/17/2019 ADB Chapter 7

    17/28

    Data Fragmentation, Replication andAllocation

    • Fragmentation sc%ema

     – A de)nition o! a set o! !ragments +hori

  • 8/17/2019 ADB Chapter 7

    18/28

    Data Fragmentation, Replication andAllocation

    • Data Replication

     – Database is replicated to all sites.

     – ?n !ull replication the entire database is replicatedand in partial replication some selected part is

    replicated to some o! the sites. – Data replication is achieed through a replication

    schema.

    • Data Distribution (Data llocation)

     –  his is releant only in the case o! partialreplication or partition.

     –  he selected portion o! the database is distributedto the database sites.

    1

  • 8/17/2019 ADB Chapter 7

    19/28

     ypes o! Distributed Database "ystems

    • Homogeneous – All sites o! the

    database system haeidentical setup, i.e.,same database system

    so!t'are. –  he underlying

    operating system maybe dierent.

    • For e&ample, all sitesrun Oracle or D-2, or"ybase or some otherdatabase system.

     –  he underlyingoperating systems canbe a mi&ture o! 5inu&,8indo', *ni&, etc.

    2

    Site 5

    Site 1

    Site 2Site 3Oracle Oracle

    Oracle

    Oracle

    Site 4

    Oracle

    LinuxLinux

    Window

    Window

    Unix

    Communications

    network 

  • 8/17/2019 ADB Chapter 7

    20/28

     ypes o! Distributed Database "ystems

    • Heterogeneous – Federated 4ach site may run dierent database system

    but the data access is managed through a singleconceptual schema.

    •  his implies that the degree o! local autonomy is minimum.

    4ach site must adhere to a centrali

  • 8/17/2019 ADB Chapter 7

    21/28

  • 8/17/2019 ADB Chapter 7

    22/28

    $uery %rocessing in DistributedDatabases

    • ?ssues

     – Cost o! trans!erring data +)les and results oer thenet'or(.

    •  his cost is usually high so some optimi

  • 8/17/2019 ADB Chapter 7

    23/28

    $uery %rocessing in DistributedDatabases

    • Result – he result o! this @uery 'ill hae 1,

    tuples, assuming that eery employee is

    related to a department. – "uppose each result tuple is # bytes

    long. he @uery is submitted at site 3and the result is sent to this site.

     – %roblem 4mployee and Departmentrelations are not present at site 3.

    2#

  • 8/17/2019 ADB Chapter 7

    24/28

    $uery %rocessing in DistributedDatabases

    • "trategies

    1. rans!er 4mployee and Department to site 3.•  otal trans!er bytes 1,, I 3/ 1,3,/ bytes.

    2. rans!er 4mployee to site 2, e&ecute =oin at site 2 and

    send the result to site 3.• $uery result si

  • 8/17/2019 ADB Chapter 7

    25/28

    $uery %rocessing in DistributedDatabases

    • Consider the @uery – $K For each department, retriee the

    department name and the name o! the

    department manager• Relational Algebra e&pression

     –   ΠFname,5name,Dname +4mployee 0grssn ""; 

    Department

    27

  • 8/17/2019 ADB Chapter 7

    26/28

    $uery %rocessing in DistributedDatabases

    •  he result o! this @uery 'ill hae 1 tuples,assuming that eery department has a manager,the e&ecution strategies are1. rans!er 4mployee and Department to the result

    site and per!orm the =oin at site 3.•  otal bytes trans!erred 1,, I 3/

    1,3,/ bytes.

    2. rans!er 4mployee to site 2, e&ecute =oin at site 2and send the result to site 3. $uery result si

  • 8/17/2019 ADB Chapter 7

    27/28

    $uery %rocessing in DistributedDatabases

    • ;o' suppose the result site is 2.%ossible strategies 1. rans!er 4mployee relation to site 2,

    e&ecute the @uery and present theresult to the user at site 2.•  otal trans!er si

  • 8/17/2019 ADB Chapter 7

    28/28

    $uery %rocessing in DistributedDatabases

    • "emi=oin – Ob=ectie is to reduce the number o! tuples in a

    relation be!ore trans!erring it to another site.• 4&ample e&ecution o! $ or $K

    1. %ro=ect the =oin attributes o! Department at site 2,and trans!er them to site 1. For $, # J 1 #bytes are trans!erred and !or $K, J 1 bytes are trans!erred.

    2. oin the trans!erred )le 'ith the 4mployee relationat site 1, and trans!er the re@uired attributes !rom

    the resulting )le to site 2. For $, 3# J 1, 3#, bytes are trans!erred and !or $K, 3 J 1 3 bytes are trans!erred.

    3. 4&ecute the @uery by =oining the trans!erred )le'ith Department and present the result to the userat site 2.

    31


Recommended