数据库原理课件第一章.ppt

上传人:赵** 文档编号:65785422 上传时间:2022-12-08 格式:PPT 页数:97 大小:1.66MB
返回 下载 相关 举报
数据库原理课件第一章.ppt_第1页
第1页 / 共97页
数据库原理课件第一章.ppt_第2页
第2页 / 共97页
点击查看更多>>
资源描述

《数据库原理课件第一章.ppt》由会员分享,可在线阅读,更多相关《数据库原理课件第一章.ppt(97页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Database System-SSD7 Spring,Spring,20201 12 2Tan Chang-Tan Chang-genggengSchool of Software,Central South University TCG-CSU1.2Database Systems ReferenceslCMU SSD7 E-resourcelDatabase system concepts(5th ed.)by Silberschatz,Korth,Sudarshan,2005,Higher Education Press.ISBN 7-04-019245-4l数据库系统概念数据库系统概

2、念(上书中译本)(上书中译本),原著:原著:Silberschatz,杨冬青译,机械工业出版社,ISBN 7-111-19687-2lDatabase Systems A practical Approach to Design,Implementation,and Management(Thomas Connolly,Carolyn Begg,Person Education Inc.),ISBN 7-5053-8784-7nInstructor:Tan Changgeng.Email: QQ:327414529Offering World-Leading Curriculum in Com

3、puter Programming&Software Systems Development(SSD)TCG-CSU1.4Database SystemsTwo CertificatesTwo CertificatesnCertificate in Computer ProgramminglCourses 1 through 5nCertificate in Software Systems DevelopmentlCourses 1 through 10SSD Curriculum OverviewTCG-CSU1.5Database SystemsiCarnegie Curriculumi

4、Carnegie Curriculum1-5=Certificate in Computer Programming1-5=Certificate in Computer Programming1-10=Certificate in Software Systems Development1-10=Certificate in Software Systems Development1:Introduction to Information Systems2:Introduction to Computer Systems3:Object Oriented Programming and De

5、sign5:Data Structuresand Algorithms6:System LevelProgramming10:SoftwareProject Organizationand Management9:Software Specification,Testand Maintenance8:Networks and DistributedComputing4:User Centered Design and Testing7:Database SystemsTCG-CSU1.6Database SystemsWhat does iCarnegie do?n10 Course Sequ

6、encenRooted in the expertise of Carnegie Mellon Universitys School of Computer SciencenApplied,industry-oriented skillsnSoftware Development DisciplineSoftware Development!=Computer ScienceSoftware Development!=Computer SciencenCS trains scientists/researchersnFocus on TheorynHigher MathematicsnSoft

7、ware Developers are not researchersnApplied,industry oriented skillsnFocus on foundational skillsTCG-CSU1.7Database SystemsThe purpose of SSD7 is for students tolBecome familiar with fundamental DBMS concepts and what a database system is lLearn to use SQL(structured query language)lLearn to design

8、database systemslLearn to design and manage transaction(事务)lLearn to improve query performancelGain exposure to future trends in databases TCG-CSU1.8Database SystemsStudents successfully completing SSD7 will be able to PRODUCE(contd)lDatabase designs that support a given applicationlData models usin

9、g E-R diagrams lSound schema designs using normalization(使用规范化方法设计出合理的模式)lWeb-based database applications using SQL and JSP/Servlets TCG-CSU1.9Database SystemsStudents successfully completing SSD7 will be able to USElIndex structures of a DBMS to improve performance lThe transaction features of a DB

10、MS to achieve fault recovery(故障恢复)and concurrency control(并发控制)lKey relational operations to manipulate data(操纵数据)lSQL DDL to model data,constraints,and views(视图)lSQL DML to write complex queries TCG-CSU1.10Database SystemsStudents will be able to knowledgeably DISCUSSlThe basic concepts of object-r

11、elational and object-oriented database management systems lThe basic concepts and application of data warehousing and data mining(datacubes,OLAP)lThe basic functions and application of multimedia databases lThe basic issues of database privacy and security lThe DBMS offerings of the most important v

12、endors TCG-CSU1.11Database SystemsDatabaseProgDistributed SysOSUIData Struct&AlgorithmsTCG-CSU1.12Database SystemsTopics Shall be LearnednIntroductionnRelational ModelnSQLnEntity-Relationship ModelnRelational-Database DesignnTransactionsnConcurrency Control nRecovery System(Integrity and Security)nD

13、atabase System ArchitecturesnTCG-CSU1.13Database SystemsChapter 1:IntroductionnPurpose of Database SystemsnView of DatanDatabase LanguagesnRelational DatabasesnDatabase DesignnObject-based and semistructured databasesnData Storage and QueryingnTransaction ManagementnDatabase ArchitecturenDatabase Us

14、ers and AdministratorsnOverall StructurenHistory of Database SystemsTCG-CSU1.14Database Systems1.1 Database1.1 Database Management System(DBMS)Management System(DBMS)nDBMS contains information about a particular enterpriselCollection of interrelated datalSet of programs to access the data lAn enviro

15、nment that is both convenient and efficient to usenDatabase Applications?lBanking:all transactionslAirlines:reservations,scheduleslUniversities:registration,gradeslSales:customers,products,purchaseslOnline retailers:order tracking,customized recommendationslManufacturing:production,inventory,orders,

16、supply chainlHuman resources:employee records,salaries,tax deductionsn nDatabasesDatabases touchtouch allall aspectsaspects ofof ourour liveslivesTCG-CSU1.15Database Systems The The ExamplesExamples of Database Systems of Database Systems nPurchases using your credit card 信用卡lA credit card database

17、lThe checkout assistantlA credit card readerlCheck your creditlAdd the purchases to databaselMonthly statements to each cardholderTCG-CSU1.16Database Systems1.2 Purpose of Database SystemsnIn the early days,database applications were built directly on top of file systemsnDrawbacks of using file syst

18、ems to store data?TCG-CSU1.17Database SystemsnLimitations of the File-Based ApproachlData redundancy and inconsistency数据冗余与非一致性4Multiple file formats,duplication of information in different files4文件格式不相容,数据冗余lProgram-data dependence 程序依赖于数据4Need to write a new program to carry out each new tasklData

19、 isolation multiple files and formats4数据孤立;文件格式不相容lIntegrity problems完整性问题4Integrity constraints (e.g.account balance 0)become“buried”in program code rather than being stated explicitly4Hard to add new constraints or change existing onesTraditional Traditional File-Based Systems File-Based Systems 文

20、件系统文件系统文件系统文件系统TCG-CSU1.18Database SystemsnDrawbacks of using file systems(cont.)lAtomicity of updates原子更新原子更新4Failures may leave database in an inconsistent state with partial updates carried out4Example:Transfer of funds from one account to another should either complete or not happen at alllConcu

21、rrent access by multiple users并发访问并发访问4Concurrent accessed needed for performance4Uncontrolled concurrent accesses can lead to inconsistenciesExample:Two people reading a balance and updating it at the same time(sell ticket)lSecurity problems4Hard to provide user access to some,but not all,datanData

22、base systems offer solutions to all the above problemsTCG-CSU1.19Database SystemsCharacteristics of the Characteristics of the DatabaseDatabase Approach Approach 数据库数据库数据库数据库方法方法方法方法nData:data are raw facts that describe people,objects,and events nDatabase:An integrated collection of related data co

23、nstitutes a Database(DB).相关数据 集成lrelated data,the data represents logically coherent facts about some aspects of the real world that are required by an application.lIntegrated,the data for multiple applications is stored together and manipulated in a uniform way on a secondary storage such as a magn

24、etic or an optical disk.TCG-CSU1.20Database SystemsDatabase Management Systems nA Database Management System(DBMS)is a collection of programs that controls a database.lGeneral-purpose software system lData Definition Language(DDL)lData Manipulation Language(DML)lControlled access to the database4 a

25、security system(authorized users)安全性4 an integrity system(consistency of stored data)完整性4 a concurrency control system(shared access)并发控制4 a recovery control system(when H/S failure)恢复4 a user-accessible catalog(descriptions of data)数据字典TCG-CSU1.21Database SystemsDatabase Systemna Database System co

26、nsists of lan application specific database 数据库lthe DBMS that maintains that database DBMSlthe application software that manipulates the database 应用程序 数据库系统的个体含义是指一个具体的数据库管理系统软件和用它建立起来的数据库;它的学科含义是指研究、开发、建立、维护和应用数据库系统所涉及的理论、方法、技术所构成的学科。在这一含义下,数据库系统是软件研究领域的一个重要分支,常称为数据库领域。TCG-CSU1.22Database SystemsTC

27、G-CSU1.23Database SystemsCharacteristics of the Database Approach Characteristics of the Database Approach nDBMSs embody the three distinguishing characteristics of the database approach:data abstraction,reliability,and efficiency.n数据抽象 可靠性 高效 TCG-CSU1.24Database SystemsCharacteristics of the Databa

28、se Approach 2Characteristics of the Database Approach 2nData Abstractionlprovide users with high-level,conceptual representations of the dataa table in relational DBMSs 提供高层、概念的数据表示lhide storage details that are not of interest to most database users 隐藏存储细节lprogram-data independence 数据独立性TCG-CSU1.25

29、Database SystemsCharacteristics of the Database Approach 3Characteristics of the Database Approach 3nReliability.DBMSs provide high reliability lEnforcing integrity constraints 完整性约束4Integrity constraints reflect the meaning(or,the semantics)of the data and of the application lEnsuring data consiste

30、ncy despite hardware or software failures.数据一致性4Tansactions Within an application program,one or more query-and-update requests to the DBMS can be logically grouped together in order to perform a task.A group of such requests is called a transaction.事务 4Examples:a customer pays with a credit card,wi

31、thdraw money from ATMTCG-CSU1.26Database SystemsCharacteristics of the Database Approach 4Characteristics of the Database Approach 4nEfficiency:DBMSs support both efficient space utilization and efficient access to data.lStoring each data item only once 减少冗余lEnhancing the performance of queries by m

32、eans of optimizations and the use of access methods to data based on their values 查询优化lDecreasing response time of transactions by allowing multiple users to access the database concurrently 并发提高效率 TCG-CSU1.27Database SystemsContrasting Database and File SystemsTCG-CSU1.28Database SystemsFile1File1F

33、ile2File2FilenFilenProg1Prog1Prog2Prog2PrognPrognFile SystemFile SystemTCG-CSU1.29Database SystemsDatabaseDatabaseProg1Prog1Prog2Prog2PrognPrognDBMSDBMSTCG-CSU1.30Database SystemsCompare the different phases of data management (Table1)TCG-CSU1.31Database SystemsWhen Is a Database Management When Is

34、a Database Management System Needed?System Needed?nAdvantages 1lControl of data redundancylData consistencylMore information from the same amount of datalSharing of datalImproved data integritylImproved securitylEnforcement of standardslEconomy of scaleTCG-CSU1.32Database SystemsnAdvantages 2lBalanc

35、e of conflicting requirementslImproved data accessibility and responsivenesslIncreased productivitylImproved maintenance through data independencelIncreased concurrencylImproved backup and recovery servicesTCG-CSU1.33Database SystemsnDisadvantages lComplexitylSizelCost of DBMSslAdditional hardware c

36、ostslCost of conversionlPerformancelHigher impact of a failureTCG-CSU1.34Database SystemsWhen Is a Database Management System Not Needed?When Is a Database Management System Not Needed?nThe data has a simple structure and its size is small.nThe application,although simple and unchanging,has a specia

37、l purpose.nConcurrent access to data by multiple users is not required.TCG-CSU1.35Database SystemsFour ConceptsnDatanDatabasenDBMS(Database Management Systems)nDBS(Database Systems)TCG-CSU1.36Database SystemsnDatabase SystemsnConceptslData(数据):4Data are raw facts that describe people,objects,and eve

38、nts.Or 数据实际上就是描述事物的符号记录。数据实际上就是描述事物的符号记录。4例如:文字、图形、图象、声音、学生的档案记录等。例如:文字、图形、图象、声音、学生的档案记录等。4数据的形式本身并不能完全表达其内容,需要经过语义解释。数据的形式本身并不能完全表达其内容,需要经过语义解释。数据与其语义是不可分的。数据与其语义是不可分的。lInformation(信息):4一般把信息理解为关于现实世界事物存在方式或运动状态的反一般把信息理解为关于现实世界事物存在方式或运动状态的反映映.TCG-CSU1.37Database SystemslDifference between Data and

39、Information4数据是信息的符号表示或称为载体数据是信息的符号表示或称为载体;信息则信息则是数据的内涵,是对数据语义的解释;是数据的内涵,是对数据语义的解释;4数据表示了信息,而信息只有通过数据形数据表示了信息,而信息只有通过数据形式才能被计算机理解和接受。式才能被计算机理解和接受。TCG-CSU1.38Database SystemslDatabase4An integrated collection of related data constitutes a Database(DB).4Keep data long time4Large quantities of data 4Lo

40、gically related4Structured data4ShareTCG-CSU1.39Database SystemslDatabase Management Systems(DBMS)4A Database Management System(DBMS)is a collection of programs that controls a database.4It enables users to define,create,maintain,and control access to the database.4We can use it not only to create a

41、nd maintain multiple databases but also to implement database systems for different applications.TCG-CSU1.40Database SystemslDatabase Systems 4A database system is developed to support the operations of a specific organization or a specific set of applications.4a Database System consists of 1)An app

42、lication specific database 2)The DBMS that maintains that database 3)The application software that manipulates the database 4The figure 1-4 illustrates a simplified database-system architecture TCG-CSU1.41Database SystemsFigure 1-4 database-system architecture TCG-CSU1.42Database SystemsnRoles in th

43、e Database EnvironmentlData and Database Administrators(DA and DBA)lDatabase Designers 4Logical Database Designers4Physical Database DesignerslApplication DeveloperslEnd-Users4Nave users4Sophisticated usersTCG-CSU1.43Database Systems1.3 Database ArchitectureThe architecture of a database systems is

44、greatly influenced by the underlying computer system on which the database is running:nCentralizednClient-servernParallel(multi-processor)nDistributed TCG-CSU1.44Database Systems1.4 Database UsersUsers are differentiated by the way they expect to interact with the systemnApplication programmers inte

45、ract with system through DML callsnSophisticated users form requests in a database query languagenSpecialized users write specialized database applications that do not fit into the traditional data processing frameworknNave users invoke one of the permanent application programs that have been writte

46、n previouslylExamples,people accessing database over the web,bank tellers,clerical staffTCG-CSU1.45Database Systems1.5 Database AdministratornCoordinates all the activities of the database system;the database administrator has a good understanding of the enterprises information resources and needs.n

47、Database administrators duties include:lSchema definition模式定义lStorage structure and access method definitionlSchema and physical organization modificationlGranting user authority to access the databaselSpecifying integrity constraintslActing as liaison with userslMonitoring performance and respondin

48、g to changes in requirementsTCG-CSU1.46Database SystemsOverall System Structure TCG-CSU1.47Database Systems1.6 Three-Level Architecture ArchitecturenDBA should be able to change database storage structures without affecting the users views.nInternal structure of database should be unaffected by chan

49、ges to physical aspects of storage.nDBA should be able to change conceptual structure of database without affecting all users.Objectives:TCG-CSU1.48Database SystemsANSI-SPARC Three-Level ArchitectureANSI-SPARC Three-Level ArchitectureTCG-CSU1.49Database SystemsANSI-SPARC Three-Level ArchitectureANSI

50、-SPARC Three-Level ArchitecturenExternal Level外部层外部层lUsers view of the database.用户视图用户视图lDescribes that part of database that is relevant to a particular user.nConceptual Level概念层概念层lCommunity view of the database.总体视图总体视图 lDescribes what data is stored in database and relationships among the data.n

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁