Lecture Notes Unit3 chapter20 - Database System Architectures

Murugan146644 1,179 views 41 slides Oct 15, 2024
Slide 1
Slide 1 of 41
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41

About This Presentation

Description:
Welcome to the comprehensive guide on Relational Database Management System (RDBMS) concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in RDBMS, offering a structured appr...


Slide Content

RDBMS -Unit III
Chapter 20
Database System Architectures
Prepared By
Dr.S.Murugan, Associate Professor
Department of Computer Science,
AlagappaGovernmentArts College, Karaikudi.
(Affiliated by AlagappaUniversity)
Mailid: [email protected]
Reference Book:
Database System Concepts by Abraham Silberschatz, Henry
F.Korth, S. Sudharshan

Database System Architectures –Client Server Database System
➢Networkingofcomputersallowssometaskstobe
executedonaserversystemandsometaskstobe
executedonclientsystems.
➢Thisdivisionofworkhasledtoclient-serverdatabase
systems.

Database System Architectures –Parallel Processing System
➢Parallelprocessingisamethodofsimultaneously
breakingupandrunningprogramtasksonmultiple
microprocessors,therebyreducingprocessingtime.
➢Parallelprocessingmaybeaccomplishedvia
acomputerwithtwoormoreprocessorsorviaa
computernetwork.
➢Parallelprocessingisalsocalledparallelcomputing

Database System Architectures –Parallel Processing System

Database System Architectures –Distributed Data Processing System
➢Distributeddataprocessingisacomputer-networking
methodinwhichmultiplecomputersacrossdifferent
locationssharecomputer-processingcapability.

2O.1 CentraIizedand Client -Server Architectures
➢Amodern,general-purposecomputersystemconsists
ofonetoafewCPUsandanumberofdevice
controllersthatareconnectedthroughacommonbus
thatprovidesaccesstosharedmemoryasshownin
Figure20.1.

2O.1 CentraIizedand Client -Server Architectures
➢Acomputersystemmaybesingleuserormultiuser.
➢Atypicalsingle-usersystemisadesktopunitusedby
asingleperson,usuallywithonlyoneCPUandoneor
twoharddisks,andusuallyonlyonepersonusingthe
machineatatime.
➢Atypicalmultiusersystem,ontheotherhand,has
moredisksandmorememory,mayhavemultiple
CPUsandhasamultiuseroperatingsystem.
➢Itservesalargenumberofuserswhoareconnectedto
thesystemviaterminals.

20.1.2 Client-Server Systems
➢Thecentralizedsystemstodayactasserversystems
thatsatisfyrequestsgeneratedbyclientsystems.
Figure20.2showsthegeneralstructureofaclient-
serversystem.

20.1.2 Client-Server Systems
➢Thefunctionofdatabasecanbebroadlydividedinto
twoparts.Oneisfront-endandanotheroneisBack-
endasshowninFigure20.3.
➢Thefront-endofadatabasesystemconsistsoftools
suchasSQLuserinterface,formsinterfaces,report
Generation.
➢Thebackendmanagesaccessstructuresandquery
Evaluation.
➢Theinterfacebetweenthefrontendandthebackend
isthroughSQL,orthroughanapplicationprogram.

20.1.2 Client-Server Systems

2O.2 Server System Architecture
➢Serversystemscanbebroadlycategorizedas
transactionserversanddataservers.
➢Transaction-serversystems,alsocalledquery-
serverwhichreceivestheanswerfromtheserver
basedontheclientrequest.
➢Data-serversystemsallowclientstointeractwiththe
serversbymakingrequeststoreadorupdatedata.

20.2.1 Transaction-Server Process Structure
➢Atransaction-serversystemconsistsofmultiple
processesaccessingdatainsharedmemory,asin
Figure20.4.Theprocessesthatformpartofthe
databasesysteminclude.
➢Serverprocesses:Theseareprocessesthatreceiveuser
queries(transactions),executethem,andsendthe
resultsbacktotheclient.
➢Lockmanagerprocess:Itincludeslockgrant,lock
release,anddeadlockdetection.

20.2.1 Transaction-Server Process Structure
➢Databasewriterprocess:Theoutputcanbestored
fromspoolintoharddiskanduserrecords.
➢Logwriterprocess:outputslogrecordsfromthelog
recordbuffertostablestorage.
➢Processmonitorprocess:Ittakesrecoveryactions.

20.2.1 Transaction-Server Process Structure

2O.2 Server System Architecture
➢Data-serversystemsareusedinlocal-areanetworks,
wherethereisahigh-speedconnectionbetweenthe
clientsandtheserver,theclientmachinesare
comparableinprocessingpowertotheserver
machine,andthetaskstobeexecutedarecomputation
intensive.
➢Insuchanenvironment,itmakessensetoshipdatato
clientmachines,toperformallprocessingattheclient
machine(whichmaytakeawhile),andthentoship
thedatabacktotheservermachine.
➢Notethatthisarchitecturerequiresfullback-end
functionalityattheclients.
➢Data-serverarchitectureshavebeenparticularly
popularinobject-orienteddatabasesystems.

2O.3 Parallel Systems
➢ParallelsystemsimproveprocessingandI/Ospeeds
byusingmultipleCPUsanddisksinparallel.
➢Inparallelprocessing,manyoperationsareperformed
simultaneously,asopposedtoserialprocessing,in
whichthecomputationalstepsareperformed
sequentially.
➢Acoarse-grainparallelmachineconsistsofasmall
numberofpowerfulprocessors.
➢Amassivelyparallelorfine-grainparallelmachine
usesthousandsofsmallerprocessors.

2O.3 Parallel Systems
Therearetwomainmeasuresofperformanceofa
databasesystem:
(1)throughput,thenumberoftasksthatcanbe
completedinagiventimeinterval,and
(2)responsetime,theamountoftimeittakesto
completeasingletaskfromthetimeitissubmitted.

20.3.1 Speedup and Scaleup
➢Twoimportantissuesinstudyingparallelismare
speedupandscaleup.
➢Runningagiventaskinlesstimebyincreasingthe
degreeofparallelismiscalledspeedup.
➢Handlinglargertasksbyincreasingthedegreeof
parallelismiscalledscaleup.

20.3.1 Speedup and Scaleup

20.3.1 Speedup and Scaleup

20.3.2 lnterconnectionNetworks
➢Parallelsystemsconsistofasetofcomponents
(processors,memory,anddisks)thatcancommunicate
witheachotherviaaninterconnectionnetwork
➢Figure20.7showsthreecommonlyusedtypesof
interconnectionnetworks:
(i)Bus
(ii)Mesh
(iii)Hybercube

20.3.2 lnterconnectionNetworks -Bus
➢AIIthesystemcomponentscansenddataonand
receivedatafromasinglecommunicationbus.This
typeofinterconnectionisshowninFigure(a).
➢ThebuscouldbeanEthernetoraparallel
interconnect.
➢Busarchitecturesworkwellforsmallnumbersof
processors.

20.3.2 lnterconnectionNetworks -Mesh
➢Thecomponentsarenodesinagrid,andeach
componentconnectstoallitsadjacentcomponentsin
thegrid.
➢Inatwo-dimensionalmesheachnodeconnectstofour
adjacentnodes,Figure(b)showsatwo-dimensional
mesh.

20.3.2 lnterconnectionNetworks -Hybercube
➢Thecomponentsarenumberedinbinary,anda
componentisconnectedtoanotherifthebinary
representationsoftheirnumbersdifferinexactlyone
bit.

20.3.3 Parallel Database Architectures
➢Thereareseveralarchitecturalmodelsforparallel
machines.
➢AmongthemostprominentonesarethoseinFigure
20.8(inthefigure,Mdenotesmemory,Pdenotesa
processor,anddisksareshownascylinders):

20.3.3 Parallel Database Architectures
➢Sharedmemory.Alltheprocessorsshareacommon
memory(Figure20.8a).
➢Shareddisk.Alltheprocessorsshareacommonsetof
disks(Figure20.8b).Shared-disksystemsare
sometimescalledclusters.
➢Sharednothing.Theprocessorsshareneithera
commonmemorynorcommondisk(Figure20.8c).
➢Hierarchical.Thismodelisahybridofthepreceding
threearchitectures(Figure20.8d)

20.3.3 Parallel Database Architectures

2O.4 Distributed Systems
➢Inadistributeddatabasesystem,thedatabaseisstored
onseveralcomputers.
➢Thecomputersinadistributedsystemcommunicate
withoneanotherthroughvariouscommunication
media,suchashigh-speednetworksortelephone
lines.Thegeneralstructureofadistributedsystem
appearsinFigure20.9.

2O.4 Distributed Systems
S.No.Shared Nothing
ParallelDB
Distributed DB
1. Paralleldatabasesare
not geographically
separated,notseparately
administratedandhave
afasterinterconnection.
Distributeddatabases are
geographicallyseparated,separately
administered,andhaveaslower
interconnection.
2. Thereisnodifferencein
localtransactionand
globaltransaction.
Thereisadifferencebetweenlocal
transactionandglobaltransaction.In
localtransaction,accessesdataonly
fromsiteswherethetransactionwas
initiated.
Inglobaltransaction,accessesdata
inseveraldifferentsites.

2O.4 Distributed Systems
➢Distributedsystemsaredevelopedforthepurposeof
sharingdata,autonomyandavailability.
➢Sharingdata:Theusermayabletoaccessthedata
fromothersite.
➢Autonomy:Localdatabaseadministratoris
availableforeverysite.
➢Availability:Ifonesitefailsinadistributedsystem,
theremainingsitesmaybeabletocontinue
operating.

20.4.1 An Example of Distributed Database
➢Considerabankingsystemconsistingoffour
branchesinfourdifferentcities.
➢Eachbranchhasitsowncomputer,withadatabaseof
alltheaccountsmaintainedatthatbranch.
➢Therealsoexistsonesinglesitethatmaintains
informationaboutallthebranchesofthebank.
➢Eachbranchmaintainsarelationaccount
(Account_schema),where
Account_schema=(account_number,branch_name,ba
lance)

20.4.1 An Example of Distributed Database
➢Thesitecontaininginformationaboutallthe
branchesofthebankmaintainsthereIationbranch
(Branch_schema),where
Branch_schema=(branch_name,branch_city,assets)
➢Ifthedatawereaccessedfromsinglesiteforthe
transactioniscalledlocaltransaction.Forex,fund
transferfromAccountAtoAccountBinthesame
branchwiththesamecity.
➢Ifthedatawereaccessedfrommultiplesiteforthe
transactioniscalledglobaltransaction.Forex,fund
transferfromAccountAtoAccountBinthesame
branchwiththedifferentcity.

20.4.2 lmplementationlssues
➢Atomicityoftransactionsisanimportantissuein
buildingadistributeddatabasesystem.
➢Ifatransactionrunsacrosstwosites,itmaycommit
atonesiteandabortatanother,leadingtoan
inconsistentstate.
➢Thisproblemsolvedbythetwo-phasecommit
protocol(2PC).
➢Thecoordinatordecidestocommitthetransaction
onlyifthetransactionreachesthereadystateatevery
sitewhereitexecuted;otherwise(forexample,ifthe
transactionabortsatanysite),thecoordinatordecides
toabortthetransaction.

20.4.2 Implementation lssues
➢Concurrencycontrolisanotherissueinadistributed
database.
➢Sinceatransactionmayaccessdataitemsatseveral
sites,transactionmanagersatseveralsitesmayneed
tocoordinatetoimplementconcurrencycontrol.
➢Iflockingisused,lockingcanbeperformedlocally
atthesitescontainingaccesseddataitems,butthere
isalsoapossibilityofdeadlockinvolving
transactionsoriginatingatmultiplesites.
➢Thereforedeadlockdetectionneedstobecarriedout
acrossmultiplesites.

20.4.2 Implementation lssues
➢Theprimarydisadvantageofdistributeddatabase
systemsare:
➢Software-developmentcostishigh.
➢Greaterpotentialforbugs.
➢Increasedprocessingoverhead.

2O.5 Network Types
➢Distributeddatabasesandclient-serversystemsare
builtaroundcommunicationnetworks.
➢Therearebasicallytwotypesofnetworks:local-area
networksandwideareanetworks.
S.No
.
Local Area Network Wide Area Network
1.processorsaredistributed
oversmallgeographical
areas,suchasasingle
buildingoranumberof
adjacentbuildings.
anumberofautonomous
processorsaredistributedovera
largegeographicalarea(suchas
theUnitedStatesortheentire
world)

20.5.1 Local-Area Networks
➢Local-area networks (LANs) (Figure 20.10) emerged
in the early 1970s as a way for computers to
communicate and to share data with one another.

20.5.1 Local-Area Networks
➢LANs are generally used in an office environment
➢LANs have a higher speed and lower error rate than
WAN
➢The most common links in a local-area network are
twisted pair, coaxial cable, fiber optics.
➢Communication speeds range from a few megabits
per second to gigabits per second.

20.5.1 Local-Area Networks
➢Astorage-areanetwork(SAN)isaspecialtypeof
high-speedlocal-areanetworkdesignedtoconnect
largebanksofstoragedevices(disks)tocomputers
thatusethedata(seeFigure20.11).

20.5.2 Wide-Area Networks
➢ThefirstWANtobedesignedanddevelopedwasthe
Arpanet.WorkontheArpanetbeganin1968.
➢TheArpanethasgrownfromafour-siteexperimental
networktoaworldwidenetworkofnetworks,the
Internetcomprisinghundredsofmillionsofcomputer
systems.
➢Dataratesforwide-arealinkstypicallyrangefroma
fewmegabitspersecondtohundredsofgigabitsper
second.
➢Thelastlink,toendusersites,isoftenbasedondigital
subscriberline(DSL)technologyorcablemodemor
dial-upmodem

20.5.2 Wide-Area Networks
➢WANscanbeclassifiedintotwotypes:
➢IndiscontinuousconnectionWANs,suchasthose
basedonwirelessconnections,hostsareconnectedto
thenetworkonlypartofthetime.
➢IncontinuousconnectionWANs,suchasthewired
Internet,hostsareconnectedtothenetworkatalltimes.