




已阅读5页,还剩32页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
OverviewofDatabaseSystems JianlinFengSchoolofSoftwareSUNYAT SENUNIVERSITY WhatisaDatabase ADatabase Averylarge integratedcollectionofdata Modelsareal world enterprise Entitiese g students coursesRelationshipse g ZhangSanistakingtheDatabaseSystemcourse WhatisaDatabaseManagementSystem ADatabaseManagementSystem DBMS is Asoftwaresystemdesignedtostore manage andfacilitatequerytodatabases PopularDBMSOracleIBMDB2MicrosoftSQLServerDatabaseSystem Databases DBMS DBMSmakesabigindustry Theworld slargestsoftwarecompaniesbyForbesGlobal2000 TypicalApplicationsSupportedbyDatabaseSystems OnlineTransactionProcessing OLTP RecordingsalesdatainsupermarketsBookingflightticketsElectronicbankingOnlineanalyticalprocessing OLAP andDataWarehousingBusinessreportingforsalesdataCustomerRelationshipManagement CRM IstheWWWaDBMS TheWeb SurfaceWeb DeepWebSurfaceWeb simplytheHTMLpagesAccessedby search Posekeywordsinsearchbox DeepWeb contenthiddenbehindHTMLformsAccessedby query Fillinqueryforms Search as SimpleSearch Query as AdvancedSearch Search vs Query Searchisstructure free Thekeywords databasesystems canappearinanyplaceinaHTMLpages Queryisstructure aware Say werestructthatthekeywords databasesystems canonlyappearinthe TITLE field i e weassumethereisanunderlyingSTRUCTURE ofabook Whatisa STUCTURE ReferringtotheCprogramminglanguagestructBOOK charTITLE 256 charAUTHOR 256 floatPRICE intYEAR Inthiscourse westudydatabasemanagementsystemsthatfocusonprocessingstructureddata AnAnecdoteabout Search Google sFoundersarefromDatabaseGroupofStanford Filesvs DBMS WecanstoredatainOSfiles E g GooglehasitsowndistributedfilesystemcalledGoogleFileSystem GFS WhataretheadvantagesofDBMS GooddatamodelingDataIndependenceDataIntegrityandSecuritySimpleandefficientad hocqueriesReducedapplicationdevelopmenttimeConcurrencycontrolCrashrecovery WhyStudyDatabases ShiftfromcomputationtoinformationTrueincorporatecomputingforyearsWebmadethisclearfor therestofus bytheendof90 sIncreasinglytrueofscientificcomputingNeedforDBtechnologyhasexplodedinthelastyearsCorporate retailswipe clickstreams customerrelationshipmgmt supplychainmgmt datawarehouses etc Web notjust documents Searchengines maps e commerce blogs wikis socialnetworks Web2 0 Scientific digitallibraries genomics satelliteimagery physicalsensors simulationdataPersonal Music photo videolibraries Emailarchives Filecontents desktopsearch A DatabasesystemsarethecoreofCS courtesyofJoeHellerstein AHistoricalPerspective 1 IntegratedDataStore IDS byCharlesBachman early1960s NetworkdatamodelTuringAwardSpeech TheProgrammerasNavigator 1973 InformationManagementSystem IMS byIBM late1960s Hierarchicaldatamodel AHistoricalPerspective 2 RelationalDataModel byEdgarCodd 1970 Codd E F 1970 ARelationalModelofDataforLargeSharedDataBanks CommunicationsoftheACM13 6 377 387 TuringAward 1981 SystemR byIBM startedin1974StructuredQueryLanguage SQL INGRES byBerkeley startedin1974POSTGRES Mariposa C Store AHistoricalPerspective 3 DatabaseTransactionProcessing mainlybyJimGray JGray AReuter Transactionprocessing conceptsandtechniques 1993 TuringAward 1998 Object RelationalDBMS 1990s Stonebraker MichaelwithMoore Dorothy Object RelationalDBMSs TheNextGreatWave 1996 Postgres UCBerkeley PostgreSQL IBM sDB2 Oracledatabase andMicrosoftSQLServer DescribingData DataModels Adatamodelisacollectionofconceptsfordescribingdata Aschemaisadescriptionofaparticularcollectionofdata usingagivendatamodel Therelationaldatamodelisthemostwidelyusedmodeltoday Mainconcept relation basicallyatablewithrowsandcolumns Everyrelationhasaschema whichdescribesthecolumns orfields theirnames types constraints etc SchemainRelationDataModel Students sid string name string login string age integer gpa real Table1 AnInstanceoftheStudentsRelation DefinitionoftheStudentsSchema ArelationschemaisaTEMPLATEofthecorrespondingrelation LevelsofAbstractioninaDBMS Manyviewsdescribehowusersseethedata Personalizedaccessofdata Conceptualschemadefineslogicalstructurei e whatrelationstostore Physicalschemaspecifiesphysicalstructure Howthe logical relationsarephysicallystoredonexternalstoragesuchasdisk courtesyofJoeHellerstein Example UniversityDatabase Conceptualschema Students sid string name string login string age integer gpa real Courses cid string cname string credits integer Enrolled sid string cid string grade string Physicalschema Relationsstoredasunorderedfiles IndexonfirstcolumnofStudents ExternalSchema View Course info cid string enrollment integer DataIndependence Applicationsinsulatedfromhowdataisstructuredandstored Logicaldataindependence Protectionfromchangesinlogicalstructureofdata Physicaldataindependence Protectionfromchangesinphysicalstructureofdata OneofthemostimportantbenefitsofusingaDBMS QueriesinaRelationalDBMS SpecifiedinaNon ProceduralwayUsersonlyspecifywhatdatatheyneed ADBMStakescaretoevaluatequeriesasefficientlyaspossible aNon ProceduralQueryLanguage SQL StructuredQueryLanguageBasicformofaSQLquery SELECTtarget listFROMrelation listWHEREqualification ASimpleSQLExample Atanairport agateagentclicksonaformtorequestthepassengerlistforaflight SELECTnameFROMPassengerWhereflight 510275 Passenger pid string name string flight integer Concurrentexecutionofuserprograms Why UtilizeCPUwhilewaitingfordiskI O databaseprogramsmakeheavyuseofdisk Avoidshortprogramswaitingbehindlongonese g ATMwithdrawalwhilebankmanagersumsbalanceacrossallaccounts courtesyofJoeHellerstein Concurrentexecution Interleavingactionsofdifferentuserprogramscanleadtoinconsistency Example Billtransfers 100fromsavingstocheckingSavings 100 Checking 100Meanwhile Bill swiferequestsaccountinfo Badinterleaving Savings 100PrintbalancesChecking 100Printoutismissing 100 courtesyofJoeHellerstein ConcurrencyControl DBMSensuressuchproblemsdon tarise Userscanpretendtheyareusingasingle usersystem Keyconcept Transaction AnTransactionisanatomicsequenceofdatabaseactions reads writes Eachtransaction executedcompletely mustleavetheDBinaconsistentstateifDBisconsistentwhenthetransactionbegins Userscanspecifysomesimpleintegrityconstraintsonthedata andtheDBMSwillenforcetheseconstraints ExampleofTransaction Here consistencyisbasedonourknowledgeofbanking semantics Ingeneral uptowriteroftransactiontoensuretransactionpreservesconsistencyDBMSprovides limited automaticenforcement viaintegrityconstraintse g balancesmustbe 0 courtesyofJoeHellerstein SchedulingConcurrentTransactions Goal executetransactions T1 T2 Tn andensureaconsistentoutcomeOneoption serial schedule oneafteranother Better allowinterleavingoftransactionactions aslongasoutcomeisequivalenttosomeserialschedule courtesyofJoeHellerstein PossibleEnforcementMethods Optimistic Permitarbitraryinterleaving thencheckequivalencetoserialschedule Pessimistic Transactionssetlocksondataobjects suchthatillegalinterleavingisimpossible StrictTwo Phase 2PL LockingProtocol Itisthemostwidelyusedlockingprotocol Tworules 1 IfatransactionTwantstoread respectively modify adatabaseobject itfirstrequiresashared respectively exclusive lockontheobject 2 Alllocksheldbyatransactionarereleasedwhenthetransactioniscompleted Lockingexample T1 Bill Savings 100 Checking 100T2 Bill swife Print Checking Print Savings T1andT2bothlockSavingsandCheckingobjects IfT1locksSavings Checkingfirst T2mustwait AnOverviewofTransactionProperties ADBMSmustensurefourpropertiesoftransactionstokeepdatabaseconsistentinthefaceofconcurrentexecutionsandsystemcrashes AtomicityConsistencyIsolationDurability SoCalledACIDProperties EnsuringAtomicity DBMSensuresatomicity all or nothingproperty evenifsystemcrashesinthemiddleofaXact i e transaction Idea Keepalog history ofallactionscarriedoutbytheDBMSwhileexecutingasetofXacts Beforeacha
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年手术室腹腔镜下卵巢囊肿切除护理查房记录
- 2025年压电陶瓷元件项目合作计划书
- 湖南省宁乡县第一高级中学2026届化学高一第一学期期中检测试题含解析
- 2025年捆钞机项目发展计划
- 供应链保险知识培训总结
- 福建省长汀第一中学2026届化学高一第一学期期末质量检测模拟试题含解析
- 山东滕州实验高中2026届化学高三上期中调研模拟试题含解析
- 2026届广东省佛山一中化学高一上期中质量检测模拟试题含解析
- 心脑血管疾病的病因
- 供应室FMEA课件教学课件
- 原发性骨质疏松症诊疗指南(2022)解读
- 新概念英语“第一册”单词对照表
- 新生儿早期基本保健(EENC)-新生儿早期基本保健(EENC)概述(儿童保健课件)
- 加油站高处坠落事故现场处置方案
- 比亚迪汉DM-i说明书
- 心肾综合征及其临床处理
- 男性性功能障碍专家讲座
- GB/T 1040.3-2006塑料拉伸性能的测定第3部分:薄膜和薄片的试验条件
- 第37次全国计算机等级考试考务培训-课件
- 新生入学登记表新生入学情况表word模版
- 《高情商沟通》课件
评论
0/150
提交评论