数据库原理课件第一章

PPT
  • 阅读 100 次
  • 下载 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.2DatabaseSy

stemsReferencesCMUSSD7E-resourceDatabasesystemconcepts(5thed.)bySilberschatz,Korth,Sudarshan,2005,HigherEducationPress.ISBN7-04-019245-4数据

库系统概念(上书中译本),原著:Silberschatz,杨冬青译,机械工业出版社,ISBN7-111-19687-2DatabaseSystems–ApracticalApproachtoDesign,Implementation,andMan

agement(ThomasConnolly,CarolynBegg,PersonEducationInc.),ISBN7-5053-8784-7Instructor:TanChanggeng.Email:cgtan163Q

Q:327414529OfferingWorld-LeadingCurriculuminComputerProgramming&SoftwareSystemsDevelopment(SSD)TCG-C

SU1.4DatabaseSystemsTwoCertificatesCertificateinComputerProgrammingCourses1through5CertificateinSoftware

SystemsDevelopmentCourses1through10SSDCurriculumOverviewTCG-CSU1.5DatabaseSystemsiCarnegieCurriculu

m1-5=CertificateinComputerProgramming1-10=CertificateinSoftwareSystemsDevelopment1:IntroductiontoInformationSystems2:IntroductiontoComputerSystems

3:ObjectOrientedProgrammingandDesign5:DataStructuresandAlgorithms6:SystemLevelProgramming10:SoftwareProjectOrganizationandManagement9:S

oftwareSpecification,TestandMaintenance8:NetworksandDistributedComputing4:UserCenteredDesignandTesting7:DatabaseSystemsTCG-

CSU1.6DatabaseSystemsWhatdoesiCarnegiedo?10CourseSequenceRootedintheexpertiseofCarnegieMellonUniversity‘sSchoolofComputerScienceAp

plied,industry-orientedskillsSoftwareDevelopmentDisciplineSoftwareDevelopment!=ComputerScienceCStrain

sscientists/researchersFocusonTheoryHigherMathematicsSoftwareDevelopersarenotresearchersApplied,industryorientedskillsFocusonfoundat

ionalskillsTCG-CSU1.7DatabaseSystemsThepurposeofSSD7isforstudentstoBecomefamiliarwithfundamentalDBMSconceptsandwhatadatabasesystemisLearntouseSQL(s

tructuredquerylanguage)LearntodesigndatabasesystemsLearntodesignandmanagetransaction(事务)LearntoimprovequeryperformanceGainexposuretofutu

retrendsindatabasesTCG-CSU1.8DatabaseSystemsStudentssuccessfullycompletingSSD7willbeabletoPRODUCE(cont’d)Databased

esignsthatsupportagivenapplicationDatamodelsusingE-RdiagramsSoundschemadesignsusingnormalization(使用规范化方法设

计出合理的模式)Web-baseddatabaseapplicationsusingSQLandJSP/ServletsTCG-CSU1.9DatabaseSystemsStudentssuccessfullycompletingSSD7willbeable

toUSEIndexstructuresofaDBMStoimproveperformanceThetransactionfeaturesofaDBMStoachievefaultrecovery(故

障恢复)andconcurrencycontrol(并发控制)Keyrelationaloperationstomanipulatedata(操纵数据)SQLDDLtomodeldata,constrain

ts,andviews(视图)SQLDMLtowritecomplexqueriesTCG-CSU1.10DatabaseSystemsStudentswillbeabletoknowledgeablyDISCUSSThebasicconceptsofobject-rel

ationalandobject-orienteddatabasemanagementsystemsThebasicconceptsandapplicationofdatawarehousinganddatamining(datacube

s,OLAP)ThebasicfunctionsandapplicationofmultimediadatabasesThebasicissuesofdatabaseprivacyandsecurityTheDBMSofferingsofthemostimportantvendor

sTCG-CSU1.11DatabaseSystemsDatabaseProgDistributedSysOSUIDataStruct&Algorithms数据库的地位TCG-CSU1.12DatabaseSystemsTopicsShallbeL

earnedIntroductionRelationalModelSQLEntity-RelationshipModelRelational-DatabaseDesignTransactionsConcurren

cyControlRecoverySystem(IntegrityandSecurity)DatabaseSystemArchitectures……TCG-CSU1.13DatabaseSystemsChapter1:IntroductionP

urposeofDatabaseSystemsViewofDataDatabaseLanguagesRelationalDatabasesDatabaseDesignObject-basedandsemistructureddatabasesDataStorageandQu

eryingTransactionManagementDatabaseArchitectureDatabaseUsersandAdministratorsOverallStructureHistoryofDatabaseSystemsTCG-CSU1.

14DatabaseSystems1.1DatabaseManagementSystem(DBMS)DBMScontainsinformationaboutaparticularenterpriseCollection

ofinterrelateddataSetofprogramstoaccessthedataAnenvironmentthatisbothconvenientandefficienttouseDatabaseAppli

cations?Banking:alltransactionsAirlines:reservations,schedulesUniversities:registration,gradesSales:customers,products,purchasesOnli

neretailers:ordertracking,customizedrecommendationsManufacturing:production,inventory,orders,supplychainHumanresou

rces:employeerecords,salaries,taxdeductionsDatabasestouchallaspectsofourlivesTCG-CSU1.15DatabaseSystemsTheExamplesofDatabaseSystemsPu

rchasesusingyourcreditcard信用卡AcreditcarddatabaseThecheckoutassistantAcreditcardreaderCheckyourcreditAddthepurc

hasestodatabaseMonthlystatementstoeachcardholderTCG-CSU1.16DatabaseSystems1.2PurposeofDatabaseSystemsIntheearlydays,databaseapplication

swerebuiltdirectlyontopoffilesystemsDrawbacksofusingfilesystemstostoredata?TCG-CSU1.17DatabaseSystemsLimitationsoftheFile-BasedApproachDatar

edundancyandinconsistency数据冗余与非一致性Multiplefileformats,duplicationofinformationindifferentfiles文件格式不相容,数据冗余Program-datadependence程序依赖于数据Ne

edtowriteanewprogramtocarryouteachnewtaskDataisolation—multiplefilesandformats数据孤立;文件格式不相容Integrityproblems完整性问题Integrityconstraints(e.

g.accountbalance>0)become―buried‖inprogramcoderatherthanbeingstatedexplicitlyHardtoaddnewconstraintsorchan

geexistingonesTraditionalFile-BasedSystems文件系统TCG-CSU1.18DatabaseSystemsDrawbacksofusingfilesystems(cont.)At

omicityofupdates原子更新FailuresmayleavedatabaseinaninconsistentstatewithpartialupdatescarriedoutExample

:TransferoffundsfromoneaccounttoanothershouldeithercompleteornothappenatallConcurrentaccessbymultipleusers并发访问Concurr

entaccessedneededforperformanceUncontrolledconcurrentaccessescanleadtoinconsistencies–Example:Twopeoplereadingabalanceandupdatingitatthesame

time(sellticket)SecurityproblemsHardtoprovideuseraccesstosome,butnotall,dataDatabasesystemsoffersolutionstoalltheab

oveproblemsTCG-CSU1.19DatabaseSystemsCharacteristicsoftheDatabaseApproach数据库方法Data:dataarerawfactsthatdescribepeopl

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

resentslogicallycoherentfactsaboutsomeaspectsoftherealworldthatarerequiredbyanapplication.Integrated,thedataformult

ipleapplicationsisstoredtogetherandmanipulatedinauniformwayonasecondarystoragesuchasamagneticoranopticaldisk.TCG-CSU1.20Databa

seSystemsDatabaseManagementSystemsADatabaseManagementSystem(DBMS)isacollectionofprogramsthatcontrolsadatabase.General

-purposesoftwaresystemDataDefinitionLanguage(DDL)DataManipulationLanguage(DML)Controlledaccesstothedatabaseasecuritysystem(authorizedusers)安

全性anintegritysystem(consistencyofstoreddata)完整性aconcurrencycontrolsystem(sharedaccess)并发控制arecoverycontrolsystem(whenH/Sfai

lure)恢复auser-accessiblecatalog(descriptionsofdata)数据字典TCG-CSU1.21DatabaseSystemsDatabaseSystemaDatabaseSystemconsistsofanapplicationspe

cificdatabase数据库theDBMSthatmaintainsthatdatabaseDBMStheapplicationsoftwarethatmanipulatesthedatabase应用程序数据库系统的个体含义是指一个具体的数据库管理系统软件和用它建立起来的

数据库;它的学科含义是指研究、开发、建立、维护和应用数据库系统所涉及的理论、方法、技术所构成的学科。在这一含义下,数据库系统是软件研究领域的一个重要分支,常称为数据库领域。TCG-CSU1.22DatabaseSystemsTCG-CSU1.23DatabaseS

ystemsCharacteristicsoftheDatabaseApproachDBMSsembodythethreedistinguishingcharacteristicsofthedatabaseapproach:dataa

bstraction,reliability,andefficiency.数据抽象可靠性高效TCG-CSU1.24DatabaseSystemsCharacteristicsoftheDatabaseAppr

oach2DataAbstractionprovideuserswithhigh-level,conceptualrepresentationsofthedata—atableinrelationalDBMSs提供

高层、概念的数据表示hidestoragedetailsthatarenotofinteresttomostdatabaseusers隐藏存储细节program-dataindependence数据独立性TCG-CSU1.25DatabaseSystemsCharacteristicsofth

eDatabaseApproach3Reliability.DBMSsprovidehighreliabilityEnforcingintegrityconstraints完整性约束Integrityconstraintsreflectthemeaning(or,theseman

tics)ofthedataandoftheapplicationEnsuringdataconsistencydespitehardwareorsoftwarefailures.数据一致性TansactionsWithinanapplicationprogram,on

eormorequery-and-updaterequeststotheDBMScanbelogicallygroupedtogetherinordertoperformatask.Agroupofsuchrequ

estsiscalledatransaction.事务Examples:acustomerpayswithacreditcard,withdrawmoneyfromATMTCG-CSU1.26DatabaseSystemsCharacte

risticsoftheDatabaseApproach4Efficiency:DBMSssupportbothefficientspaceutilizationandefficientaccesstodata.Storingeachda

taitemonlyonce减少冗余Enhancingtheperformanceofqueriesbymeansofoptimizationsandtheuseofaccessmethodstodatabasedontheirvalues查询优化Decreasingresponsetim

eoftransactionsbyallowingmultipleuserstoaccessthedatabaseconcurrently并发提高效率TCG-CSU1.27DatabaseSystemsContrastingDatabaseandFileSystemsTCG-CS

U1.28DatabaseSystemsFile1File2FilenProg1Prog2PrognFileSystemTCG-CSU1.29DatabaseSystemsDatabaseProg1Prog2PrognDBMSTCG-CSU1.30Databa

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

联机实时处理,分布处理批处理数据的管理者人文件系统数据库管理系统数据面向的对象某一应用程序某一应用程序整个应用系统数据的共享程度无共享,冗余度极大共享性差,冗余度大共享性高,冗余度小数据的独立性不独立,完全依赖于程序独立性差具

有高度的物理独立性和逻辑独立性数据的结构化无结构记录内有结构,整体无结构整体结构化,用数据模型描述特点数据控制能力应用程序自己控制应用程序自己控制由数据库管理系统提供数据安全性、完整性、并发控制和恢复能力Comparethedi

fferentphasesofdatamanagement(Table1)TCG-CSU1.31DatabaseSystemsWhenIsaDatabaseManagementSystemNeeded?Advantages1Cont

rolofdataredundancyDataconsistencyMoreinformationfromthesameamountofdataSharingofdataImproveddataintegrityImpro

vedsecurityEnforcementofstandardsEconomyofscaleTCG-CSU1.32DatabaseSystemsAdvantages2BalanceofconflictingrequirementsImproveddataaccessibilityan

dresponsivenessIncreasedproductivityImprovedmaintenancethroughdataindependenceIncreasedconcurrencyImpro

vedbackupandrecoveryservicesTCG-CSU1.33DatabaseSystemsDisadvantagesComplexitySizeCostofDBMSsAdditionalhardwarecostsCo

stofconversionPerformanceHigherimpactofafailureTCG-CSU1.34DatabaseSystemsWhenIsaDatabaseManagementSystemNotNeeded?Thedatahasasimplest

ructureanditssizeissmall.Theapplication,althoughsimpleandunchanging,hasaspecialpurpose.Concurrentaccesstodatabymultipleusersisnotrequired.TCG-CSU1

.35DatabaseSystemsFourConceptsDataDatabaseDBMS(DatabaseManagementSystems)DBS(DatabaseSystems)TCG-CSU1.36DatabaseSystemsDatabaseSystemsCon

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

解释。数据与其语义是不可分的。Information(信息):一般把信息理解为关于现实世界事物存在方式或运动状态的反映.TCG-CSU1.37DatabaseSystemsDifferencebetweenDataandInform

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

taconstitutesaDatabase(DB).KeepdatalongtimeLargequantitiesofdataLogicallyrelatedStructureddataShareTCG-CSU1.39DatabaseSystemsDatabaseMan

agementSystems(DBMS)ADatabaseManagementSystem(DBMS)isacollectionofprogramsthatcontrolsadatabase.`Itenablesuserstode

fine,create,maintain,andcontrolaccesstothedatabase.Wecanuseitnotonlytocreateandmaintainmultipledatabasesbutalsotoimplem

entdatabasesystemsfordifferentapplications.TCG-CSU1.40DatabaseSystemsDatabaseSystemsAdatabasesystemisdevelopedtosupporttheop

erationsofaspecificorganizationoraspecificsetofapplications.aDatabaseSystemconsistsof1)Anapplicationspecificdatabase2)TheDB

MSthatmaintainsthatdatabase3)TheapplicationsoftwarethatmanipulatesthedatabaseThefigure1-4illustratesasimplifieddatabase-systemarchi

tectureTCG-CSU1.41DatabaseSystemsFigure1-4database-systemarchitectureTCG-CSU1.42DatabaseSystemsRolesintheDatabaseEnvironm

entDataandDatabaseAdministrators(DAandDBA)DatabaseDesignersLogicalDatabaseDesignersPhysicalDatabaseDesignersApplicationDeveloper

sEnd-UsersNaïveusersSophisticatedusersTCG-CSU1.43DatabaseSystems1.3DatabaseArchitectureThearchitectureofadataba

sesystemsisgreatlyinfluencedbytheunderlyingcomputersystemonwhichthedatabaseisrunning:CentralizedClient-serverPa

rallel(multi-processor)DistributedTCG-CSU1.44DatabaseSystems1.4DatabaseUsersUsersaredifferentiatedbythewaytheyexpecttointer

actwiththesystemApplicationprogrammers–interactwithsystemthroughDMLcallsSophisticatedusers–formrequestsinadatabasequ

erylanguageSpecializedusers–writespecializeddatabaseapplicationsthatdonotfitintothetraditionaldataprocess

ingframeworkNaïveusers–invokeoneofthepermanentapplicationprogramsthathavebeenwrittenpreviouslyExamples,peopleaccessing

databaseovertheweb,banktellers,clericalstaffTCG-CSU1.45DatabaseSystems1.5DatabaseAdministratorCoordina

tesalltheactivitiesofthedatabasesystem;thedatabaseadministratorhasagoodunderstandingoftheenterprise‘sinformationresourcesandneeds.Data

baseadministrator'sdutiesinclude:Schemadefinition模式定义StoragestructureandaccessmethoddefinitionSchemaandphysicalorganizationmodificationGr

antinguserauthoritytoaccessthedatabaseSpecifyingintegrityconstraintsActingasliaisonwithusersMonitoringperformanceandrespondingtochangesi

nrequirementsTCG-CSU1.46DatabaseSystemsOverallSystemStructureTCG-CSU1.47DatabaseSystems1.6Three-LevelArchitectureDBAshouldbe

abletochangedatabasestoragestructureswithoutaffectingtheusers’views.Internalstructureofdatabaseshouldbeunaffectedbychangestophysical

aspectsofstorage.DBAshouldbeabletochangeconceptualstructureofdatabasewithoutaffectingallusers.Objectives:TCG-CSU1.48DatabaseSystemsANSI-SPARCThre

e-LevelArchitectureTCG-CSU1.49DatabaseSystemsANSI-SPARCThree-LevelArchitectureExternalLevel外部层Users’viewofthedataba

se.用户视图Describesthatpartofdatabasethatisrelevanttoaparticularuser.ConceptualLevel概念层Communityviewofth

edatabase.总体视图Describeswhatdataisstoredindatabaseandrelationshipsamongthedata.InternalLevel内部层Physi

calrepresentationofthedatabaseonthecomputer.Describeshowthedataisstoredinthedatabase.TCG-CSU1.50DatabaseSystemsDifferencesbe

tweenThreeLevelsofANSI-SPARCArchitectureTCG-CSU1.51DatabaseSystems1.6.1DataIndependence数据依赖LogicalDataIndependenceReferstoimmunityofexternalschema

stochangesinconceptualschema.概念模式变化不会影响外模式Conceptualschemachanges(e.g.addition/removalofentities).Shouldnotrequirechan

gestoexternalschemaorrewritesofapplicationprograms.PhysicalDataIndependenceReferstoimmunityofconceptualschematochangesintheinternalsche

ma.Internalschemachanges(e.g.usingdifferentfileorganizations,storagestructures/devices).Shouldnotrequirechan

getoconceptualorexternalschemas.TCG-CSU1.52DatabaseSystemsDataIndependenceandtheANSI-SPARCThree-Level

ArchitectureTCG-CSU1.53DatabaseSystemsViewofDataAnarchitectureforadatabasesystemTCG-CSU1.54DatabaseSyste

ms现实世界Conceptualmodel转换internalmodelabstractView1View2abstractFigure1-5threedatamodelsTCG-CSU1.55DatabaseSystemsLevelsofAbstractionPhysicallevel:des

cribeshowarecord(e.g.,customer)isstored.typecustomer=recordcustomer_id:string;customer_name:string;customer_street:s

tring;customer_city:integer;end;Logicallevel:describesdatastoredindatabase,andtherelationshipsamongthedata.Viewlev

el:applicationprogramshidedetailsofdatatypes.Viewscanalsohideinformation(suchasanemployee‘ssalary)forsecuritypurposes.TCG-CSU1

.56DatabaseSystemsInstancesandSchemasSimilartovariablesandtypesinprogramminglanguagesSchema–thelogicalstructureof

thedatabaseExample:Thedatabaseconsistsofinformationaboutasetofcustomersandaccountsandtherelationshipbetweenthem)Analogoustot

ypeinformationofavariableinaprogramPhysicalschema:databasedesignatthephysicallevelLogicalschema:databa

sedesignatthelogicallevelInstance–theactualcontentofthedatabaseataparticularpointintimeAnalogoustothevalueofa

variableTCG-CSU1.57DatabaseSystemsInstancesandSchemasPhysicalDataIndependence–theabilitytomodifythephys

icalschemawithoutchangingthelogicalschemaApplicationsdependonthelogicalschemaIngeneral,theinterfacesb

etweenthevariouslevelsandcomponentsshouldbewelldefinedsothatchangesinsomepartsdonotseriouslyinfluenceothers.

TCG-CSU1.58DatabaseSystems1.7DataModelsAcollectionoftoolsfordescribingDataDatarelationshipsDatasemanticsDataconstraints描述数据、数据间联

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

ConstraintsofdataintegrityTCG-CSU1.59DatabaseSystemsDataModelsDataModel:Relationalmodel(Table)Entity-Relations

hipdatamodel(mainlyfordatabasedesign)Object-baseddatamodels(Object-orientedandObject-relational)Semistructureddat

amodel(XML)Otheroldermodels:NetworkmodelHierarchicalmodelTCG-CSU1.60DatabaseSystems1.8DataManipulati

onLanguage(DML)LanguageforaccessingandmanipulatingthedataorganizedbytheappropriatedatamodelDMLalsoknownasquerylanguageTwoclassesof

languagesProcedural过程式–userspecifieswhatdataisrequiredandhowtogetthosedataDeclarative声明式(nonprocedural)–userspecifi

eswhatdataisrequiredwithoutspecifyinghowtogetthosedataSQListhemostwidelyusedquerylanguageTCG-CSU1.61DatabaseSystemsDataDefinitionLanguage(DDL)Sp

ecificationnotationfordefiningthedatabaseschemaExample:createtableaccount(account-numberchar(10),balanceinteger)DDLcompilergeneratesasetof

tablesstoredinadatadictionaryDatadictionarycontainsmetadata(i.e.,dataaboutdata)DatabaseschemaDatasto

rageanddefinitionlanguageSpecifiesthestoragestructureandaccessmethodsusedIntegrityconstraintsDomainconstraintsReferent

ialintegrity(referencesconstraintinSQL)AssertionsAuthorizationTCG-CSU1.62DatabaseSystemsRelationalModelExampleoftabulardataintherelationalmodelA

ttributesTCG-CSU1.63DatabaseSystemsASampleRelationalDatabaseTCG-CSU1.64DatabaseSystems1.9SQLSQL:widelyusednon-procedurallanguageExample:Find

thenameofthecustomerwithcustomer-id192-83-7465selectcustomer.customer_namefromcustomerwherecustomer.customer_id=‗192-

83-7465‘Example:Findthebalancesofallaccountsheldbythecustomerwithcustomer-id192-83-7465selectaccount.balancefr

omdepositor,accountwheredepositor.customer_id=‗192-83-7465‘anddepositor.account_number=account.account_

numberTCG-CSU1.65DatabaseSystemsApplicationprogramsgenerallyaccessdatabasesthroughoneofLanguageextensionstoallowe

mbeddedSQLApplicationprograminterface(e.g.,ODBC/JDBC)whichallowSQLqueriestobesenttoadatabaseTCG-CSU1.66DatabaseSystems1.

10DatabaseDesignTheprocessofdesigningthegeneralstructureofthedatabase:LogicalDesign–Decidingonthedatabaseschema(acollectionofrela

tionschemas).Databasedesignrequiresthatwefinda“good”collectionofrelationschemas.Businessdecision–Whatattrib

utesshouldwerecordinthedatabase?ComputerSciencedecision–Whatrelationschemasshouldwehaveandhowshouldtheattributesbedistributedamongthevariousre

lationschemas?PhysicalDesign–DecidingonthephysicallayoutofthedatabaseTCG-CSU1.67DatabaseSystemsTheEntity-Relati

onshipModelModelsanenterpriseasacollectionofentitiesandrelationships一单位建模为实体与联系的集合Entity:a―thing‖or―object‖intheenterpri

sethatisdistinguishablefromotherobjectsDescribedbyasetofattributesRelationship:anassociationamongseveralentitiesRepresenteddiagra

mmaticallybyanentity-relationshipdiagram:TCG-CSU1.68DatabaseSystemsObject-RelationalDataModelsExtendtherelationaldatamodelbyincludingobject

orientationandconstructstodealwithaddeddatatypes.Allowattributesoftuplestohavecomplextypes,includingnon-a

tomicvaluessuchasnestedrelations.Preserverelationalfoundations,inparticularthedeclarativeaccesstodata,whileextendingmodelingpower.Pro

videupwardcompatibilitywithexistingrelationallanguages.TCG-CSU1.69DatabaseSystemsXML:ExtensibleMarkupLanguageDe

finedbytheWWWConsortium(W3C)OriginallyintendedasadocumentmarkuplanguagenotadatabaselanguageTheabilitytospecifynewtags,andtocreatene

stedtagstructuresmadeXMLagreatwaytoexchangedata,notjustdocumentsXMLhasbecomethebasisforallnewgenerationdata

interchangeformats.Awidevarietyoftoolsisavailableforparsing,browsingandqueryingXMLdocuments/dataTCG-CSU1.70DatabaseSyst

ems1.11StorageManagementStoragemanagerisaprogrammodulethatprovidestheinterfacebetweenthelow-leveldat

astoredinthedatabaseandtheapplicationprogramsandqueriessubmittedtothesystem.Thestoragemanagerisresponsibletothef

ollowingtasks:InteractionwiththefilemanagerEfficientstoring,retrievingandupdatingofdataIssues:StorageaccessFileorganization

IndexingandhashingTCG-CSU1.71DatabaseSystems1.12QueryProcessing1.Parsingandtranslation语法分析与转换2.Optimization优化3.Evaluation评价TCG-CSU1.72Databas

eSystemsQueryProcessing(Cont.)AlternativewaysofevaluatingagivenqueryEquivalentexpressionsDifferentalgorithmsforeachoperationCostdiffe

rencebetweenagoodandabadwayofevaluatingaquerycanbeenormousNeedtoestimatethecostofoperationsDependscriticallyonstatistical

informationaboutrelationswhichthedatabasemustmaintainNeedtoestimatestatisticsforintermediateresultstocomputecostofcomplexexpressionsTCG-CSU1.73Dat

abaseSystems1.12TransactionManagementAtransactionisacollectionofoperationsthatperformsasinglelogica

lfunctioninadatabaseapplicationWithinanapplicationprogram,oneormorequery-and-updaterequeststotheDBMScanbelogicallygroupedtogetherinordertope

rformatask.Agroupofsuchrequestsiscalledatransaction.Examples:acustomerpayswithacreditcard,withdrawmoneyfromATMTransaction-managementcomponen

tensuresthatthedatabaseremainsinaconsistent(correct)statedespitesystemfailures(e.g.,powerfailuresandoperatingsystemcrash

es)andtransactionfailures.Concurrency-controlmanagercontrolstheinteractionamongtheconcurrenttransaction

s,toensuretheconsistencyofthedatabase.TCG-CSU1.74DatabaseSystemsTheDatabaseSystemEnvironmentDatabasesystemiscomposedof5mainparts:1.Ha

rdware2.SoftwareOperatingsystemsoftwareDBMSsoftwareApplicationprogramsandutilitysoftware3.People4.Procedures5.DataTC

G-CSU1.75DatabaseSystemsTheDatabaseSystemEnvironment(continued)TCG-CSU1.76DatabaseSystemsComponentsofaDBMSTCG-CSU1.77DatabaseSystemsComponentsofDa

tabaseManager(DM)TCG-CSU1.78DatabaseSystemsMulti-UserDBMSArchitecturesTeleprocessingFile-serverClient-serverTCG-CSU1.79DatabaseSystemsTeleprocess

ingTraditionalarchitecture.Singlemainframewithanumberofterminalsattached.Trendisnowtowardsdownsizing.TCG-CSU1.80DatabaseSystemsTelepr

ocessingTopologyTCG-CSU1.81DatabaseSystemsFile-ServerFile-serverisconnectedtoseveralworkstationsacrossanetwork.

Databaseresidesonfile-server.DBMSandapplicationsrunoneachworkstation.Disadvantagesinclude:Significantnetworktraffic.CopyofDB

MSoneachworkstation.Concurrency,recoveryandintegritycontrolmorecomplex.TCG-CSU1.82DatabaseSystemsFile-Se

rverArchitectureTCG-CSU1.83DatabaseSystemsClient-ServerServerholdsthedatabaseandtheDBMS.Clientmanagesuserinterfacea

ndrunsapplications.Advantagesinclude:wideraccesstoexistingdatabases;increasedperformance;possiblereductioninhardwarecosts;reductionincom

municationcosts;increasedconsistency.TCG-CSU1.84DatabaseSystemsClient-ServerArchitectureTCG-CSU1.85DatabaseSystemsAlternativeClient-ServerTopo

logiesTCG-CSU1.86DatabaseSystemsHistoryofDatabaseSystems1950sandearly1960s:DataprocessingusingmagnetictapesforstorageTape

sprovideonlysequentialaccessPunchedcardsforinputLate1960sand1970s:HarddisksallowdirectaccesstodataHierarchi

cal(IMS)andNetwork(IDS、DBTG)datamodelsinwidespreaduse(1G)TedCodddefinestherelationaldatamodelWouldwintheACMTuringAwardforthisworkIBMResearchbeg

insSystemRprototypeUCBerkeleybeginsIngresprototypeHigh-performance(fortheera)transactionprocessingT

CG-CSU1.87DatabaseSystemsHistory(cont.)1980s:Researchrelationalprototypesevolveintocommercialsystems(2G)SQLbecomesindustri

alstandardParallelanddistributeddatabasesystemsObject-orienteddatabasesystems(3G)1990s:Largedecisionsupportanddata-miningapplicationsLargemulti-

terabytedatawarehousesEmergenceofWebcommerce2000s:XMLandXQuerystandardsAutomateddatabaseadministrationEndofChapter1TCG-CSU1.89DatabaseSyst

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

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

可为各种用户共享冗余度较小数据独立性较高易扩展TCG-CSU1.93DatabaseSystems三、数据库管理系统DBMSAcollectionofprogramsthatcontrolsadatabase.Specifically,itprovidesu

swithaninterfacetocreate,maintain,andmanipulatemultipledatabases.Forgeneral-purpose,是位于用户与操作系统之间的一层数据管理软件。DBMS的用途科学地组织和存储数据、高效

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

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

重组织性能监视等TCG-CSU1.96DatabaseSystems四、数据库系统DatabaseSystem:Bedevelopedtosupporttheoperationsofaspecificor

ganizationoraspecificsetofapplications.Consistsof1)anapplicationspecificdatabase,2)theDBMSthatmaintains

thatdatabase,and3)theapplicationsoftwarethatmanipulatesthedatabase.(数据库系统(,简称DBS)是指在计算机系统中引入数据库后的系统构成。在不引起混淆的情况下常常把数据库系统简称为数据库。)数据库系统的构成

由数据库、数据库管理系统(及其开发工具)、应用系统、数据库管理员(和用户)构成。TCG-CSU1.97DatabaseSystemsInstructor:谭长庚.(cgtan163)Textbook:Database–systemconcepts(5

thed.)bySilberschatz,Korth,Sudarshan,2005FundamentalsofDatabaseSystems(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-402Gradingfinal(70

%),others(30%),6(1per2~3weeks)homework1programminghwatmost!

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