01 Introduction RDB
01 Introduction RDB
Plan
• 1. Introduction
Lesson 1: • 2. Data management
Introduction to databases • 3. Basic concepts on database
• 4. Relational data model
Nguyễn Thị Oanh
oanhnt@[Link]
SoICT, HUST
1 2
1 2
1. Introduction 1. Introduction
• Major research field with long history (since the • How big is our digital universe?
beginning of computer)
• 90% applications use databases
• Hot jobs in startups, large corporations
• Massive Industry: Oracle, IBM, Microsoft, Google,
AWS
Source: [Link]
3 4
3 4
1
24/2/26
1. Introduction
• Data science knowledge stack
2. Data management
Source: [Link]
6 7
6 7
8 9
8 9
2
24/2/26
Student Lecturer
10 11
10 11
‒ Inconsistent data
Database
‒ Inflexibility Lecturer
Enrollment DBMS Student
‒ Limited data sharing Class
Course
12 13
12 13
3
24/2/26
14 15
14 15
complex operations and procedural logic within the DB. C onceptual Internal M apping
INTERNAL SCHEMA
• Performance INTERNAL LEVEL
(Physical level)
16 17
16 17
4
24/2/26
3. Basic concepts
3.1. Data
3.2. Database
3.3. Data model vs. schema vs. instance
3.4. Database management system (DBMS)
3.5. Database environment
3. Basic concepts 3.6. Database users
21
20 21
22 23
22 23
5
24/2/26
24 25
24 25
3.3. Model vs. Schema vs. Instance 3.3. Model vs. Schema vs. Instance
• Data itself
( « Stud001 », « Nguyen », 1/4/1983, «1 Dai Co Viet », « 1F
Instance VN K50 »)
Instance
26 27
26 27
6
24/2/26
28 29
28 29
Data Data
30 31
30 31
7
24/2/26
• Teacher
‒ List of students in class "124432" for semester 2022.2
‒ Timetable
• Staff
‒ List of students
Database
‒ Success rate for each course
32 33
32 33
‒ Procedures/Manuals
DBMS enable the
database
to be developed
DB DB
34 35
34 35
8
24/2/26
36 37
36 37
38 39
38 39
9
24/2/26
40 41
40 41
Primary key
42 43
42 43
10
24/2/26
Tuples /
Rows/ Cardinality ‒ Each attribute Ai has values belong to domain Di of Ai,
Records =6 denoted by dom(Ai)
DOM(gender) = {'Female', 'Male'}
Degree = 8
44 45
44 45
Both t[Ai] and [Link] (and sometimes t[i]) refer to the value vi in
t for attribute Ai
E.g.: t.student_id = '20220101'
46 47
46 47
11
24/2/26
48 49
48 49
50 51
12
24/2/26
52 53
52 53
54 55
54 55
13
24/2/26
56 57
56 57
clazz_id)
Foreign key
enrollment
subject(subject_id, name, credit, percentage_final_exam) Foreign key
58 59
58 59
14
24/2/26
60 61
60 61
15