版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
数据库原理王建民清华大学软件学院2014年/春
Lecture1Introduction2Textbooks授课时间 第1周-第16周课程教材
DatabaseSystemConcepts(6thEdition)
高等教育出版社参考教材 数据库系统概论(第3/4版), 萨师煊、王珊 高等教育出版社3Evaluation另见4TA&Others课程辅导 黄向东纪律要求 不要迟到,不要早退其它信息 清华大学网络学堂教者王建民
62781776/5BasicConceptsData-数据
Database-数据库(DB)DatabaseManagementSystem
-数据库管理系统(DBMS)DatabaseSystem-数据库系统DatabaseApplication-数据库应用6MainContentsWhyuseDatabases?DatabaseSystemsandFileSystemsWhatisaDatabase?HowtoPerformOperationsonaDatabase?WhousesDatabase?PurposesofDatabasesHowtoDeployaDatabase?ThePastandFutureofDatabases7DatabaseManagementSystemCollectionofinterrelateddataandSetofprogramstoaccessthedata
DBMSprovidesanenvironmentthatisbothconvenientandefficienttouse狭义广义SetofprogramsInterrelateddata8DatabaseApplicationsBanking,Airlines,Enterprises……DBMSDBAppDBSysDBData9Intheearlydaysdata-centricapplicationswerebuiltontopoffilesystems10Drawbacksoffilesystems1.DataredundancyandinconsistencyMultiplefileformats,duplicationofinformationindifferentfilesE.g.addressandtelephonenumbersavedin savings-accountrecord checking-accountrecord11Drawbacksoffilesystems(c1)DifficultyinaccessingdataNeedtowriteanewprogramtocarryouteachnewtaskDataisolation—multiplefilesandformatsAutoCAD,2Ddrawingtools dwgfile–binaryfileformat differentversion,differentformatMSWord,docfile12Drawbacksoffilesystems(c2)IntegrityproblemsIntegrityconstraints(e.g.accountbalance>0)epartofprogramcodeHardtoaddnewconstraintsorchangeexistingonesAtomicityofupdatesFailuresmayleavedatabaseinaninconsistentstatewithpartialupdatescarriedoutE.g.transferoffundsfromoneaccounttoanothershouldeithercompleteornothappenatall13Drawbacksoffilesystems(c3)ConcurrentaccessbymultipleusersConcurrentaccessedneededforperformanceUncontrolledconcurrentaccessescanleadtoinconsistenciesE.g.twopeoplereadingabalanceandupdatingAccountAwith$500atthesametime,onewithdraws$50,theotherwithdraws$100SecurityproblemsPasswordsAccountbalance14MainContentsWhyuseDatabases?WhatisaDatabase?DataanditsModelsHowtoPerformOperationsonaDatabase?WhousesDatabase?PurposesofDatabasesHowtoDeployaDatabase?ThePastandFutureofDatabases15DataAbstractionDBMSprovidesuserswithanabstractviewofthedataHidesthedetailsofstorageandmaintenanceSimplifytheuser’sinteractionwiththesystem16SchemasandInstancesSimilartotypesandvariablesinprogramminglanguagesSchema-模式
thelogicalstructureofthedatabase
AnalogoustotypeinformationofavariableinaprogramInstance
-实例
theactualcontentofthedatabaseataparticularpointintimeAnalogoustothevalueofavariable17SchemaInstance18LevelsofDataAbstractionAdministratorProgrammerEndUser19PhysicallevelPhysicalleveldescribeshowarecord(e.g.,customer)isstored20LogicallevelLogicalleveldescribesdatastoredindatabase,andtherelationshipsamongthedata.
typecustomer=record
name:string;
street:string;
city:integer;
end;21Viewlevelapplicationprogramshidedetailsofdatatypes,Viewscanalsohideinformation(e.g.,salary)forsecuritypurposes22DataIndependenceIngeneral,theinterfacesbetweenthevariouslevelsandcomponentsshouldbewelldefinedsothatchangesinsomepartsdonotseriouslyinfluenceothers.23PhysicalDataIndependencetheabilitytomodifythephysicalschemawithoutchangingthelogicalschemaApplicationsdependonthelogicalschema24DataModelsAcollectionoftoolsfordescribingDataDatarelationshipsDatasemanticsDataconstraintsTypicalDataModelsRelationalmodelEntity-Relationshipmodel P.P.Chen25OtherDataModelsObject-orientedmodelSemi-structureddatamodelsXMLEarlymodelsnetworkmodelhierarchicalmodel26RelationalmodelofBankingData27EntityRelationshipModelE-RmodelofrealworldEntities(objects)E.g.customers,accounts,bankbranchRelationshipsbetweenentitiesE.g.AccountA-101isheldbycustomerJohnsonRelationshipsetdepositorassociatescustomerswithaccounts28WidelyusedfordatabasedesignDatabasedesigninE-Rmodelusuallyconvertedtodesignintherelationalmodelwhichisusedforstorageandprocessing29MainContentsWhyuseDatabases?WhatisaDatabase?HowtoPerformOperationsonaDatabase?DatabaseLanguagesWhousesDatabase?PurposesofDatabasesHowtoDeployaDatabase?ThePastandFutureofDatabases30DatabaseLanguagesDatadefinitionlanguageSpecifythedatabaseschemaDatamanipulationlanguageExpressdatabasequeriesandupdates31DataDefinitionLanguageLanguagefordefiningthedatabaseschemaE.g.
createtable
account(
account-number
char(10),
balance
integer)DDLcompilergeneratesasetoftablesstoredinadatadictionaryDatadictionarycontainsmetadata(i.e.,dataaboutdata)32DataManipulationLanguageLanguageforaccessingandmanipulatingthedataorganizedbytheappropriatedatamodelDMLalsoknownasquerylanguageTwoTypesoflanguagesProcedural–userspecifieswhatdataisrequiredandhowtogetthosedataNonprocedural–userspecifieswhatdataisrequiredwithoutspecifyinghowtogetthosedata33SQLHistoryStructuredQueryLanguageSQL=DDL+DMLDevelopedinIBMatearly1970sSQLStandardSQL-86SQL-89SQL-92SQL:1999SQL:200334InteractiveSQLSQL:widelyusednon-procedurallanguageE.g.findthenameofthecustomerwithcustomer-id192-83-7465
select
customer.customer-name
from
customer
where
customer.customer-id=‘192-83-7465’35EmbeddedSQLApplicationprogramsgenerallyaccessdatabasesthroughoneofLanguageextensionstoallowembeddedSQLC/Java/Cobol…Applicationprograminterface(e.g.ODBC/JDBC)whichallowSQLqueriestobesenttoadatabase36MainContentsWhyuseDatabases?WhatisaDatabase?HowtoPerformOperationsonaDatabase?WhousesDatabase?DatabaseUsersandAdministratorsPurposesofDatabasesHowtoDeployaDatabase?ThePastandFutureofDatabases37DatabaseUsers
UsersaredifferentiatedbythewaytheyexpecttointeractwiththesystemApplicationprogrammers
–interactwithsystemthroughDMLcallsSophisticatedusers
–formrequestsinadatabasequerylanguage38DatabaseUsers(c1)Specializedusers
–writespecializeddatabaseapplicationsthatdonotfitintothetraditionaldataprocessingframeworkNaïveusers
–invokeoneofthepermanentapplicationprogramsthathavebeenwrittenpreviouslyE.g.peopleaccessingdatabaseovertheweb,banktellers,clericalstaff39DatabaseAdministratorCentralcontrolofboththedataandtheprogramsCoordinatesalltheactivitiesofthedatabasesystemthedatabaseadministratorhasagoodunderstandingoftheenterprise’sinformationresourcesandneeds40DatabaseAdministrator’sDutiesDatabaseadministrator'sdutiesinclude:SchemadefinitionStoragestructureandaccessmethoddefinitionSchemaandphysicalorganizationmodificationGrantinguserauthoritytoaccessthedatabaseRoutinemaintenanceBackupthedatabaseEnsureenoughfreediskspaceEnsurethedatabaseperformance41MainContentsWhyuseDatabases?WhatisaDatabase?HowtoPerformOperationsonaDatabase?WhousesDatabase?PurposesofDatabasesTransactionManagementHowtoDeployaDatabase?ThePastandFutureofDatabases42PurposesofDBMSLarge-ScaleDataStorageandSearchConcurrencyControlwhenmulti-useraccessingthedatabaseRecoverywhenthesystemcrashedAccessControltopreventillegaldataaccess43TransactionManagement AtransactionisacollectionofoperationsthatperformsasinglelogicalfunctioninadatabaseapplicationACIDfeaturesAtomicity 原子性Consistency 一致性Isolation 隔离性Durability 持久性44MainContentsWhyuseDatabases?WhatisaDatabase?HowtoPerformOperationsonaDatabase?WhousesDatabase?PurposesofDatabasesHowtoDeployaDatabase?OverallSystemStructureThePastandFutureofDatabases45OverallSystemStructure46StorageManagementStoragemanagerisaprogrammodulethatprovidestheinterfacebetweenthelow-leveldatastoredinthedatabaseandtheapplicationprogramsandqueriessubmittedtothesystemThestoragemanagerisresponsibletothefollowingtasks:interactionwiththefilemanagerefficientstoring,retrievingandupdatingofdata47QueryProcessorDDLinterpreterInterpretsDDLsta
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 秋天的作文课件
- 机械设计基础 第4版 q专业词汇
- 2024年计生用品项目规划申请报告范文
- 2024年环氧脂肪酸甲酯项目立项申请报告范稿
- 2024年谷物加工品质测试仪项目立项申请报告模稿
- 满井游记课件教学课件
- 世界那么大我想去看看
- 健康饮食英语课件
- 医学课件下载教学课件
- 蜡烛创意美术课件
- 8D报告培训教材(共30页).ppt
- 计算机基础知识100题与答案
- 中专学生毕业自我鉴定800字5篇
- 班主任工作的真谛
- 初中地理经纬度专项练习题
- T357702017企业合规管理体系全套程序文件
- 沥青路面施工监理工作细则
- 国有企业管理人员选拔任用管理办法
- 供应商云平台操作手册PPT课件
- 初中音乐校本教材
- 必修1:数据与计算PPT课件
评论
0/150
提交评论