9299.net
大学生考试网 让学习变简单
赞助商链接
当前位置:首页 >> 工学 >>

ch1-introduction

ch1-introduction


Database System
Software College
2011

Course Information
? Course ? Name: Database System (数据库系统) ? 32 hours class room teaching, 8 hours experiments

? Teacher ? Name: wang shuang (王爽) ? E-mail: wangshuang_neu@163.com ? Resource: BB platform
Course Information 2

Why study
? Database Application
?

example

Chapter1 Introduction

3

Database System Applications
? Representative Database Applications
? ? ? ?

?
? ?

Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Online retailers: order tracking, customized recommendations Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions

? Databases touch all aspects of our lives
Chapter1 Introduction 4

Status in computing system
应用系统 应用开发工具

DBMS
操作系统 硬件

编译系统

Chapter1 Introduction

5

? 发展了一门计算机基础学科。
?

以数据模型和DBMS核心技术为主,内容丰富、领 域宽广。

? 形成了一个巨大的软件产业。

Chapter1 Introduction

6

国内数据库市场情况
Microsoft 17.8% Sybase 13.2%
Oracle 39% IBM 26%

其他 4%

人大金仓 1%

0.7% 武汉达梦

数据来源:易观国际 2007年1月 Chapter1 Introduction 7

Commercial Database Systems
Company
Oracle IBM Microsoft Sybase Informix MYSQL

Product
Oracle 10i, etc. DB2, Universal Server Access, SQL Server Adaptive Server Dynamic Server opensource

Remarks
World’s 2nd largest software company CEO, Larry Ellison, world’s 2nd richest World’s 2nd largest after Informix acquisition Access comes with MS Office CEO John Chen Acquired by IBM in 2001

三位图灵奖得主

C.W.Bachman

E.F.Codd

Jim Gray

Charles.W.Bachman
网状数据库之父
? 1960年为通用电气制造了世界上第一个网状数据库系统IDS ? 积极推动与促成了数据库标准的制定:DBTG报告 ? 在数据库技术的产生、发展与推广应用方面都发挥了巨大的作 用 ? 由于他在数据库方面的杰出成就1973获图灵奖 ? 1983年成立自己的公司 Bachman Information System

Edgar F.Codd 博士
关系数据库之父/美国工程院院士
? 原是英国人,1923生于英格兰中部波特兰 第二次世界大战时应征入伍,在皇家空军服役。1942-1945年间任 机长,参与了许多惊心动魄的空战。

? 英国牛津大学数学专业理学士及硕士学位,毕业后到IBM公司工作 从事操作系统和自动机理论研究
? 年近40重返密歇根大学进修计算机与通信专业,1963年获得硕士学 位,1965年又获得博士学位。 ? 60年代后期开始数据库研究, 1970年E.F.Codd 博士提出关系模型概 念(CACM,Vol.13, Vol.6, 1970 ) ? 1981年获图灵奖,84年从IBM公司退休 ? 还创办了一个研究所:关系研究所(The Relational Institute)和一 个公司:Codd & Associations,进行关系数据库产品的研发、销售、 咨询等业务

James (Jim) Gray
数据库技术和事务处理专家
? 1944年生,美国加州大学伯克利分校
计算机科学系博士。 ? ? 先后在贝尔实验室、IBM、Tandem、DEC等公司工作,研究方向转向数据 库领域。 由于他在数据库和事务处理研究方面的元创性贡献以及在将研究原型转化 为商业产品的系统实现方面的技术领袖地位,1998年获奖(时任微软研究 员)

? 2007年1月28日从旧金山港出发,驾驶一艘长40英尺的游艇,前往
Farallon岛途中神秘失踪,至今是一个迷。

数据库:一个巨大的软件产业 ?是理论成果转化为产品的成功范例
理论创立

经济效益

原型研制

产品上市

Database Conference
? Database ? SIGMOD/PODS, VLDB, ICDE ? DASFAA, DEXA, EDBT/ICDT ? NDBC

? Other area(data mining、information retrieve、

knowledge management等)
ACM CIKM, SIGIR, SIGKDD ? PAKDD,
?
Chapter1 Introduction 14

Course content
? Database design

? Basic concept of relational database

Chapter1 Introduction

15

Text Book and Reference
? Text Book
?

Database System Concepts (5th Edition), McGrawHill, 2005
数据库系统概论(第5版),高等教育出版社,2005 A First Course in Database Systems stanford

? Reference
? ?

Course Information

16

Grading Policy
? Attendance:10%

? Assignments: 20%
? Experiments: 20%

? Final Exam:50%

Course Information

17

Chapter 1 Introduction

Contents
? Some concepts ? Purpose of Database Systems ? Data Model ? Database Architecture ? Database Users and Administrators ? Overall Structure

Chapter1 Introduction

19

Database System
? Data
?
?

the symbol to describe the object
Data and semantics can not be divided

? Database(DB) ? Database System(DBMS) ? DBS

Chapter1 Introduction

20

Database System
? DB
?

Collection of interrelated data
? in

long term
be shared

? Structured ? Can

Database (DB): contains information about a particular enterprise

Chapter1 Introduction

21

Database System
? DBMS
?

Set of programs to access the data
Database Management System (DBMS) : Provide a way to store and retrieve database information that is both convenient and efficient Like OS, DBMS is a system software
Chapter1 Introduction 22

Function of DBMS
? Data Definition

? Data manipulation
? Database management
?

Security

?
? ?

Integrity
Concurrent Recovery

? Data organization, storage and management
?

Index,sequence
Chapter1 Introduction 23

用户

用户 应用系统

用户

? DBS(Database System)
?
? ? ?

DB
DBMS Applications DBA

应用开发工具 数据库管理系统 操作系统

数据库管理员

数据库

数据库系统
Chapter1 Introduction 24

Purpose of Database Systems
? In the early days, applications were built

directly on top of file systems
? Using file systems to store and manipulate

data have several drawbacks

Chapter1 Introduction

25

Purpose of Database Systems
? Drawbacks of using file system
?

Cont.

Data redundancy and inconsistency
? duplication ? Eg: ? 人事处

of information in different files

(姓名,年龄,单位,工龄,职务,职称,政治面 貌,籍贯,住址,家庭成员,社会关系等) 工资,特殊津贴等)

? 财务处(姓名,单位,工龄,职称,工龄,基本工资,岗位

? Maintain

cost high

Chapter1 Introduction

26

Purpose of Database Systems
? Drawbacks of using file system
?

Difficulty in accessing data
? Need

to write a new program to carry out each new task
Person info

Example
Names of all person who lives within particular postal-code area Names of all person who is older than 50

Program 1
Program n Program m

Chapter1 Introduction

27

Purpose of Database Systems
? Drawbacks of using file system
?

Cont.

Cont.

Data isolation — multiple files and formats
Saving account Fortran Program 1

Example

Checking account VIP customer

Program n

C Names of all VIP customers who have a checking account

JAVA Program m Program p

Chapter1 Introduction

Banking Application

28

Purpose of Database Systems
? Drawbacks of using file system
?

Cont.

Cont.

Atomicity of updates
? Failures

may leave data in an inconsistent state with partial updates carried out

? Transfer

Example

of funds from one account to another should either complete or not happen at all
200$ 100$
A

(200-100)$ 500$
B

100$ 200$

China Bank

(500+100)$

Chapter1 Introduction 600$

600$ 500$

City Bank

29

Purpose of Database Systems
? Drawbacks of using file system Cont.
?

Cont.

Concurrent access by multiple users
? Concurrent

access is needed for performance

? Uncontrolled

concurrent accesses can lead to inconsistencies people reading a balance and updating it at the same time

? Two

Example 2000-500

2000

2000

2000
1500 1700
Chapter1 Introduction

2000-300
30

Purpose of Database Systems
? Drawbacks of using file system
?

Cont.

Cont.

Security problems
? Hard

to provide user access to some, but not all, data

Database systems offer solutions to all the above problems

Chapter1 Introduction

31

数据库系统特点
? 数据结构化
? 数据共享性高,冗余度低,易于扩充

? 数据独立性高
? 数据由DBMS统一管理和控制

Chapter1 Introduction

32

Data Models
? A collection of tools for describing ? Data ? Data relationships ? Data semantics ? Data constraints ? 数据库用数据模型这个工具来抽象、表示和处

理现实世界中的数据和信息。

Chapter1 Introduction

33

Data models
? Conceptual Data Modeling

? Physical Data Modeling

Chapter1 Introduction

34

Chapter1 Introduction

35

Data Models
? Entity-Relationship data model
?

Cont.

mainly for database design

? Relational model ? Other older models:
? ?

Network model Hierarchical model

? Object-based data models
?

Object-oriented ? Object-relational

? Semistructured data model
?

XML
Chapter1 Introduction 36

Data model
? data model defines how the data is organized

and manipulated in a database
? ? ?

Data structure Operation on the data Constraint on the data

Chapter1 Introduction

37

Conceptual Data Modeling —— The Entity-Relationship Model
? Represented diagrammatically by an entity-

relationship diagram:

Chapter1 Introduction

38

Physical Data Modeling—— Relational Model
? Use a collection of tables to represent both

data and relationships among those data
Each table has several columns Each column has a unique name

Chapter1 Introduction

39

Chapter1 Introduction

40

Data Independence
? One big problem in application development is the

separation of applications from data ? Do I have change my program when I …
? ? ? ? ?

replace my hard drive? store the data in a b-tree instead of a hash file? partition the data into two physical files (or merge two physical files into one)? store salary as floating point number instead of integer? add more data fields to support other applications?

? Solution: introduce levels of abstraction.

Chapter1 Introduction

41

Three-schema architecture
? Schema and instance
?
?

Similar to types and variables in programming languages
Schema – the overall design of the database
? Analogous

to type information of a variable in a program

Chapter1 Introduction

42

View of data
? database system provide an abstract view of

the data
?

Achieved through several level of abstraction
? Physical

level

? Logical
? View

level

level

Chapter1 Introduction

43

Three Levels of Abstraction

ARR Sub schema

SW Dept
Sub schema

Financial Office ..……...
Sub schema

conceptual schema

NEU database

Physical schema

Files on disks

Level of Abstraction
? Physical schema:
describes how a record (e.g., customer) is stored ? e.g., ―Divide the customer records into 3 partitions and store them on disks 1, 2 and 3.‖
?
?

Sequential access ,hash access; Index; compress, encrypt

? (only

one)

Chapter1 Introduction

45

heap

Chapter1 Introduction

46

Sort by sid

Clustering by age

Chapter1 Introduction

47

Level of Abstraction
? Logical level: ? describes what data are stored in the database, and the relationships among the data ? Similar to defining a record type in Pascal or C: Type customer = record
? ? ?

name: string; street: string; city: integer; end;

describe entire database ? Only one
?
Chapter1 Introduction 48

Level of Abstraction
? View level:
?
?

many
The highest level of abstraction describes only part of the entire database.

?
?

Subset of the Logical schema
Security
?A

way to hide: (a) details of data types and (b) information (such as an employee’s salary) for security purposes
Chapter1 Introduction 49

Application

view

View definitions
Logical Data Independence

logical

Logical schema
Physical Data Independence

physical

Physical schema

Chapter1 Introduction

50

Instances and Schemas

Cont.

? Physical Data Independence – application do

not depend on physical schema, and thus need not be rewritten if the physical schema changes
?
?

Applications depend on the logical schema
Physical schema is hidden beneath the logical schema

? Logical data independence
?

users are shielded from changes in the logical structure of the data Introduction Chapter1 51

Database Languages****
? Database system provides
?
?

Data Definition Language (DDL) to specify database schema
Data Manipulation Language (DML) to express database queries and updates

Chapter1 Introduction

52

Data Definition Language (DDL)
? Specification notation for defining the

database schema
Example

create table account (

account-number balance

char(10), integer)

Chapter1 Introduction

53

Data Definition Language (DDL)
? DDL compiler generates tables according to

Cont.

DDL statements and store the schema definitions of these tables in data dictionary ? Data dictionary contains metadata (i.e., data about data)
Database schema ? Integrity constraints ? Authorization
?

Chapter1 Introduction

54

Data Manipulation Language (DML)
? Language for accessing and manipulating

the data organized by the appropriate data model
? ?

Retrieval of information Insertion of new information

Quer y

?
?

Deletion of information
Modification of information

? DML also known as query language
Chapter1 Introduction 55

Data Manipulation Language (DML)
? Two classes of languages
?
?

Cont.

Procedural – user specifies what data is required and how to get those data
Declarative (nonprocedural) – user specifies what data is required without specifying how to get those data

? SQL is the most widely used nonprocedural

query language
Chapter1 Introduction 56

SQL
Example? Find the name of the customer with customer-id 192-837465

Select customer.customer_name from customer where customer.customer_id = ‘192-83-7465’

Chapter1 Introduction

57

Access from application programs
? Application programs generally access

databases through one of
?
?

Language extensions to allow embedded SQL
Application program interface (e.g., ODBC/JDBC) which allow SQL queries to be sent to a database

Open Database Connectivity

JAVA Database Connectivity
Chapter1 Introduction 58

Database Users
Users are differentiated by the way they expect to interact with the system
? Naive users – invoke one of the permanent

application programs that have been written previously
?

Examples, people accessing database over the web, bank tellers, clerical staff

Chapter1 Introduction

59

Database Users
? Application programmers
?
?

are computer professionals who write application programs.
Fourth-generation languages,often include special features to facilitate the generation of forms and the display of data on the screen interact with system through DML calls

?

Chapter1 Introduction

60

Database Users

Cont.

? Sophisticated users ? interact with the system without writing programs. ? form requests in a database query language

Chapter1 Introduction

61

Database Administrator
? Database Administrator ? DBA

? A person who have central control of the

database system, coordinates all the activities of the database system
? Has a good understanding of the enterprise’s

information resources and needs

Chapter1 Introduction

62

Database Administrator
? Database administrator's duties include:
? ? ? ? ? ? ?

Cont.

Schema definition Specifying integrity constraints

Primary job of a database designer More system oriented

Storage structure and access method definition Schema and physical organization modification Granting user authority to access the database Acting as liaison with users

Monitoring performance and responding to changes in requirements

Chapter1 Introduction

63

Questions?

Chapter1 Introduction

64


更多搜索:ch1-introduction

推荐相关:
网站首页 | 网站地图
All rights reserved Powered by 大学生考试网 9299.net
文档资料库内容来自网络,如有侵犯请联系客服。zhit325@qq.com