Introduction to Database System

advertisement
Database Management System
Chapter 1: Introduction
Adisak Intana
Lecturer
Table Contents
Enterprize, data and information
File processing system
Database system
DBA
Query Languages
Introduction to Database System
2
Enterprize, data and information

An enterprise is a generic term for any
resonably self-contained commercial,
scientific, technical, or other organization.

Examples of enterprize : university, department
store, hospital, sale product company
Introduction to Database System
3
Enterprize, data and information
(Cont.)
Business areas and application systems
Sale Product Company
Marketing
Department
Supplier
Order System
Personnel
Department
Customer Order
System
Payroll
System
Introduction to Database System
IS
Department
Applications
Development System
Accounting
Department
Accounting
System
4
Enterprize, data and information
(Cont.)
Application systems and application programs
Supplier
Order System
Customer Order
System
Payroll
System
Applications
Development System
Accounting
System
Application systems
Application programs
Introduction to Database System
5
Enterprize, data and information
(Cont.)
Data Processing
Application program
&
data
Data processing
Information
Introduction to Database System
6
Enterprize, data and information
(Cont.)
Data and information
Data
Conversion
Information
Decision
Request
Knowledge Interpretation
Introduction to Database System
7
Enterprize, data and information
(Cont.)
Data and information
Data
Conversion
Information
Decision
Request
Knowledge Interpretation
Introduction to Database System
8
Data and information

Often the terms data and information are used
interchangeably, but they are different.


Data are raw, unsummarized, and unanalyzed facts.
Information is data that have been processed into
meaningful form.
Introduction to Database System
9
Information system
An information system is a system that
supplies the information needed by an
organization or enterprise.
Introduction to Database System
10
Data processing


Most application programs need to store
data that can be retrieved later.
Most programming languages have the
ability to create and store data in
separate files.
Introduction to Database System
11
File system

ข้อมูลจำนวนไม่มำก อำจสำมำรถเก็บไว้ในแฟ้ มเอกสำร แยกเป็ นเรื่ องๆ โดย
เนื้อหำที่จดั เก็บในแต่ละแฟ้ มจะเป็ นข้อมูลที่เกี่ยวข้องกัน เช่น
–
แฟ้ มข้ อมูลคนไข้ ของโรงพยาบาล ประกอบด้วยข้อมูลคนไข้ เช่น ชื่อ สกุล ที่อยู่
ประวัติกำรรักษำ เป็ นต้น แฟ้ มแต่ละแฟ้ มเก็บข้อมูลคนไข้หนึ่งคน
–
แฟ้ มข้ อมูลพนักงานขององค์ กร ประกอบด้วย ประวัติพ้นื ฐำนของบุคลำกร ประวัติ
กำรทำงำน เงินเดือน เป็ นต้น กำรเก็บแฟ้ มข้อมูลพนักงำนอำจจะมีกำรแยกกลุ่ม
แฟ้ มข้อมูลไปตำมแผนก และเรี ยงลำดับแฟ้ มตำมชื่อ สกุลของพนักงำนเพื่อควำม
สะดวกในกำรสื บค้นข้อมูล
Introduction to Database System
12
File system (Cont.)

กำรเก็บข้อมูลด้วยคอมพิวเตอร์ ในช่วงแรกเริ่ ม เป็ นกำรเลียนแบบกำรทำงำน
ด้วยมือ นัน่ คือนำเอกสำรต่ำงๆมำพิมพ์เก็บไว้ในคอมพิวเตอร์ และมีกำรจัดเก็บ
แยกเป็ นแฟ้ มข้อ มู ล แต่ ล ะแฟ้ มข้อ มู ล เก็ บ ข้อ มู ล 1 เรื่ อ ง เรี ย กว่ำ “ระบบ
แฟ้มข้ อมูล” (File system)
Introduction to Database System
13
File System (Cont.)
Introduction to Database System
14
File system (Cont.)
Introduction to Database System
15
Drawback of file system

Uncontrolled duplication of data (data
redundancy)
 Wastes space
 Hard to update all files
 Inconsistent data
Introduction to Database System
16
Drawback of file system (Cont.)
Sales Department
Personal
Department
Employee file
Sales Person file
Introduction to Database System
17
Drawback of file system (Cont.)
Sales Department
Personal
Department
Employee file
Sales Person file
Wastes space
Hard to update
Inconsistent
Introduction to Database System
18
Drawback of file system (Cont.)

Inflexibility
Hard to access unexpected information
 Excessive programs maintenance

Introduction to Database System
19
Drawback of file system (Cont.)
Hard to access unexpected
information
Sales Department
Sales Person file
Introduction to Database System
20
Drawback of file system (Cont.)

Limited data sharing

Same data is scattered in various files which
may be in different format.

Difficult to use data from these existing files for
new programs
Introduction to Database System
21
Drawback of file system (Cont.)
Difficult to use data from these
Sales Department
existing
files for new programs
Same data may be in Different
format
Personal
Department
Employee file
Sales Person file
Integer
Character
Introduction to Database System
22
Drawback of file system (Cont.)

Data dependence problem

Application programs are dependent upon the
structure of files and data structures they
processed.

Changes of files and/or data structures result in
recompiling the application programs.
Introduction to Database System
23
Database system
CUSTOMER
EMPLOYEE
SALE
Staff
recruitment
system
Personal
Department
Customers’
orders system
Sales
accounting
system
Sales
Department
Database
Introduction to Database System
24
Database Processing
 The
main problem of database
processing is security of data in the
database is.
Introduction to Database System
25
Database system
Staff
recruitment
system
CUSTOMER
DBMS
EMPLOYEE
SALE
Personal
Department
Customers’
orders system
Sales
accounting
system
Sales
Department
Database
Introduction to Database System
26
Database Processing using DBMS
 Not
allow any application program
directly access the database.
Introduction to Database System
27
Database Administration
 Resources
in database environment are :
– Database
– DBMS
– Related software
 Administering these resources is the
responsibility of the database
administrator (DBA)
Introduction to Database System
28
Database administrator
Responsible for all the activities of the
database system environment.
 Has a good understanding of the enterprise’s
information resources and needs.
 Has a good knowledge and understanding of
database technology.

Introduction to Database System
29
Database administrator

Database administrator's duties :
–
–
–
–
–
Design and define of database schema and
subschema
Define storage structure and access method
Modify schema and physical database organization
Define authorization and database security
Define integrity constraints
Introduction to Database System
30
Database administrator

Database administrator's duties (cont.) :
–
–
–
–
–
Ensure data availability and recovery from failures
Monitoring performance and responding to changes in
requirements
Tuning database to ensure adequate performance as user
requirements change.
Provide effective use of DBMS
Acting as liaison with users
Introduction to Database System
31
Classification and functions of DBAs

Database designer
–
Collects and identifies the data and their
relationships to be stored in the database.
–
Design the conceptul, logical, and physical
database structure.
Introduction to Database System
32
Classification and functions of DBAs

Database manager
–
–
–
–
Determines and grants authorized users to access the
database.
Defines view of the database to be manipulated by
authorized users.
Sets integrity constraints of business ruls for security,
privacy, and integrity control.
Provides education and training of database technology to
users.
Introduction to Database System
33
Classification and functions of DBAs

DBMS administrator
–
Applies appropriate physical database structure.
–
Provides effective use of DBMS.
–
Provides any available tools that could make the
users’ community more productive.
Introduction to Database System
34
Accessing database
Programmer/DBA
Programmer/
System analyst
Knowled worker/
End-users
User interface
High-level tools
Database management system
Introduction to Database System
35
Query Languages

Data Definition Language : DDL
–
–
–

CREATE
ALTER
DROP
Data Manipulation Language : DML
–
–
–
–
SELECT
INSERT
UPDATE
DELETE
Introduction to Database System
36
Query Languages

Data Control Language : DCL
–
–
–
–
GRANT
REVOKE
COMMIT
ROLLBACK
Introduction to Database System
37
Download