版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
数据库原理王建民清华大学软件学院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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二四年度海上工程船舶租赁光租赁合同(04版)
- 二零二四年度能源供应合同模板
- 加工合作合同的技术规范
- 培训班合作合规协议
- 转让协议与合同的法律关系探讨
- 农村自建房买卖合同的贷款政策
- 住宅装修工程分包协议
- 沥青路面施工安全措施落实购销合同
- 精密机械转让协议书
- 甲方购销合同操作
- 教师个人成长档案电子模板
- 汉字素养大赛卷一(1)(初中)
- 国开电大本科《行政法与行政诉讼法》期末考试案例分析题库2023春期版
- 新产品APQP开发计划表
- (岗位职责)混凝土搅拌站的职责总汇
- 监理质量安全红线管理监理实施细则
- 2023中国软件质量研究报告
- LW36-40.5户外高压交流六氟化硫断路器安装使用说明书
- 某输电线路工程监理细则
- 三年级上册科学课件-5.1知冷知热 |湘科版( )
- GB/T 19633-2005最终灭菌医疗器械的包装
评论
0/150
提交评论