数据库原理课件第一章

PPT
  • 阅读 68 次
  • 下载 0 次
  • 页数 97 页
  • 大小 1.624 MB
  • 2022-12-05 上传
  • 收藏
  • 违规举报
  • © 版权认领
下载文档30.00 元 加入VIP免费下载
此文档由【小橙橙】提供上传,收益归文档提供者,本网站只提供存储服务。若此文档侵犯了您的版权,欢迎进行违规举报版权认领
数据库原理课件第一章
可在后台配置第一页与第二页中间广告代码
数据库原理课件第一章
可在后台配置第二页与第三页中间广告代码
数据库原理课件第一章
可在后台配置第三页与第四页中间广告代码
数据库原理课件第一章
数据库原理课件第一章
还剩10页未读,继续阅读
【这是免费文档,您可以免费阅读】
/ 97
  • 收藏
  • 违规举报
  • © 版权认领
下载文档30.00 元 加入VIP免费下载
文本内容

【文档说明】数据库原理课件第一章.ppt,共(97)页,1.624 MB,由小橙橙上传

转载请保留链接:https://www.ichengzhen.cn/view-92515.html

以下为本文档部分文字说明:

DatabaseSystem-SSD7Spring,2012TanChang-gengSchoolofSoftware,CentralSouthUniversityTCG-CSU1.2DatabaseSystemsReferencesCMUSSD7E-resourceDat

abasesystemconcepts(5thed.)bySilberschatz,Korth,Sudarshan,2005,HigherEducationPress.ISBN7-04-019245-4数据库系统概念(上书中译本),原著:Silb

erschatz,杨冬青译,机械工业出版社,ISBN7-111-19687-2DatabaseSystems–ApracticalApproachtoDesign,Implementation,andManagement(ThomasConno

lly,CarolynBegg,PersonEducationInc.),ISBN7-5053-8784-7Instructor:TanChanggeng.Email:cgtan163QQ:327414529OfferingWorld-LeadingCurriculuminCo

mputerProgramming&SoftwareSystemsDevelopment(SSD)TCG-CSU1.4DatabaseSystemsTwoCertificatesCertificateinC

omputerProgrammingCourses1through5CertificateinSoftwareSystemsDevelopmentCourses1through10SSDCurriculumOverviewTCG-CSU1.5DatabaseSystemsiCarn

egieCurriculum1-5=CertificateinComputerProgramming1-10=CertificateinSoftwareSystemsDevelopment1:Intro

ductiontoInformationSystems2:IntroductiontoComputerSystems3:ObjectOrientedProgrammingandDesign5:DataStructuresandAlgorithms6:Sy

stemLevelProgramming10:SoftwareProjectOrganizationandManagement9:SoftwareSpecification,TestandMaintenance8:NetworksandDistribute

dComputing4:UserCenteredDesignandTesting7:DatabaseSystemsTCG-CSU1.6DatabaseSystemsWhatdoesiCarnegiedo?1

0CourseSequenceRootedintheexpertiseofCarnegieMellonUniversity‘sSchoolofComputerScienceApplied,industry-

orientedskillsSoftwareDevelopmentDisciplineSoftwareDevelopment!=ComputerScienceCStrainsscientists/researchersFocusonTheoryHigh

erMathematicsSoftwareDevelopersarenotresearchersApplied,industryorientedskillsFocusonfoundationalskillsTCG-CSU1.7DatabaseSystemsThepurpo

seofSSD7isforstudentstoBecomefamiliarwithfundamentalDBMSconceptsandwhatadatabasesystemisLearntouseSQL(structuredquerylanguage)Learntod

esigndatabasesystemsLearntodesignandmanagetransaction(事务)LearntoimprovequeryperformanceGainexposuretofuturetrendsi

ndatabasesTCG-CSU1.8DatabaseSystemsStudentssuccessfullycompletingSSD7willbeabletoPRODUCE(cont’d)Databasedesignsthatsupporta

givenapplicationDatamodelsusingE-RdiagramsSoundschemadesignsusingnormalization(使用规范化方法设计出合理的模式)Web-baseddatabaseap

plicationsusingSQLandJSP/ServletsTCG-CSU1.9DatabaseSystemsStudentssuccessfullycompletingSSD7willbeabletoUSEIndexstructuresofaDBMS

toimproveperformanceThetransactionfeaturesofaDBMStoachievefaultrecovery(故障恢复)andconcurrencycontrol(并发控制)Keyrelationaloperationstomanipulatedat

a(操纵数据)SQLDDLtomodeldata,constraints,andviews(视图)SQLDMLtowritecomplexqueriesTCG-CSU1.10DatabaseSystemsStudentswillbeabletoknowledge

ablyDISCUSSThebasicconceptsofobject-relationalandobject-orienteddatabasemanagementsystemsThebasicconceptsandapplicationofdatawarehousi

nganddatamining(datacubes,OLAP)ThebasicfunctionsandapplicationofmultimediadatabasesThebasicissueso

fdatabaseprivacyandsecurityTheDBMSofferingsofthemostimportantvendorsTCG-CSU1.11DatabaseSystemsDatabaseProgDistributedSysOSUIDataStruct&Algorithm

s数据库的地位TCG-CSU1.12DatabaseSystemsTopicsShallbeLearnedIntroductionRelationalModelSQLEntity-Relationship

ModelRelational-DatabaseDesignTransactionsConcurrencyControlRecoverySystem(IntegrityandSecurity)Dat

abaseSystemArchitectures……TCG-CSU1.13DatabaseSystemsChapter1:IntroductionPurposeofDatabaseSystemsView

ofDataDatabaseLanguagesRelationalDatabasesDatabaseDesignObject-basedandsemistructureddatabasesDataStorageandQ

ueryingTransactionManagementDatabaseArchitectureDatabaseUsersandAdministratorsOverallStructureHistoryof

DatabaseSystemsTCG-CSU1.14DatabaseSystems1.1DatabaseManagementSystem(DBMS)DBMScontainsinformationaboutaparticularenterpr

iseCollectionofinterrelateddataSetofprogramstoaccessthedataAnenvironmentthatisbothconvenientandeff

icienttouseDatabaseApplications?Banking:alltransactionsAirlines:reservations,schedulesUniversities:registration,gradesSales:customers,pr

oducts,purchasesOnlineretailers:ordertracking,customizedrecommendationsManufacturing:production,inventory,orders,supplychainHumanre

sources:employeerecords,salaries,taxdeductionsDatabasestouchallaspectsofourlivesTCG-CSU1.15DatabaseSystemsT

heExamplesofDatabaseSystemsPurchasesusingyourcreditcard信用卡AcreditcarddatabaseThecheckoutassistantAcreditcardreaderCheckyo

urcreditAddthepurchasestodatabaseMonthlystatementstoeachcardholderTCG-CSU1.16DatabaseSystems1.2PurposeofDatabaseSystemsIntheearlydays,databasea

pplicationswerebuiltdirectlyontopoffilesystemsDrawbacksofusingfilesystemstostoredata?TCG-CSU1.17DatabaseSystemsLimitationsoft

heFile-BasedApproachDataredundancyandinconsistency数据冗余与非一致性Multiplefileformats,duplicationofinformationindifferentfiles文件格式不

相容,数据冗余Program-datadependence程序依赖于数据NeedtowriteanewprogramtocarryouteachnewtaskDataisolation—multiplefilesandformats数据孤立;文件格式

不相容Integrityproblems完整性问题Integrityconstraints(e.g.accountbalance>0)become―buried‖inprogramcoderatherthanbeingstatedexplicitlyHar

dtoaddnewconstraintsorchangeexistingonesTraditionalFile-BasedSystems文件系统TCG-CSU1.18DatabaseSystemsD

rawbacksofusingfilesystems(cont.)Atomicityofupdates原子更新Failuresmayleavedatabaseinaninconsistentstatewithpartialupdates

carriedoutExample:TransferoffundsfromoneaccounttoanothershouldeithercompleteornothappenatallConcurrentaccessbymultipleusers并发访问C

oncurrentaccessedneededforperformanceUncontrolledconcurrentaccessescanleadtoinconsistencies–Example

:Twopeoplereadingabalanceandupdatingitatthesametime(sellticket)SecurityproblemsHardtoprovideuseraccesstosome,butnotall,dataDatabasesyst

emsoffersolutionstoalltheaboveproblemsTCG-CSU1.19DatabaseSystemsCharacteristicsoftheDatabaseApproach数据库方法Data:dataarerawfac

tsthatdescribepeople,objects,andeventsDatabase:AnintegratedcollectionofrelateddataconstitutesaDatabase(DB).相关数据集成relateddata,thedatarepresents

logicallycoherentfactsaboutsomeaspectsoftherealworldthatarerequiredbyanapplication.Integrated,thedataformultiple

applicationsisstoredtogetherandmanipulatedinauniformwayonasecondarystoragesuchasamagneticoranopticaldisk.TCG-CSU1.20DatabaseSystemsDatabaseMana

gementSystemsADatabaseManagementSystem(DBMS)isacollectionofprogramsthatcontrolsadatabase.General-purposesoftwaresystemDataDefinitionLanguage(D

DL)DataManipulationLanguage(DML)Controlledaccesstothedatabaseasecuritysystem(authorizedusers)安全性anintegritysystem(consistencyofstoreddata)完整性ac

oncurrencycontrolsystem(sharedaccess)并发控制arecoverycontrolsystem(whenH/Sfailure)恢复auser-accessiblecatalog(descriptionsof

data)数据字典TCG-CSU1.21DatabaseSystemsDatabaseSystemaDatabaseSystemconsistsofanapplicationspecificdatabase数据库theDBM

SthatmaintainsthatdatabaseDBMStheapplicationsoftwarethatmanipulatesthedatabase应用程序数据库系统的个体含义是指一个具体的数据库管理系统软件和用它建立起来的数据库;它的学科含义是指研究、开发、建立、维护和应用数据库系统

所涉及的理论、方法、技术所构成的学科。在这一含义下,数据库系统是软件研究领域的一个重要分支,常称为数据库领域。TCG-CSU1.22DatabaseSystemsTCG-CSU1.23DatabaseSys

temsCharacteristicsoftheDatabaseApproachDBMSsembodythethreedistinguishingcharacteristicsofthedatabaseapproach:dataabstraction,re

liability,andefficiency.数据抽象可靠性高效TCG-CSU1.24DatabaseSystemsCharacteristicsoftheDatabaseApproach2DataAbstraction

provideuserswithhigh-level,conceptualrepresentationsofthedata—atableinrelationalDBMSs提供高层、概念的数据表示hidestoragedetailsthatarenotofinterestto

mostdatabaseusers隐藏存储细节program-dataindependence数据独立性TCG-CSU1.25DatabaseSystemsCharacteristicsoftheDatabaseAppr

oach3Reliability.DBMSsprovidehighreliabilityEnforcingintegrityconstraints完整性约束Integrityconstraintsreflectthemeaning(or,thesemantics)o

fthedataandoftheapplicationEnsuringdataconsistencydespitehardwareorsoftwarefailures.数据一致性TansactionsW

ithinanapplicationprogram,oneormorequery-and-updaterequeststotheDBMScanbelogicallygroupedtogetherinordertoperformatas

k.Agroupofsuchrequestsiscalledatransaction.事务Examples:acustomerpayswithacreditcard,withdrawmoneyfromATMTCG-CSU1.26DatabaseSystemsCharacterist

icsoftheDatabaseApproach4Efficiency:DBMSssupportbothefficientspaceutilizationandefficientaccesstodata.Storingeachdataitemonlyonce减

少冗余Enhancingtheperformanceofqueriesbymeansofoptimizationsandtheuseofaccessmethodstodatabasedontheirvalues查询优化

Decreasingresponsetimeoftransactionsbyallowingmultipleuserstoaccessthedatabaseconcurrently并发提高效率TCG-CSU1.27DatabaseSystemsContrastingDatabasea

ndFileSystemsTCG-CSU1.28DatabaseSystemsFile1File2FilenProg1Prog2PrognFileSystemTCG-CSU1.29DatabaseSystemsDatabaseProg1Prog2PrognDBMSTC

G-CSU1.30DatabaseSystems人工管理文件系统数据库系统应用背景科学计算科学计算、管理大规模管理硬件背景无直接存取存储设备磁盘、磁鼓大容量磁盘软件背景没有操作系统有文件系统有数据库管理系统背景处理方式批处理联机实时处理批处理联机实时处理,分布处理批处理数据的管理者人文件系统数据

库管理系统数据面向的对象某一应用程序某一应用程序整个应用系统数据的共享程度无共享,冗余度极大共享性差,冗余度大共享性高,冗余度小数据的独立性不独立,完全依赖于程序独立性差具有高度的物理独立性和逻辑独立性数据的结构化无结构记录内有结构,整体无结构整体结构化,用数据模型描述特点数据控制能力

应用程序自己控制应用程序自己控制由数据库管理系统提供数据安全性、完整性、并发控制和恢复能力Comparethedifferentphasesofdatamanagement(Table1)TCG-CSU1.31Databas

eSystemsWhenIsaDatabaseManagementSystemNeeded?Advantages1ControlofdataredundancyDataconsistencyMo

reinformationfromthesameamountofdataSharingofdataImproveddataintegrityImprovedsecurityEnforcementofstandardsEconomyofscaleTCG-CSU1.32DatabaseSys

temsAdvantages2BalanceofconflictingrequirementsImproveddataaccessibilityandresponsivenessIncreasedproductivityImprovedmaintenancethroughd

ataindependenceIncreasedconcurrencyImprovedbackupandrecoveryservicesTCG-CSU1.33DatabaseSystemsDisadvantagesCo

mplexitySizeCostofDBMSsAdditionalhardwarecostsCostofconversionPerformanceHigherimpactofafailureTCG-CSU1.34DatabaseSystemsWhenI

saDatabaseManagementSystemNotNeeded?Thedatahasasimplestructureanditssizeissmall.Theapplication,althoughsimpleandunchanging,hasasp

ecialpurpose.Concurrentaccesstodatabymultipleusersisnotrequired.TCG-CSU1.35DatabaseSystemsFourConceptsDataDatabaseDBMS(DatabaseManagem

entSystems)DBS(DatabaseSystems)TCG-CSU1.36DatabaseSystemsDatabaseSystemsConceptsData(数据):Dataare

rawfactsthatdescribepeople,objects,andevents.Or数据实际上就是描述事物的符号记录。例如:文字、图形、图象、声音、学生的档案记录等。数据的形式本身并不能完全表达其内容,需要经过语义解释。数据与其

语义是不可分的。Information(信息):一般把信息理解为关于现实世界事物存在方式或运动状态的反映.TCG-CSU1.37DatabaseSystemsDifferencebetweenDataandInformation数据是信息的符号表示或称为载体;

信息则是数据的内涵,是对数据语义的解释;数据表示了信息,而信息只有通过数据形式才能被计算机理解和接受。TCG-CSU1.38DatabaseSystemsDatabaseAnintegratedcolle

ctionofrelateddataconstitutesaDatabase(DB).KeepdatalongtimeLargequantitiesofdataLogicallyrelatedSt

ructureddataShareTCG-CSU1.39DatabaseSystemsDatabaseManagementSystems(DBMS)ADatabaseManagementSystem(DBMS)isacollectionofprogramsthatcontrolsad

atabase.`Itenablesuserstodefine,create,maintain,andcontrolaccesstothedatabase.Wecanuseitnotonlytocreateandma

intainmultipledatabasesbutalsotoimplementdatabasesystemsfordifferentapplications.TCG-CSU1.40DatabaseSystems

DatabaseSystemsAdatabasesystemisdevelopedtosupporttheoperationsofaspecificorganizationoraspecificsetofapplicatio

ns.aDatabaseSystemconsistsof1)Anapplicationspecificdatabase2)TheDBMSthatmaintainsthatdatabase3)Theapplicati

onsoftwarethatmanipulatesthedatabaseThefigure1-4illustratesasimplifieddatabase-systemarchitectureTCG-CSU1.41DatabaseSystemsF

igure1-4database-systemarchitectureTCG-CSU1.42DatabaseSystemsRolesintheDatabaseEnvironmentDataandDatabaseAd

ministrators(DAandDBA)DatabaseDesignersLogicalDatabaseDesignersPhysicalDatabaseDesignersApplicationDevelopersEnd-Users

NaïveusersSophisticatedusersTCG-CSU1.43DatabaseSystems1.3DatabaseArchitectureThearchitectureofadatabasesystemsisgreatlyinfluencedbytheunderlyingcomp

utersystemonwhichthedatabaseisrunning:CentralizedClient-serverParallel(multi-processor)DistributedTCG

-CSU1.44DatabaseSystems1.4DatabaseUsersUsersaredifferentiatedbythewaytheyexpecttointeractwiththesystemApplicationprogrammers–interactwithsystemthrou

ghDMLcallsSophisticatedusers–formrequestsinadatabasequerylanguageSpecializedusers–writespecializeddatabaseapplicationsthatdonotfitin

tothetraditionaldataprocessingframeworkNaïveusers–invokeoneofthepermanentapplicationprogramsthathavebeenwrittenpreviouslyExamples,pe

opleaccessingdatabaseovertheweb,banktellers,clericalstaffTCG-CSU1.45DatabaseSystems1.5DatabaseAdministratorCoordinatesalltheactivitiesof

thedatabasesystem;thedatabaseadministratorhasagoodunderstandingoftheenterprise‘sinformationresourcesandneeds.Databaseadminist

rator'sdutiesinclude:Schemadefinition模式定义StoragestructureandaccessmethoddefinitionSchemaandphysicalorganizationmodificationGrantinguser

authoritytoaccessthedatabaseSpecifyingintegrityconstraintsActingasliaisonwithusersMonitoringperformanceandrespondingtochangesin

requirementsTCG-CSU1.46DatabaseSystemsOverallSystemStructureTCG-CSU1.47DatabaseSystems1.6Three-LevelArchitectureDBAshouldbeabletochangedatabasest

oragestructureswithoutaffectingtheusers’views.Internalstructureofdatabaseshouldbeunaffectedbychangestophysicalaspectsofstorage.DBAshouldbeab

letochangeconceptualstructureofdatabasewithoutaffectingallusers.Objectives:TCG-CSU1.48DatabaseSystemsANSI-SPARCThree-LevelArchitectureTCG-CSU1.49Da

tabaseSystemsANSI-SPARCThree-LevelArchitectureExternalLevel外部层Users’viewofthedatabase.用户视图Describesthatpartofdatabasethatisrelevanttoapar

ticularuser.ConceptualLevel概念层Communityviewofthedatabase.总体视图Describeswhatdataisstoredindatabaseandrelationshipsamongthedata.InternalLeve

l内部层Physicalrepresentationofthedatabaseonthecomputer.Describeshowthedataisstoredinthedatabase.TCG-CSU1.50DatabaseSystemsDifferencesbetweenTh

reeLevelsofANSI-SPARCArchitectureTCG-CSU1.51DatabaseSystems1.6.1DataIndependence数据依赖LogicalDataIndependenceRefer

stoimmunityofexternalschemastochangesinconceptualschema.概念模式变化不会影响外模式Conceptualschemachanges(e.g.addition/removalofentitie

s).Shouldnotrequirechangestoexternalschemaorrewritesofapplicationprograms.PhysicalDataIndependenceReferstoimmunityofconceptualschem

atochangesintheinternalschema.Internalschemachanges(e.g.usingdifferentfileorganizations,storagestructures/devices).Shouldno

trequirechangetoconceptualorexternalschemas.TCG-CSU1.52DatabaseSystemsDataIndependenceandtheANSI-SPARCThree-Leve

lArchitectureTCG-CSU1.53DatabaseSystemsViewofDataAnarchitectureforadatabasesystemTCG-CSU1.54DatabaseSystems现实世界Concep

tualmodel转换internalmodelabstractView1View2abstractFigure1-5threedatamodelsTCG-CSU1.55DatabaseSystemsLevelsofAbstractionPhysicallevel:describesh

owarecord(e.g.,customer)isstored.typecustomer=recordcustomer_id:string;customer_name:string;customer_street:string;customer_city:integer;end;Logic

allevel:describesdatastoredindatabase,andtherelationshipsamongthedata.Viewlevel:applicationprogramshidedetailsofdatatypes.Viewscan

alsohideinformation(suchasanemployee‘ssalary)forsecuritypurposes.TCG-CSU1.56DatabaseSystemsInstancesandSchemasSimilartovariab

lesandtypesinprogramminglanguagesSchema–thelogicalstructureofthedatabaseExample:Thedatabaseconsistsofinformationabouta

setofcustomersandaccountsandtherelationshipbetweenthem)AnalogoustotypeinformationofavariableinaprogramPhysicalschema:data

basedesignatthephysicallevelLogicalschema:databasedesignatthelogicallevelInstance–theactualcontentofthedata

baseataparticularpointintimeAnalogoustothevalueofavariableTCG-CSU1.57DatabaseSystemsInstancesandSchemasPhys

icalDataIndependence–theabilitytomodifythephysicalschemawithoutchangingthelogicalschemaApplicationsdependonthelogicalschemaIngeneral,theinte

rfacesbetweenthevariouslevelsandcomponentsshouldbewelldefinedsothatchangesinsomepartsdonotseriouslyinfluenceothers.TCG-CSU

1.58DatabaseSystems1.7DataModelsAcollectionoftoolsfordescribingDataDatarelationshipsDatasemanticsDataconstraints描述数

据、数据间联系、数据语义以及约束的概念工具的集合Adatamodelcanbethoughtofascomprisingthreecomponents:数据模型由三部分组成:DatastructureDatamanipu

lationConstraintsofdataintegrityTCG-CSU1.59DatabaseSystemsDataModelsDataModel:Relationalmodel(Table)Entity-Relationshipdatamodel(mainly

fordatabasedesign)Object-baseddatamodels(Object-orientedandObject-relational)Semistructureddatamod

el(XML)Otheroldermodels:NetworkmodelHierarchicalmodelTCG-CSU1.60DatabaseSystems1.8DataManipulationLanguage(DML)Languagefor

accessingandmanipulatingthedataorganizedbytheappropriatedatamodelDMLalsoknownasquerylanguageTwoclassesoflanguagesProcedural过程式–use

rspecifieswhatdataisrequiredandhowtogetthosedataDeclarative声明式(nonprocedural)–userspecifieswhatdataisre

quiredwithoutspecifyinghowtogetthosedataSQListhemostwidelyusedquerylanguageTCG-CSU1.61DatabaseSystemsDataDefinitionLan

guage(DDL)SpecificationnotationfordefiningthedatabaseschemaExample:createtableaccount(account-numberchar(10),bala

nceinteger)DDLcompilergeneratesasetoftablesstoredinadatadictionaryDatadictionarycontainsmetadata(i.e.,dataaboutdata)Databasesch

emaDatastorageanddefinitionlanguageSpecifiesthestoragestructureandaccessmethodsusedIntegrityconstraintsDom

ainconstraintsReferentialintegrity(referencesconstraintinSQL)AssertionsAuthorizationTCG-CSU1.62DatabaseSystemsRelatio

nalModelExampleoftabulardataintherelationalmodelAttributesTCG-CSU1.63DatabaseSystemsASampleRelationalDatabaseTCG-CSU1.64DatabaseSystems1.9SQ

LSQL:widelyusednon-procedurallanguageExample:Findthenameofthecustomerwithcustomer-id192-83-7465selectcustomer

.customer_namefromcustomerwherecustomer.customer_id=‗192-83-7465‘Example:Findthebalancesofallaccoun

tsheldbythecustomerwithcustomer-id192-83-7465selectaccount.balancefromdepositor,accountwheredepositor.customer_id=‗192-83-

7465‘anddepositor.account_number=account.account_numberTCG-CSU1.65DatabaseSystemsApplicationprogramsgenerallyaccessdatabasesthroughoneofLanguageext

ensionstoallowembeddedSQLApplicationprograminterface(e.g.,ODBC/JDBC)whichallowSQLqueriestobesenttoadatabaseTCG-CSU1.66DatabaseSy

stems1.10DatabaseDesignTheprocessofdesigningthegeneralstructureofthedatabase:LogicalDesign–Decidingonthedatabaseschema(acollectionofrelationsc

hemas).Databasedesignrequiresthatwefinda“good”collectionofrelationschemas.Businessdecision–Whatattributesshouldwer

ecordinthedatabase?ComputerSciencedecision–Whatrelationschemasshouldwehaveandhowshouldtheattributesbedistributedamongthevariousrel

ationschemas?PhysicalDesign–DecidingonthephysicallayoutofthedatabaseTCG-CSU1.67DatabaseSystemsTheEntity-RelationshipModelModelsanenterprise

asacollectionofentitiesandrelationships一单位建模为实体与联系的集合Entity:a―thing‖or―object‖intheenterprisethatisdistinguishablefromotherobjects

DescribedbyasetofattributesRelationship:anassociationamongseveralentitiesRepresenteddiagrammaticallybyanentity

-relationshipdiagram:TCG-CSU1.68DatabaseSystemsObject-RelationalDataModelsExtendtherelationaldatamodelbyincludingobjectorientatio

nandconstructstodealwithaddeddatatypes.Allowattributesoftuplestohavecomplextypes,includingnon-atomicvaluessuchasnestedrelations.Preserve

relationalfoundations,inparticularthedeclarativeaccesstodata,whileextendingmodelingpower.Provideupwar

dcompatibilitywithexistingrelationallanguages.TCG-CSU1.69DatabaseSystemsXML:ExtensibleMarkupLanguageDefinedbytheWWWConsorti

um(W3C)OriginallyintendedasadocumentmarkuplanguagenotadatabaselanguageTheabilitytospecifynewtags,andtocreatenestedtagstructuresmadeXMLagr

eatwaytoexchangedata,notjustdocumentsXMLhasbecomethebasisforallnewgenerationdatainterchangeformats.Awidevarietyoftoolsisavai

lableforparsing,browsingandqueryingXMLdocuments/dataTCG-CSU1.70DatabaseSystems1.11StorageManagementSt

oragemanagerisaprogrammodulethatprovidestheinterfacebetweenthelow-leveldatastoredinthedatabaseandtheapplicationprogramsandqueriessubmit

tedtothesystem.Thestoragemanagerisresponsibletothefollowingtasks:InteractionwiththefilemanagerEfficientstoring,retrievin

gandupdatingofdataIssues:StorageaccessFileorganizationIndexingandhashingTCG-CSU1.71DatabaseSystems1.12QueryProcessing1.Parsingandtranslat

ion语法分析与转换2.Optimization优化3.Evaluation评价TCG-CSU1.72DatabaseSystemsQueryProcessing(Cont.)AlternativewaysofevaluatingagivenqueryEquiva

lentexpressionsDifferentalgorithmsforeachoperationCostdifferencebetweenagoodandabadwayofevaluatingaq

uerycanbeenormousNeedtoestimatethecostofoperationsDependscriticallyonstatisticalinformationaboutrelation

swhichthedatabasemustmaintainNeedtoestimatestatisticsforintermediateresultstocomputecostofcomplexexpressionsTCG-CSU1.73DatabaseS

ystems1.12TransactionManagementAtransactionisacollectionofoperationsthatperformsasinglelogicalfunctioninadatabaseapplication

Withinanapplicationprogram,oneormorequery-and-updaterequeststotheDBMScanbelogicallygroupedtogetherinordertop

erformatask.Agroupofsuchrequestsiscalledatransaction.Examples:acustomerpayswithacreditcard,withdrawmoneyfromATMTransaction-managementcom

ponentensuresthatthedatabaseremainsinaconsistent(correct)statedespitesystemfailures(e.g.,powerfailuresan

doperatingsystemcrashes)andtransactionfailures.Concurrency-controlmanagercontrolstheinteractionamongtheconcurrenttransactions,toensuretheconsisten

cyofthedatabase.TCG-CSU1.74DatabaseSystemsTheDatabaseSystemEnvironmentDatabasesystemiscomposedof5mainparts:1.Hardware2.SoftwareOperatingsystemsoftw

areDBMSsoftwareApplicationprogramsandutilitysoftware3.People4.Procedures5.DataTCG-CSU1.75DatabaseSystemsTheDatabaseSystemEnvironment(con

tinued)TCG-CSU1.76DatabaseSystemsComponentsofaDBMSTCG-CSU1.77DatabaseSystemsComponentsofDatabaseManager(DM)

TCG-CSU1.78DatabaseSystemsMulti-UserDBMSArchitecturesTeleprocessingFile-serverClient-serverTCG-CS

U1.79DatabaseSystemsTeleprocessingTraditionalarchitecture.Singlemainframewithanumberofterminalsattached.Trendisnowtowardsdownsizi

ng.TCG-CSU1.80DatabaseSystemsTeleprocessingTopologyTCG-CSU1.81DatabaseSystemsFile-ServerFile-serverisconnectedto

severalworkstationsacrossanetwork.Databaseresidesonfile-server.DBMSandapplicationsrunoneachworkstatio

n.Disadvantagesinclude:Significantnetworktraffic.CopyofDBMSoneachworkstation.Concurrency,recoveryandintegritycontrolmorec

omplex.TCG-CSU1.82DatabaseSystemsFile-ServerArchitectureTCG-CSU1.83DatabaseSystemsClient-ServerServerholdsthedatabaseandtheDBMS.Clientmanagesus

erinterfaceandrunsapplications.Advantagesinclude:wideraccesstoexistingdatabases;increasedperforman

ce;possiblereductioninhardwarecosts;reductionincommunicationcosts;increasedconsistency.TCG-CSU1.84Datab

aseSystemsClient-ServerArchitectureTCG-CSU1.85DatabaseSystemsAlternativeClient-ServerTopologiesTCG-CSU1.86DatabaseSystemsHistoryofDatabaseSystems

1950sandearly1960s:DataprocessingusingmagnetictapesforstorageTapesprovideonlysequentialaccessPunchedcardsforinputLate1960san

d1970s:HarddisksallowdirectaccesstodataHierarchical(IMS)andNetwork(IDS、DBTG)datamodelsinwidespreaduse(1G)TedCodddefinestherelati

onaldatamodelWouldwintheACMTuringAwardforthisworkIBMResearchbeginsSystemRprototypeUCBerkeleybeginsIngresprototypeHigh

-performance(fortheera)transactionprocessingTCG-CSU1.87DatabaseSystemsHistory(cont.)1980s:Researchrelationalprototyp

esevolveintocommercialsystems(2G)SQLbecomesindustrialstandardParallelanddistributeddatabasesystemsObj

ect-orienteddatabasesystems(3G)1990s:Largedecisionsupportanddata-miningapplicationsLargemulti-terabytedatawarehou

sesEmergenceofWebcommerce2000s:XMLandXQuerystandardsAutomateddatabaseadministrationEndofChapter1TCG-CSU1.89DatabaseSystemsFigure1.4TCG-CSU1.90Da

tabaseSystemsFigure1.7TCG-CSU1.91DatabaseSystemsDatabase(con’t)人们收集并抽取出一个应用所需要的大量数据之后,应将其保存起来以供进一步加工处理,进一步抽取有用信息Def.ofDBAnintegratedcollecti

onofrelateddataconstitutesaDatabase(DB).是长期储存在计算机内、有组织的、可共享的大量数据集合TCG-CSU1.92DatabaseSystems二、数据库(续)数据库的特征数据按一定的数据模型组

织、描述和储存可为各种用户共享冗余度较小数据独立性较高易扩展TCG-CSU1.93DatabaseSystems三、数据库管理系统DBMSAcollectionofprogramsthatcontrolsadatabase.Specific

ally,itprovidesuswithaninterfacetocreate,maintain,andmanipulatemultipledatabases.Forgeneral-purpose,是位于用户与操作系统之间的一层数据管理软件。DBMS

的用途科学地组织和存储数据、高效地获取和维护数据TCG-CSU1.94DatabaseSystemsDBMS的主要功能数据定义功能提供数据定义语言(DDL)定义数据库中的数据对象数据操纵功能:提供数据操纵语言(DML)操纵数据实现对数据库的基本操作(查询、插入、删除和修改)T

CG-CSU1.95DatabaseSystemsDBMS的主要功能数据库的运行管理保证数据的安全性、完整性、多用户对数据的并发使用发生故障后的系统恢复数据库的建立和维护功能(实用程序)数据库数据批量装载数据库转储介

质故障恢复数据库的重组织性能监视等TCG-CSU1.96DatabaseSystems四、数据库系统DatabaseSystem:Bedevelopedtosupporttheoperationsofaspecificorganizationoraspecificsetofapplicati

ons.Consistsof1)anapplicationspecificdatabase,2)theDBMSthatmaintainsthatdatabase,and3)theapplicationsoftwarethatmanipulatesthedataba

se.(数据库系统(,简称DBS)是指在计算机系统中引入数据库后的系统构成。在不引起混淆的情况下常常把数据库系统简称为数据库。)数据库系统的构成由数据库、数据库管理系统(及其开发工具)、应用系统、数据库管理员(和用户)构成。TCG-CSU1.97DatabaseSystem

sInstructor:谭长庚.(cgtan163)Textbook:Database–systemconcepts(5thed.)bySilberschatz,Korth,Sudarshan,2005FundamentalsofDatabaseSyst

ems(4thed.)byElmasri&Navathe,2019Lecturestime:Tue.Am8:00-9:40,15:55-17:30,location:CA-502,CB-402time:Fir.Am8:00-9:40,10:00-11:40location:CB-4

02Gradingfinal(70%),others(30%),6(1per2~3weeks)homework1programminghwatmost!

小橙橙
小橙橙
文档分享,欢迎浏览!
  • 文档 25747
  • 被下载 7
  • 被收藏 0
相关资源
广告代码123
若发现您的权益受到侵害,请立即联系客服,我们会尽快为您处理。侵权客服QQ:395972555 (支持时间:9:00-21:00) 公众号
Powered by 太赞文库
×
确认删除?