CSC10006_Chapter 1_Overview of DB Systems_II.2425
CSC10006_Chapter 1_Overview of DB Systems_II.2425
Chapter 1
Overview of Database Systems
Instructor: Vũ Thị Mỹ Hằng, Ph.D. ([email protected])
Lab Assistants: Tiết Gia Hồng, M.Sc. ([email protected])
Lương Hán Cơ, M.Sc. ([email protected])
4.0
fit@hcmus
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
2
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
3
4.0
fit@hcmus
Databases: WHAT and WHY?
4
4.0
fit@hcmus
Databases: WHAT and WHY?
5
4.0
fit@hcmus
Databases: HOW
Real business &
application (marketing,
production, banking, …)
Database Design Process
support automation?
Computers
6
4.0
fit@hcmus
Databases: HOW
Real business &
application (marketing,
production, banking, …)
Database Design Process
Analyze &
Design
Implementation
DBMS
Computers
Database Application 7
4.0
fit@hcmus
Database Design Process
Database languages
SQL
Relational Algebra
HOW to represent data Relational Calculus
structures and their (& Integrity Constraints)
characteristics, relations,
constraints, etc.?
HOW to define,
Data models operate, and
Entity Relationship Model manipulate (relational)
Relational Model database?
Object-oriented Model z
Network Model
…
8
4.0
fit@hcmus
Definition
9
4.0
fit@hcmus
Example 1 – Course Management
10
4.0
fit@hcmus
Example 2 – Project Management
4.0
EMPLOYEE LName MName FName SSN BirthDate SuperSSN DNo
Tran Hong Quang 987987987 03/09/1969 987654321 4
Nguyen Thanh Tung 333445555 12/08/1955 888665555 5
Nguyen Manh Hung 666884444 09/15/1962 333445555 5
Tran Thanh Tam 453453453 07/31/1972 333445555 5
12
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
13
4.0
fit@hcmus
Evolution of Database Systems
4.0
14
4.0
fit@hcmus
Evolution of Database Systems
4.0
15
4.0
fit@hcmus
Disadvantages of File Processing
q Program-Data Dependence
q Duplication of Data
q Lack of Security and Limited Data Sharing
q Expensive and Lengthy Program Development
q Excessive Program Maintenance
16
4.0
fit@hcmus
Database Systems
4.0
q Central repositories of shared data
q Data is stored, processed, and managed in a suitable and
standardized manner
q Data is managed by a controlling agent
è Requires a Database Management System (DBMS)
17
4.0
fit@hcmus
Database Systems
Users/Programmers
Applications/Queries
DBMS
Query/Program
Processing
Data Accessing
Catalog Database
Database
Definition
DB system
18
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
19
4.0 Self-Describing
fit@hcmus (Meta-data)
q A catalog called “metadata” contains information such
as the structure of data, type and storage format of
data items, and constraints on the data.
20
4.0 Isolation
fit@hcmus
(Program-Data independence)
q The structure of data is stored in catalog separately
from the access programs.
Program Program
Catalog/metadata
Isolation Isolation
Catalog/metadata
Data Data
21
4.0 Data Abstraction
fit@hcmus
(Conceptual-Logical-Physical Levels)
22
4.0 Data Abstraction
fit@hcmus
(Conceptual-Logical-Physical Levels)
q A DB has many users who may require a different
perspective or view of the database.
q Example of (user) views:
§ A subset of the database.
§ Aggregate data that are derived from the database.
Data SINHVIEN
23
4.0 Sharing Data
fit@hcmus
(Multiusers)
q A multiuser DBMS: Allows multiple users to access
the DB at the same time.
§ Data for many applications are integrated and maintained
in a single DB.
§ Using concurrency control mechanisms to access the
data reasonably
§ Ensure the data will always be valid when they are
accessed.
25
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
26
4.0
fit@hcmus
DBMS
q A collection of programs that enables users to
create, operate, and maintain a database.
§ Definition: Specifying the data types, structures, and
constraints for the data.
§ Construction: Storing the data itself on some storage
medium.
§ Manipulation: Querying the database to retrieve data,
updating the database to reflect changes, generating
reports from the data.
§ Sharing: Allowing multiple users/programs to access the
database concurrently.
27
4.0
fit@hcmus
DBMS Functions
29
30
q Increased costs
q Management complexity
q Maintaining currency
q Vendor dependence
q Frequent upgrade/replacement cycles
31
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
32
4.0
fit@hcmus
Recall: DB Design Process
Database languages
SQL
Relational Algebra
HOW to represent data Relational Calculus
structures and their (& Integrity Constraints)
characteristics, relations,
constraints, etc.?
HOW to define,
Data models operate, and
Entity Relationship Model manipulate (relational)
Relational Model database?
Object-oriented Model z
Network Model
…
33
4.0 Recall: DB Design Process
fit@hcmus
HOW to represent data structures and their
characteristics, relations, constraints, etc.?
DATA MODEL
Real s
e
world Data Modeling it liz
u
DBMS
34
4.0 Data Models
fit@hcmus
Data model
Mô hình dữ liệu
Is described by
Specific
domain Database schema
Lược đồ CSDL
Is described by
Database instance
(Một thể hiện của) CSDL
35
4.0 Data Models
fit@hcmus
36
4.0 Data Models
fit@hcmus
q Categories:
§ High-level (or conceptual) models: Provide concepts that
are close to the way (business) users perceive data (ER
model, object-oriented model, etc.).
§ Implementation (or logical) data models: Provide concepts
that are understood by end users, but not too far from the
way data is organized within the computer (relational
model, network model, etc.).
§ Low-level (or physical) data models: Provide concepts that
describe the details of how data is stored in the computer.
37
4.0 Examples of Data Models
fit@hcmus
38
4.0 Database Schema
fit@hcmus
Data model
Mô hình dữ liệu
Is described by
Specific
domain Database schema
Lược đồ CSDL
Is described by
Database instance
(Một thể hiện của) CSDL
40
4.0 Example of (Relational) Database
fit@hcmus
Schema
41
4.0 Example of Object-Oriented
fit@hcmus
Database Schema
Student
Name Course
Grade study
Name
Major
1..* 0..* Number
planSchedule()
printReoord() 1
Mark
LabMark open
LectureMarrk
ProjectMark
0..*
UpdateMark()
Subject
Name
+pre
Faculty
NoOfCredits 0..*
UpdateCredit()
0..* Constraint
+post
42
4.0 Example of Network Database
fit@hcmus
Schema
Student Subject
PreSubject
Subject_Open
PostSubject
Student_Mark
Course Constraint
Result_Course
Result
43
Example of Hierarchical Database
Schema
Result
Level 1: LabMark LectureMark
Course Student
Level 2: Name Grade Major
Name Number
Subject
Level 3:
Name Faculty NoOfCredits
44
4.0 Database Instances
fit@hcmus
Data model
Mô hình dữ liệu
Is described by
Specific
domain Database schema
Lược đồ CSDL
Is described by
Database instance
(Một thể hiện của) CSDL
45
4.0 Example of a (Relational) DB Instance
fit@hcmus
The (relational) database
schema of the database
Student Management
Is described by
46
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
47
4.0
fit@hcmus
Databases Design Process
Database languages
SQL
Relational Algebra
HOW to represent data Relational Calculus
structures and their (& Integrity Constraints)
characteristics, relations,
constraints, etc.?
HOW to define,
Data models operate, and
Entity Relationship Model manipulate (relational)
Relational Model database?
Object-oriented Model z
Network Model
…
48
4.0
Data Languages
fit@hcmus (for Relational Model)
q High-level (practical) language
§ Entered interactively from a display monitor/terminal or
embedded in a general-purpose programming language.
§ E.g.: SQL Standard (extension: T-SQL, PL/SQL).
49
4.0 SQL Standard
fit@hcmus
52
4.0
fit@hcmus
Content
q Introduction of databases
q Evolution of database systems
q Characteristics of the database approach
q Database management systems (DBMS)
q Data models
q Database languages
q Database users
53
4.0 Database Administrator
fit@hcmus
q Responsibility
§ Administering the DB
§ Authorizing access to the DB
§ Coordinating and monitoring the use of DB
§ Acquiring software and hardware resources as needed
54
4.0 Database Designer
fit@hcmus
q Responsibility
§ Identifying the data to be stored in the DB
§ Choosing appropriate structures to represent and store
the DB
§ Communicating with all DB users to understand their
requirements, to produce a design that meet the
requirements.
q Can be
§ Staff of the DBA
§ Other staffs taking responsibilities after the DB
designed is completed
55
4.0 End User
fit@hcmus
q Categories
§ Casual end user
§ Naïve or parametric end user
§ Sophisticated end user
56
4.0
fit@hcmus
57