Lecture 1 Introduction
Lecture 1 Introduction
Lecture 1:
INTRODUCTION
Course Website
• Blackboard IU
• Please check frequently for updates!
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
1
International University, VNU-HCMC
Acknowledgement
• The following slides are referenced from Duke
University.
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
Outline
• Data/ Information/ Knowledge
• Database
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
2
International University, VNU-HCMC
OpenAI – DALL-E
3
International University, VNU-HCMC
https://www.npr.org/sections/goatsandsoda/2023/04/21/1171245878/how-do-you-get-equal-health-care-for-all-a-huge-new-
database-holds-clues 8
4
International University, VNU-HCMC
10
5
International University, VNU-HCMC
Computational challenge
•Moore’s Law:
Processing power doubles every 18 months
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
11
The storage
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
http://www.micronautomata.com/big_data 12
6
International University, VNU-HCMC
13
What is database?
• In computing, a database is an organized collection of
data stored and accessed electronically. Small
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
https://en.wikipedia.org/
14
7
International University, VNU-HCMC
15
•Update data
16
8
International University, VNU-HCMC
manager, …
• Persistency: Balance can’t disappear after a power
outage
• Query: What’s the balance in Homer Simpson’s
account?
• What’s the difference in average balance between
Springfield and Capitol City accounts?
• Modification: Homer withdraws $100; charge accounts
with lower than $500 balance a $5 fee.
17
Sounds simple!
1001#Springfield#Mr. Morgan... ...
00987-00654#Ned Flanders#2500.00
00123-00456#Homer Simpson#400.00
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
• Text files
• Accounts/branches separated by newlines
• Fields separated by #’s
18
9
International University, VNU-HCMC
Query by programming
1001#Springfield#Mr. Morgan... ...
00987-00654#Ned Flanders#2500.00
00123-00456#Homer Simpson#400.00
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
19
20
10
International University, VNU-HCMC
Observations
• There are many techniques—not only in storage and
query processing but also in concurrency control,
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
recovery, etc.
• These techniques get used over and over again in
different applications
• Different techniques may work better in different
usage scenarios.
21
22
11
International University, VNU-HCMC
23
24
12
International University, VNU-HCMC
Early efforts
• “Factoring out” data management functionalities from
applications and standardizing these functionalities is an
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
25
CODASYL
• Query: Who has accounts with 0 balance managed by a branch
in Springfield?
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
13
International University, VNU-HCMC
What’s wrong?
• The best navigation strategy & the best way of organizing the
data depend on data/workload characteristics
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
27
SELECT Account.owner
FROM Account, Branch
WHERE Account.balance = 0
AND Branch.location = 'Springfield'
AND Account.branch_id = Branch.branch_id;
• The programmer specifies what answers a query should
return but not how the query is executed.
• DBMS picks the best execution strategy based on the
availability of indexes, data/workload characteristics, etc.
•Provides physical data independence
28
14
International University, VNU-HCMC
29
30
15
International University, VNU-HCMC
DBMS is multi-user
•Example
get account balance from a database;
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
31
32
16
International University, VNU-HCMC
33
34
17
International University, VNU-HCMC
Recovery in DBMS
•Example: balance transfer
decrement the balance of account X by $100;
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
35
36
18
International University, VNU-HCMC
37
AYBABTU?
“Us” = relational databases
•Most data are not in them!
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
19
International University, VNU-HCMC
Assoc. Prof. Nguyen Thi Thuy Loan, PhD
39
20