ICS 321 Fall 2010
Introduction to Database Systems
- Asst. Prof. Lipyeow Lim
Information & Computer Science Department University of Hawaii at Manoa
8/25/2010 1 Lipyeow Lim -- University of Hawaii at Manoa
Introduction to Database Systems Asst. Prof. Lipyeow Lim - - PowerPoint PPT Presentation
ICS 321 Fall 2010 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 1 Data, Database, DBMS A
8/25/2010 1 Lipyeow Lim -- University of Hawaii at Manoa
A database : a collection of related data.
Represents some aspect of the real world (aka
Logically coherent collection of data Designed and built for specific purpose
Data are known facts that can be recorded and
A data model is a collection of concepts for
A schema is a description of a particular
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 2
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 3
On-line Transaction
Banking Airline reservations Corporate records
On-line Analytical
Data warehouses, data
Business intelligence (BI)
Specialized databases
Multimedia XML Geographical Information
Real-time databases
Special Applications
Customer Relationship
Enterprise Resource
Hosted DB Services
Amazon, Salesforce
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 4
1970 Edgar F Codd (aka “Ted”) invented the relational
Prior 1970, no standard data model.
Network model used by Codasyl Hierarchical model used by IMS
After 1970, IBM built System R as proof-of-concept for
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 5
Swapping data
Difficult to add records
Security & access
Do optimization
Good for small
Run out of pointers
Code your own search
Search on different
Must protect data from
Fault tolerance – crash
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 6
Large datasets Concurrency/ multi-
Crash recovery Declarative query
No need to figure out
Data independence
Reduced application
Data integrity and
Uniform data
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 7
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 8
Storage Storage Manager Buffer Manager Index/file/record Manager Execution Engine Query Compiler Transaction Manager Logging & Recovery DDL compiler Concurrency Control Lock Table Buffers User/Application Database Administrator
A transaction an atomic sequence of database
Each transaction, executed completely, must
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 9
Concurrent execution of user programs is
Interleaving actions of different user programs
DBMS ensures such problems don’t arise: users
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 10
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 11
Scheduling concurrent transactions DBMS ensures that execution of {T1, ... , Tn} is
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 12
DBMS ensures atomicity (all-or-nothing
Idea: Keep a log (history) of all actions carried
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 13
The following actions are recorded in the log:
Log record must go to disk before the changed page!
Log records chained together by Xact id → easy
Log is often duplexed and archived on “stable”
All log related activities (in fact, all CC related
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 14
8/25/2010 Lipyeow Lim -- University of Hawaii at Manoa 15