资源描述:
《数据库系统概念第六版课后习题部分答案14s》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CHAPTER14TransactionsPracticeExercises14.1Answer:Eveninthiscasetherecoverymanagerisneededtoperformroll-backofabortedtransactions.14.2Answer:Thereareseveralstepsinthecreationofafile.Astorageareaisassignedtothefileinthefilesystem,auniquei-numberisgiventothefileandani-nodeentryisinsertedintothei
2、-list.Deletionoffileinvolvesexactlyoppositesteps.ForthefilesystemuserinUNIX,durabilityisimportantforobviousrea-sons,butatomicityisnotrelevantgenerallyasthefilesystemdoesn’tsupporttransactions.Tothefilesystemimplementorthough,manyoftheinternalfilesystemactionsneedtohavetransactionsemantics.Allt
3、hestepsinvolvedincreation/deletionofthefilemustbeatomic,otherwisetherewillbeunreferenceablefilesorunusableareasinthefilesystem.14.3Answer:Databasesystemsusuallyperformcrucialtaskswhoseeffectsneedtobeatomicanddurable,andwhoseoutcomeaffectstherealworldinapermanentmanner.Examplesofsuchtasksarem
4、onetarytransac-tions,seatbookingsetc.HencetheACIDpropertieshavetobeensured.Incontrast,mostusersoffilesystemswouldnotbewillingtopaytheprice(monetary,diskspace,time)ofsupportingACIDproperties.14.4Answer:Ifatransactionisverylongorwhenitfetchesdatafromaslowdisk,ittakesalongtimetocomplete.Inabs
5、enceofconcurrency,othertransactionswillhavetowaitforlongerperiodoftime.Averageresponcetimewillincrease.Alsowhenthetransactionisreadingdatafromdisk,CPUisidle.Soresourcesarenotproperlyutilized.Henceconcurrentexecutionbecomesimportantinthiscase.However,whenthetransactionsareshortorthedataisa
6、vailableinmemory,theseproblemsdonotoccur.14.5Answer:Mostoftheconcurrencycontrolprotocols(protocolsforen-suringthatonlyserializableschedulesaregenerated)usedinpracticearebasedonconflictserializability—theyactuallypermitonlyasubsetof12Chapter14Transactionsconflictserializableschedules.Thegene
7、ralformofviewserializabilityisveryexpensivetotest,andonlyaveryrestrictedformofitisusedforconcurrencycontrol.14.6Answer:Thereisaserializableschedulecorrespondingtotheprecedencegraphbelow,sincethegraphisacyclic.Apossiblescheduleisobtainedbydoingatopologicalsort,thatis