数据库系统 introduce(1)_第1页
数据库系统 introduce(1)_第2页
数据库系统 introduce(1)_第3页
数据库系统 introduce(1)_第4页
数据库系统 introduce(1)_第5页
已阅读5页,还剩33页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1Database SystemsDatabase Systems数据库系统数据库系统衷宜衷宜 计算机科学与技术学院计算机科学与技术学院2Database systemsDatabase systems教学目标:教学目标:掌握关系数据库设计(包括数据库概念建模和关系数据掌握关系数据库设计(包括数据库概念建模和关系数据库模型的设计)和编程(包括关系模型代数运算和数据库模型的设计)和编程(包括关系模型代数运算和数据库语言库语言SQL)的基本概念和原理;的基本概念和原理;掌握数据库设计和编程的一般过程和基本方法;掌握数据库设计和编程的一般过程和基本方法;能自主开发和维护简单的数据库系统;能自主开发和

2、维护简单的数据库系统;提高专业英文资料的查阅能力提高专业英文资料的查阅能力3Database systemsDatabase systems教材教材 Jeffrey D.Ullman, Jennifer Widom. A first course in database systems. 机械工业出版社,机械工业出版社,2008.参考资料参考资料Jeffrey D.Ullman, Jennifer Widom. 数据库系统基数据库系统基础教程础教程. 岳丽华译岳丽华译. 机械工业出版社,机械工业出版社,2003.Abraham Silberschatz, Henry E Korth, S.Su

3、darshan. Database System Concepts. 机械工机械工业出版社业出版社 /ullman/fcdb.html4Database systemsDatabase systems教学安排:教学安排: 48 hoursClassroom teaching 40 hours Practice 8 hours考查方式:考查方式:Final exam 70%Homework 15%Project 15%51 The Worlds of Database Systems1 The Worlds of Database Systems

4、The Evolution of Database Systems Overview of a DBMS Outline of Database System Studies61.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsWhats a database?In essence, a database is a collection of information that exists over a long period of time, often many years.71.1 The E

5、volution of Database Systems1.1 The Evolution of Database SystemsDatabase Applications:Universities: registration, gradesAirlines: reservations, schedulesBanking: all transactionsSales: customers, products, purchasesOnline retailers: order tracking, customized recommendationsManufacturing: productio

6、n, inventory, orders, supply chainHuman resources: employee records, salaries, tax deductionsDatabases touch all aspects of our lives81.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsIn the early days, database applications were built directly on top of file systems.91.1 The

7、 Evolution of Database Systems1.1 The Evolution of Database SystemsuDrawbacks of using file systems to store data: Data redundancy and inconsistencyMultiple file formats, duplication of information in different filesDifficulty in accessing data Need to write a new program to carry out each new taskD

8、ata isolationmultiple files and formats101.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsIntegrity problemsIntegrity constraints (e.g. account balance 10) become “buried” in program code rather than being stated explicitlyHard to add new constraints or change existing ones1

9、11.1 The Evolution of Database Systems1.1 The Evolution of Database Systems演示演示121.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsAtomicity of updatesFailures may leave database in an inconsistent state with partial updates carried outExample: Transfer of funds from one acco

10、unt to another should either complete or not happen at all131.1 The Evolution of Database Systems1.1 The Evolution of Database Systems演示演示141.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsConcurrent access by multiple usersConcurrent accessed needed for performanceUncontrol

11、led concurrent accesses can lead to inconsistenciesExample: Two people reading a balance and updating it at the same time151.1 The Evolution of Database Systems1.1 The Evolution of Database Systems演示演示161.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsSecurity problemsHard t

12、o provide user access to some, but not all, data171.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsuDatabase systems offer solutions to all the above problems181.1 The Evolution of Database Systems1.1 The Evolution of Database SystemsLate 1960s and 1970s:Network and hierarch

13、ical data models in widespread use a network data model191.1 The Evolution of Database Systems1.1 The Evolution of Database Systems a hierarchical data model201.1 The Evolution of Database Systems1.1 The Evolution of Database Systems1970s:Ted Codd (August 23, 1923 April 18, 2003) defines the relatio

14、nal data modelReceived the ACM Turing Award in 1981IBM Research begins System R prototypeUC Berkeley begins Ingres prototype211.1 The Evolution of Database Systems1.1 The Evolution of Database Systems1980s:Research relational prototypes evolve into commercial systemsSQL becomes industrial standardPa

15、rallel and distributed database systemsObject-oriented database systems1990s:Large decision support and data-mining applicationsLarge multi-terabyte data warehousesEmergence of Web commerce2000s:XML and XQuery standardsAutomated database administration221.2 Overview of a DBMS1.2 Overview of a DBMSuA

16、 DBMS is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time, safely.uIn common, a database is a collection of data that is managed by a database management system (DBMS, database system).231.2 Overview of a DBMS1.2 Overvie

17、w of a DBMSA DBMS is expected to:Data Definition Language (DDL): create database and specify their schema. A schema is a group of collections of sentences that are expressed by DDL to describe the logical structure of some database completely.Data Query Language and Data Manipulation Language: query

18、 and modify the data based on the schema of the database.The storage of very large amounts of data: many terabytes or more, over a long period of time, allowing efficient access. 241.2 Overview of a DBMS1.2 Overview of a DBMSA DBMS is expected to (cont.):Enable durability: the recovery of the databa

19、se in the face of failures, errors of many kinds, or intentional misuse.Data sharing: access to data from many users at once; without allowing the action of one user to affect other users; without actions on the data to be performed partially but not completely.251.2 Overview of a DBMS1.2 Overview o

20、f a DBMS演示演示261.2 Overview of a DBMS1.2 Overview of a DBMSApplication 1Application 2.Application nDBMSdatabaseDatabase Management SystemDatabase systems diagram27Storage managerStorageread/write pagesindex/file/record mangerindex, file, andrecord requestsQuery compilerQueries, updatesUser/applicatio

21、nDDL compilerDDL commandsDatabase administratorTransaction managerTransaction commandsLocktableLogging and recoveryConcurrencycontrolBuffer managerbufferspage commandsdata,metadata,indexeslogpagesmetadataExecution engineQuery planMetadata,statisticsDatabase management system components281.2 Overview

22、 of a DBMS1.2 Overview of a DBMSTwo sources of commands to the DBMS:Conventional users and application programs.A database administrator: a person or persons responsible for the structure or schema of the database.291.2 Overview of a DBMS1.2 Overview of a DBMSThree kinds of commands to the DBMS:Quer

23、ies, updates: commands to affect the content of the database or extract data from the database.Transaction commands: commands to tell the transaction manager when transactions begin and end.DDL commands: commands to change the schema of the database or create a new database by database administrator

24、s301.2 Overview of a DBMS1.2 Overview of a DBMSStorage and buffer management: manages the reading and writing of informationincludes the storage manager and the buffer managerstorage manager: keeps track of the location of files on the disk and obtains the block or blocks containing a file on reques

25、t from the buffer manager. block:1K-16K buffer manager: partition the available main memory into buffers. page:1K-4K 311.2 Overview of a DBMS1.2 Overview of a DBMSThe kinds of information:Data: the contents of the database itself.Metadata: the database schema that describes the structure of, and con

26、straints on, the database.Log records: information about recent changes to the database.Statistics: information about data properties.Indexes: data structures that support efficient access to the data.321.2 Overview of a DBMS1.2 Overview of a DBMSTransaction processing:Transaction: a group of operat

27、ions that must appear to have been executed together sequentially, as a unit.331.2 Overview of a DBMS1.2 Overview of a DBMSProperties: ACIDAtomicity: either all of a transaction be executed or none of it isConsistency: keep consistent stateDurability: If a transaction has completed its work, its eff

28、ect should not get lost while the system fail, even if it fails immediately after the transaction completes. Isolation: When two or more transactions run concurrently, their effects must be isolated from one another.341.2 Overview of a DBMS1.2 Overview of a DBMSTransaction manager: be responsible fo

29、r the integrity of the systemLoggingConcurrency controlDeadlock resolution351.2 Overview of a DBMS1.2 Overview of a DBMSquery processor:The query compiler: A query parserA query preprocessorA query optimizer The execution engine: It gets the data from the database into buffers in order to manipulate that data. It needs to in

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论