Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to Database System College of Computer Science and Technology Chongqing University of Posts & Telecom. Spring, 2006.

Similar presentations


Presentation on theme: "An Introduction to Database System College of Computer Science and Technology Chongqing University of Posts & Telecom. Spring, 2006."— Presentation transcript:

1 An Introduction to Database System College of Computer Science and Technology Chongqing University of Posts & Telecom. Spring, 2006

2 2 Principles of Database Systems Professor: Yu Wu –Email: wuyu@cqupt.edu.cn (best way to reach me) –Office: S1901, 62460709 Teaching Assistant:_____ –Email: –Office: Class web page: –http://www.cqupt.edu.cn/database –http://cs.cqupt.edu.cn/database My web page: http://cs.cqupt.edu.cn/wuyu

3 3 Textbooks Required: –A First Course in Database Systems, by Jeffrey D.Ullman Jennifer Widom. Recommended: – 萨师煊, 王珊. 数据库系统概论 ( 第三版 ). 高等教育出版社, 2000 年 –Books on SQL Server 2000 You may also want: –Books on design and programming : Powerbuilder, PowerDesigner, UML, VB, Delphi, VC, JAVA, C#, ASP, PHP, JSP etc.

4 4 Syllabus Background and history of database management systems Fundamentals of using a database management systems: SQL 2000.(*extracurricular) Database modeling Relational model: theoretical background and operations Database Language SQL Fundamentals of database management systems: transactions and security etc. Database system design and practice

5 Chapter 1 The Worlds of Database Systems Evolution of Database Systems Architecture of DBMS and DBS Future of Database Systems

6 6 1.1 Evolution of Database Systems 1.1.1 Some Basic notions –Data –Database (DB) –Database Management System (DBMS) –Database System (DBS). –Database Administrator (DBA)

7 7 Basic Notions Data –Distinct pieces of information represented in a form suitable for processing by computer. –Data can exist in a variety of forms -- as digital numbers, text, image, sound, video and etc. Database (DB) –In essence, it’s nothing more than a collection of information that exists over a long period of time. –In common parlance, it refers to a collection of data managed by a database management system (DBMS) or just database system (DBS).

8 8 Example of Data and Database Data –Record of student archive (李明,男, 1972 ,江苏,计算机系, 1990 ) Database (DB)

9 9 DBMS Database Management System (DBMS) –A collection of programs that enables you to store, modify, and extract information from a database. –There are many different types of DBMSs, ranging from small systems that run on personal computers to huge systems that run on mainframes.

10 10 Basic functions of DBMS Data definition –Allow creating new databases and specify their schema (logical structure of the data), via data definition language (DDL). Data manipulation –Allow efficient access to the data, such as querying and modifying the data, via query language or data manipulation language (DML). Operation management of DB –Support the storage of very large amounts of data over a long period of time, assuring data integrity, keeping data secure from accident or unauthorized use. Support concurrent, atomic access to data. (Example: bank and its ATM machines.) Creation and maintenance of DB –Such as inputting and transferring of Data, DB backup and recovery, performance monitoring, audit and analysis etc. P1 Reading book

11 11 Database System (DBS) Database System (DBS). –DB, DBMS, Development Tools, DB applications, DB Administrator (DBA) and users DB OS DBMS Developing Tools DB applications User DBA Hardware Operation System DBMS, Compiling System Developing Tools Application Systems DBMS in Computer System

12 12 Database Users 用户( Database Users )可以按照使用系 统的不同方式进行区分 – 复杂用户 可直接使用查询语言的技术人员 专家用户:可根据需要编写特定的数据库应用程序 – 简单用户 使用编制好的应用程序访问数据库 如银行的职员、机票预定人员、旅馆总台服务员 – 偶然用户 企业或组织机构的高中级管理人员

13 13 Database Administrator DBA –Person who is responsible for management and maintenance of DB. 具体任务 – 决定数据库中信息内容和结构 – 存储结构和存取方式定义 – 定义数据的安全性和完整性约束条件 – 改进和重构数据库系统 – 监控数据库的使用和运行

14 14 其它人员 系统分析员 – 负责应用系统的需求分析和规范说明 – 与用户及 DBA 协商,确定系统的硬软件配置 – 参与数据库系统的概要设计 数据库设计人员 – 参加用户需求调查和系统分析 – 确定数据库中的数据 – 设计数据库各级模式 应用程序员 – 设计和编写应用系统的程序模块 – 进行调试和安装

15 15 问题 在一个大公司的工资单系统中,指出哪些 类型的用户执行以下功能? –a. 编写一个应用程序以生成和打印帐单 –b. 改变一个已搬家的员工在数据库中的地址 –c. 为一个新职工的工资单创建一个新的用户帐 号 应用程序员 用户 DBA

16 16 Data 数据是 DBMS 的核心 两类数据 – 显然数据 所需数据集合 – 元数据( metadata ) 关于数据库的信息,通常保存在数据字典或目录中 数据字典中的信息包括与用户、权限和数据库内部 的结构有关的信息

17 17 1.1.2 History of Data management File systems –Problems: limited support to definition of data schema, no directly support to DML (Data Manipulate Language), no support to efficient concurrent, secure access etc. Early DBMS –The first commercial DBMS appeared in the late 1960’s, evolved from file systems. –The early DBMS’s used several data models for describing structure of DB: hierarchical model and network model. –Problems: no support to high-level query languages. P2

18 18 History of Data management (cont. ) Relational DBMS –A famous paper by Ted Codd in 1970, “A relational model for large shared data banks” in Comm. ACM. –Data organized as tables called relations. –Unlike the user of early DBS, user of a relational system won’t be concerned with the storage structure, and queries are expressed in a very high-level language (SQL). –Today used in most DBMS's. P4

19 19 Relational Model Based on tables, such as: acct #namebalance 12345Sally1000.21 34567Sue285.48 …… … Attributes (column headers) Tuples (rows) P4

20 20 Query Languages Employee NameDept Department DeptManager SELECT Manager FROM Employee, Department WHERE Employee.name = "Clark Kent” AND Employee.Dept = Department.Dept ;

21 21 History of Data Model Data model: –abstraction of data features in real world into computer world. Hierarchical model 60’s 70's 80's 90’s now Relational model Choice for most new applications Object Bases modelKnowledge Bases model Network model P3

22 22 Relational model or not? Relational model is good for: –Large amounts of data —> simple operations –Navigate among small number of relations Difficult Applications for relational model: –VLSI Design (CAD in general) –CASE: Computer-Aided Software Engineering –Graphical Data Where number of "relations" is large, relationships are complex –Object Data Model –Logic Data Model

23 23 Other Data Models Object data model –Usually find objects via explicit navigation, also query language in some systems Complex Objects – Nested Structure (pointers or references) Encapsulation, set of Methods/Access functions Object Identity Inheritance – Defining new classes like old classes Logic data model –Prolog, Datalog –More power than relational

24 24 The DBMS Marketplace Oracle, SybaseRelational DBMS companies – Oracle, Sybase – are among the largest software companies in the world. DB2IBM offers its relational DB2 system. With IMS, a nonrelational system, IBM is by some accounts the largest DBMS vendor in the world. SQL-ServerMicrosoft AccessMicrosoft offers SQL-Server, plus Microsoft Access for the cheap DBMS on the desktop, answered by “lite” systems from other competitors. Relational companies also challenged by “object-oriented DB” companies. But countered with “object-relational” systems, which retain the relational core while allowing type extension as in OO systems.

25 25 1.2 Architecture of DBMS Major components of a DBMS Data Metadata Storage Manager Query Processor Transaction Manager Schema Modifications QueriesModifications Schema (logical structure of the data); Metadata(data of data)

26 26 Architecture of DBS Three Schema Architecture of DBS External Schema: user schema or subschema –Defines one view of the data as seen by a specific set of application or end users. –There may be many external schemas in a DB. Schema: conceptual schema, logical schema –Defines data from perspective systems designer; –Independent of end users & data storage mechanism –There is only one conceptual schema in a DB. Internal Schema: storage schema –Defines how data is organized, stored and manipulated inside the system. –Totally dependent on particular implementation. –There is only one internal schema in a DB.

27 27 Three Schema Architecture (cont.) Application A External Schema 1 Schema Internal Schema DB Application B Application D Application E Application C External Schema 2 External Schema 3

28 28 Independence of Data and Program Logical Independence –Via Reflection of External Schema/Schema –One Schema corresponds to many External schemas; every Ex-Schema has an Ex-Schema/Schema Reflection. –When Schema changes, DBA changes the Ex- Schema/Schema reflections, so application programs needn’t been changed. Physical Independence –Via Reflection of Schema/Internal Schema –Schema/Internal Schema Reflection is unique. –When Internal Schema changes, DBA changes the Schema/ Internal Schema Reflection, so application programs needn’t been changed.

29 29 各种人员的数据视图 数据表示 应用系统 外模式 模式 内模式 DB DBMS OS 用户 应用程序员 DBA, 系统分析员 数据抽象级别 软件系统层次

30 30 Three Aspects to Studying DBMS's Modeling and design of databases. –Allows exploration of issues before committing to an implementation. Programming –SQL: queries and DB operations like update. –Host language and Embedded SQL DBMS implementation

31 31 Host Languages Host Languages Host language is completely general (Turing complete) but gives you no support. Query language—less general, "non procedural" and optimizable. (Storage) C, C++, Fortran, Java, Delphi, VB etc. Application program Local Vars DBMS Calls to DB (Memory)

32 32 Reading Guide A First Course in Database Systems: –Required: 1.1 –Recommended: 1.2, 1.5 数据库系统概论 – 推荐:第一章

33 33 Exercises (Required, in English) Explain the following notions and give an example to show them clearly. –DB, DBMS, DBS 以下选做: ( 推荐作业,中文完成 ) 逻辑独立性和物理独立性是什么含 义?在数据库系统架构中是如何保证这两个独立性的? ( 建议作业,中文完成 ) 对数据库技术发展趋势、主流数据 库产品、流行数据库开发和设计技术进行调研,撰写小论 文,和同学分组讨论。 http://www.google.com


Download ppt "An Introduction to Database System College of Computer Science and Technology Chongqing University of Posts & Telecom. Spring, 2006."

Similar presentations


Ads by Google