part1 background chapter 01- introduction to database system lu wei college of software and...

40
Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microele ctronics Northwestern Polytechnical Unive rsity Database Systems

Upload: eleanor-wilkinson

Post on 29-Dec-2015

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Part1 BackgroundChapter 01- Introduction to Database System

Lu Wei

College of Software and Microelectronics

Northwestern Polytechnical University

Database Systems

Page 2: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 2

Outline

• Introduction• Origin and development of database• Key concepts in database systems• Components of the DBMS environment• Characteristics of database approach• Advantages and disadvantages of DBMS

Page 3: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 3

Outline

• Functions of DBMS• Components of DBMS• Client-Server Architecture of DBMS • Examples of database systems• Research fields in database technology

Page 4: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 4

Introduction

• Impact on economic development– The history of database system research is one of

exceptional productivity and startling economic impact.

– Achievements in database research underpin fundamental advances in communications systems, transportation and logistics, financial management, knowledge-based systems, accessibility to scientific literature, and a host of other civilian and defense applications.

Page 5: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 5

Introduction

– They also serve as the foundation for considerable progress in the basic science fields ranging from computing to biology.

(Silberschatz et al., 1990,1996)

Page 6: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 6

Introduction

• Application and development of database technology– C

hina Information Technology Application Blue Paper(2007-2008) - Chapter 8

Page 7: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 7

Introduction

• Database applications in day-to-day life– Purchases from the supermarket– Using the local library– Reserving tickets on line– Using the Internet– …

Page 8: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 8

Origin and development of database

• Database approach is now the most effective approach for data management. It is necessary for us to review it’s predecessors although these approaches are largely obsolete.

• The approach for data management has gone through three stages – manual management, file-based system, database system.

Page 9: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 9

Origin and development of database

• Manual management– Used before 1950s– Application background: science computation– Hardware condition: punch tape, punch card,

magnetic tape, no disk– Software condition: no OS, no software for data

management, batch mode for data process– Limitations: data and program are dependent, data

are managed by each application, no need to save data long time, no shared data

Page 10: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 10

Origin and development of database

Data 1

Data 2

Data n

Program 1

Program 2

Program n

Figure 1-1 phase of manual management

Page 11: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 11

Origin and development of database

• File-based System– A collection of application programs that perform

services for the end-users such as the production of reports. Each program defines and manages its own data.

– Used between 1950s and 1960s– Application background: science computation, data

management– Hardware condition: disk, drum

Page 12: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 12

Origin and development of database

– Software condition: have special data management software - file systems in OS, real time process data online (besides batch)

– Limitations: data are separate and isolated, uncontrolled duplication of data, data and program are dependent, incompatible file formats

Page 13: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 13

Origin and development of database

File1

File2

Filen

Prog1

Prog2

Progn

File System

Figure 1-2 phase of file system

Page 14: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 14

Origin and development of database

• Database system– Used since 1960s– Application background: large scale data

management– Hardware condition: disk with large capacity, the price

of hardware falls down– Software condition: a unified special data

management software – database management system appeared

Page 15: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 15

Origin and development of database

Database

Prog1

Prog2

Progn

DBMS

Figure 1-3 phase of database system

Page 16: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 16

Key concepts in database systems

• Data – Data are raw facts that describe people, objects, and

events.

• Information – Information are images that denote the status of

objects and its’ evolvement.

Page 17: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 17

Key concepts in database systems

• Database – A shared collection of logically related data, and a

description of this data, designed to meet the information needs of an organization.

– Related – Integrated or shared– Structured – Keep data long time– Large quantities of data

Page 18: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 18

Key concepts in database systems

• Database Management System (DBMS)– A software system that enables users to define, creat

e, maintain, and control access to the database.– DBMS is the interface between the user’s application

programs and the database– Oracle, DB2, SQLServer, MySQL, Sybase, PostgreS

QL,…

Page 19: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 19

Key concepts in database systems

• History of Database Management Systems– DBMS has its roots in the 1960s Appllo moon-landing

project.– NAA(美国北美航空公司 ), the prime contractor for the

project, developed software known as GUAM (Generalized Update Access Method). It is a hierarchical structure.

– 1960s, IBM joined NAA to develop GUAM into IMS (Information Management System)

Page 20: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 20

Key concepts in database systems

– Mid-1960s,IDS (Integrated Data Store) emerge from General Electric. It is a network DBMS.

– 1970, E.F,Codd of IBM Research Laboratory produced his high influential paper on the relational data model.

– System R project at IBM San Jose Research Laboratory in California

• structured query language (SQL) become standard language for relational DBMSs;

• DB2, SQL/DS, Oracle, …

Page 21: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 21

Key concepts in database systems

• Database system– A database system is developed to support the operat

ions of a specific organization or a specific set of applications.

– A Database System consists of :• an application specific database • the DBMS that maintains that database • the application software that manipulates the database

– Figure 1-4 illustrates a simplified database-system architecture.

Page 22: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 22

Key concepts in database systems

Figure 1-4 database-system architecture

Page 23: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 23

Components of the DBMS environment

• Hardware – The DBMS and the applications require hardware to

run. The hardware can range from a single personal computer, to a single mainframe, to a network of computers.

– Disk space– Main memory– …

Page 24: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 24

Components of the DBMS environment

• Software – DBMS– Operating system– Application programs– High language which interface with the database and

it’s complier system– Network software (sometimes)

Page 25: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 25

Components of the DBMS environment

• Roles– Data and Database Administrators (DA and DBA)– Database Designers

• Logical Database Designers• Physical Database Designers

– Application Developers– End-Users

• Naïve users• Sophisticated users

Page 26: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 26

Characteristics of database approach

• Data Abstraction– DBMSs allow data to be structured in ways that make

it more understandable and meaningful to the applications than the ways data are physically stored on disks.

– The DBMS stores the structure of the data as part of the description of the database in the system catalog, separately from the application programs.

Page 27: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 27

Characteristics of database approach

• Reliability– DBMSs provide high reliability by

1) enforcing integrity constraints• Integrity constraints reflect the meaning (or, the semantics)

of the data and of the application. • Data type of each data item - An alphanumeric character str

ing of maximum length 10

2) ensuring data consistency • When the system fails, DBMSs guarantee data consistency;

that is, interrupted update operations do not corrupt the database with values that violate the integrity constraints and no data in the database is lost.

Page 28: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 28

Characteristics of database approach

• Efficiency – DBMSs support both efficient space utilization and effi

cient access to data. – By making use of the data description in the catalog,

DBMSs are able to minimize data redundancy, which in turn saves both space and processing time.

– DBMSs enhance the performance of queries by means of optimizations and the use of access methods to data based on their values.

– DBMSs decrease response time of transactions by allowing multiple users to access the database concurrently.

Page 29: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 29

Advantages and disadvantages of DBMS

• Advantages of DBMS– Control of data redundancy– Data consistency– More information from the same amount of data– Sharing of data– Improved data integrity– Improved security– …

Page 30: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 30

Advantages and disadvantages of DBMS

• When Is a Database Management System Needed? – Large quantities of related data need to be stored– Require efficient data sharing among many users – Security and access control is crucial– Require a real quality of service to be a part – …

Page 31: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 31

Advantages and disadvantages of DBMS

• Disadvantages of DBMS– Complexity– Size– Cost of DBMSs– Additional hardware costs– Cost of conversion– Performance– High impact of failure

Page 32: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 32

Advantages and disadvantages of DBMS

• All the services and guarantees that a database management system offers us incur some overhead cost—nothing is free. – DBMS need to be buy– DBMS require some minimum hardware configuration– Learning to use and maintain a DBMS

• Whether a database management system is a good environment worth purchasing for a given application depends on the functional requirements of the application.

Page 33: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 33

Advantages and disadvantages of DBMS

• When Is a Database Management System Not Needed? – The data has a simple structure and its size is small. – The application, although simple and unchanging, has

a special purpose. – Concurrent access to data by multiple users is not req

uired.

Page 34: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 34

Functions of DBMS

• Data storage, retrieval, and update• A user-accessible catalog• Transaction support• Concurrency control services• Recovery services• Authorization services• Support for data communication• Integrity services• Services to promote data independence• Utility services

Page 35: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 35

Components of DBMS

Application programs

Queries Database schema

DML preprocessor

Query processor

DDL compiler

Program object code

Database manager

Dictionary manager

File manager

Access methods

System buffers

Database and

system catalog

DBMS

Figure 1.5 Major components of a DBMS

Page 36: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 36

Components of DBMSProgram

object codeQuery

processorCatalogmanger

Authorizationcontrol

Commandprocessor

Integritychecker

Queryoptimizer

Transactionmanager Scheduler

Buffermanager

Recoverymanager

Filemanager

Accessmethods

Systembuffers

Database and system catalog

Data manager

Figure 1.6 Components of a database manager

Page 37: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 37

Client-Server Architecture of DBMS

• We will discuss the architecture of DBMS in detail in chapter 12

Figure 1.7 Client-server architecture

LAN

Client1

Client2

Client3

Server(with DBMS)Database

Requests for data Selected data returned

Page 38: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 38

Examples of database systems

• A Library Database System• An E-Store Database System

Page 39: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 39

Research fields in database technology

• Research and develop or improve the DBMS and related middleware

• Database design– methodology– tools– theory– Standard and criterion

• Theory of database– Normalization– Knowledge Discovery from Database (KDD), …

Page 40: Part1 Background Chapter 01- Introduction to Database System Lu Wei College of Software and Microelectronics Northwestern Polytechnical University Database

Lu Wei 40

Summary

• In this chapter you should have learned:– The development of the approach for data

management and it’s three stages– The concepts of database, DBMS, Database System– Characteristics of database approach– Advantages and disadvantages of DBMS– The main components and functions of DBMS