Sunteți pe pagina 1din 7

Distributed

Database Systems
Quiz Group B
102 108 114 126 132 138 144 150 Naseem Abbas Hira Bhatti Saba Rafique Ehsan Ullah Abu Arshad Farrah Sajjad Asma Aysha Noreen Group Leader

MCQs
Write correct option in the table given below. 1. Adistributeddatabasehaswhichofthefollowingadvantagesoveracentralizeddatabase? A. Softwarecost. B. Softwarecomplexity. C. SlowResponse. D. Modulargrowth. 2. Anautonomoushomogenousenvironmentiswhichofthefollowing? A. ThesameDBMSisateachnodeandeachDBMSworksindependently. B. ThesameDBMSisateachnodeandacentralDBMScoordinatesdatabaseaccess. C. AdifferentDBMSisateachnodeandeachDBMSworksindependently. D. AdifferentDBMSisateachnodeandacentralDBMScoordinatesdatabaseaccess. 3. Whichofthefollowingistrueconcerningaglobaltransaction? A. TherequireddataareatonelocalsiteandthedistributedDBMSroutesrequestsas necessary. B. TherequireddataarelocatedinatleastonenonlocalsiteandthedistributedDBMSroutes requestsasnecessary. C. TherequireddataareatonelocalsiteandthedistributedDBMSpassestherequesttoonly thelocalDBMS. D. TherequireddataarelocatedinatleastonenonlocalsiteandthedistributedDBMSpasses therequesttoonlythelocalDBMS. 4. Datasecurityisusedtoprotectthe__________fromunauthorizeduser. A. Information B. Data C. System D. BothA&B 5. WhichofthefollowingdoyouneedtoconsiderwhenyoumakeatableinSQL? A. Datatypes. B. Primarykeys.. C. Defaultvalues. D. Alloftheabove. 6. ONUPDATECASCADEensureswhichofthefollowing? A. Normalization. B. DataIntegrity. C. MaterializedViews. D. Alloftheabove.

7. Adistributeddatabaseiswhichofthefollowing? A. Asinglelogicaldatabasethatisspreadtomultiplelocationsandisinterconnectedbya network. B. Aloosecollectionoffilethatisspreadtomultiplelocationsandisinterconnectedbya network. C. Asinglelogicaldatabasethatislimitedtoonelocation. D. Aloosecollectionoffilethatislimitedtoonelocation. 8. Adistributeddatabasecanusewhichofthefollowingstrategies? A. Totallycentralizedatonelocationandaccessedbymanysites. B. Partiallyortotallyreplicatedacrosssites. C. Partitionedintosegmentsatdifferentsites. D. Alloftheabove. 9. Concurrencycontrolisimportantforwhichofthefollowingreasons? A. Toensuredataintegritywhilereadingdataoccurstothedatabaseinamultiuser environment. B. Toensuredataintegritywhilereadingdataoccurstothedatabaseinasingleuser environment. C. Toensuredataintegritywhenupdatesoccurtothedatabaseinamultiuserenvironment. D. Toensuredataintegritywhenupdatesoccurtothedatabaseinasingleuserenvironment. 10. SQLServerautomaticallycreatesanindexon: A. Primarykeysonly. B. Foreignkeyonly. C. Bothprimaryandforeignkeys. D. SQLServerneverautomaticallycreatesanindex.

ANSWERS:
Q# Ans. 1 2 3 4 5 6 7 8 9 10

TRUE / FALSE
Writecorrectanswerintablegivenbelow. 1. Adistributedunitofworkallowsvariousstatementswithinaunitofworktorefertomultiple remoteDBMSlocations. 2. Thesemijoinapproachsavesnetworktraffic. 3. Fullreplicationofauthorizationinformationcauselowoverheadcostformanagingthe distributedcatalogiftherearemanysitesinthesystem. 4. TotalisolationmeansindividualsystemarestandaloneDBMS. 5. Valuesinattributeusagematrixrepresenttheweightofapplicationfrequencies. 6. Dynamicviewisonewhosecontentsmaterializewhenreferenced. 7. TheSQLstatement:SELECTName,COUNT(*)FROMNAME_TABLE;countsthenumberofname rowsanddisplaysthistotalinatablewithasinglerowandasinglecolumn. 8. Autonomyreferstothedistributionofcontrolnotofdata. 9. Atransactionisthecompletesetofcloselyrelatedupdatecommandsthatmustallbedone,or noneofthemdone,forthedatabasetoremainvalid. 10. Packetswitchingprovidesadedicatedchannelbetweenthereceiverandthesender.

ANSWERS
Q# Ans. 1 2 3 4 5 6 7 8 9 10

QUESTIONS:
1. 2. 3. 4. WhatdoesA0,D2,H0means? Nameanddefinethedimensionsofautonomy. Whataresemanticintegrityconstraints? Considerthefollowingrelation. Game(gameID,gName,genre,price) AssumethatthefollowingSQLstatementsareexecutedtomanipulatethisrelationfrom4 applicationsatdifferentsites. q1:SELECTpriceFROMGameWHEREgameID=value; q2:SELECTMAX(price)FROMGameWHEREgenre=value; q3:SELECTgameID,gNameFROMGame; q4:SELECTgnameFROMGameWHEREgenre=value; A. Basedontheaboveinformation,constructtheuse(qi,Aj)matrixfortheattributesrelation game. B. Alsoconstructtheaffinitymatrix,iftheapplicationfrequenciesare: acc2(q1)=3 acc3(q1)=18 acc4(q1)=7 acc1(q1)=12 acc1(q2)=15 acc2(q2)=25 acc3(q2)=0 acc4(q2)=10 acc2(q3)=4 acc3(q3)=5 acc4(q3)=1 acc1(q3)=0 acc2(q1)=29 acc3(q1)=21 acc4(q1)=2 acc1(q1)=30 5. GiventhefollowingfragmentationofrelationSupplierwhichsplitstherelationininternaland externalsuppliers: Supplier1:code=internal(Supplier) Supplier2:codeinternal(Supplier) withSupplier(supNo,supName,code,city) PleasedetermineaderivedhorizontalfragmentationforrelationParts(partNo, partName,supNo,price)withsupNobeingaforeignkeyinPartsreferencingSupplier.supNo. Pleasecommentonthecorrectnessofyoursolutionbydescribingwhythecorrectnessrulesare met.

ANSWERS
1. Itmeansnoautonomy,amongclientandserversandnoheterogeneityandsystemsare homogenous. 2. DesignAutonomy:IndividualDBMSarefreetousedatamodelsandtransactiontechnique. CommunicationAutonomy:EachDBMSisfreetomakeitsowndecisiontoselectsoftwarethat controlstheirglobalexecutionandinformationitprovides. ExecutionAutonomy:DBMSexecutetransactionthatissubmittedtoitinanywaythatitwants. 3. SemanticIntegrityConstraints:SemanticIntegrityConstraintsarerulesthatrepresentthe knowledgeaboutthepropertiesofanapplication.Theconceptofanintegrityruleisstrongly connectedwiththedatamodelinthesensethatmoresemanticinformationaboutthe applicationcanbecapturedbymeansoftheserules. Twomaintypesofintegrityconstraintsare: StructuralConstraints:Structuralconstraintsexpressbasicsemanticpropertiesinherenttoa model.Examplesofsuchconstraintsareuniquekeyconstraint,notnullconstraint. BehavioralConstraints:BehavioralConstraintsregulatetheapplicationbehavior.Theyare essentialindatabasedesignprocess.Theycanexpressassociationbetweenobjects,suchas inclusiondependencyIND(assertionlikeifanemployismanagerofadepartment,thenhe/she mustbelongtothatdepartmentisexampleofIND)inrelationalmode.Behavioralconstraints alsodescribeobjectpropertiesandstructures. 4. Inthesolutionwewillusethefollowingnotation: A1=gameID A2=gName A3=genre A4=price A. Inattributeusagematrixrowswillrepresentqueriesandcolumnswillrepresentattributes. wewillplace1ifAjisaccessedinqi,otherwisewewillplace0. Ourattributeusagematrixwilllooklikethis: A1 A2 A3 A4 q1 1 0 0 1 q2 0 0 1 1 q3 1 1 0 0 q4 0 1 1 0 AttributeUsageMatrix B. TheattributeaffinitymeasureofAiandAjissumofaccessfrequenciesatdifferentsites whichexecuteaquerythatusesAiandAj. Forexample: aff(A1,A2)=acc1(q3)+acc2(q3)+acc3(q3)+acc4(q3) aff(A1,A2)=0+4+5+1=10 wewillplace10attheintersectionofA1andA2inattributeaffinitymatrixwherebothrows andcolumnsarerepresentingattributes.

A1 A2 A3 A4 40 50 10 1 0 10 92 9 82 0 0 82 8 132 50 40 0 50 90 Attribut teAffinityMa atrix 5. Wehavefollow W wingtwofrag gmentsofSup pplierrelation nafterprimaryhorizontalfragmentatio on: upplier1:co ode=interna al(Supplier) Su Su upplier2:co odeinternal l(Supplier) Derivedhorizo ontalfragmen ntationcanbe eobtainedby ysplittingPar rtsrelationon nthebasisof f betterjoincha aracteristicsa andcanbede efinedas: Parts1=Parts S s Supplier1 Parts2=Parts S s Supplier2 nrelationalalgebra: In

A1 A2 A3 A4

partNo,partName,Parts.supNo,price(Supplier1.su upNo=Parts.s supNo(Supplier1Parts)) ) partNo,partName,Parts.supNo,price(Supplier2.su upNo=Parts.s supNo(Supplier2Parts))


Th hecorrectnes ssruleapplyperfectlyont thisfragment tationsincey youonlyhave etwoconditio ons whichwillnotoverlapanda w allthedataareperfectlyc copedwithth heconditions(eitherthe su uppliercodei isinternalornot).

MCQs s:
Q# Ans. 1 D 2 A 3 B 4 B 5 D 6 B 7 A 8 D 9 C 10 A

TRUE / FA ALSE:
Q# Ans. 1 T 2 T 3 F 4 T 5 F 6 F 7 F 8 T 9 T 10 F

S-ar putea să vă placă și