Professional Documents
Culture Documents
Sven Helmer
Chapter 1
Introduction
What is a database system (DBS)?
Obviously a system for storing and managing data
You have probably heard about some of the big players:
Introduction(2)
But why use a database system?
Why not just use a file system?
Data Independence
describes how
how a user sees
the data
View 1
describes how
data is structured
View 2
View 3
Logical Level
Physical Level
describes how
data is stored
Data Independence(2)
DBS decouples applications from the structure and
storage schema of the data
Logical data independence
Changes on the logical level have no impact on the
application
Physical data independence
Changes on the physical level have no impact on the
logical level
This is implemented in (almost) all database systems
1
4
5
6
0
1 6
1 7
1 8
Multi-user Synchronization
Multiple users modifying the same data without any
controls can lead to big problems
Recovery
Sometimes database systems crash
Data Integrity
application application
DBMS
(database manage
ment system)
database
database
system
More Details
naive
user
advanced
user
application
programmer
database
administrator
application
interactive
query
precompiler
administration
tool
DML compiler
DDL compiler
query processing
DBMS
database manager
schema manager
multi-user synchr.
error handling
file manager
log files
indexes
database
secondary storage
data dictionary
Data Modeling
Even though a DBS can do a lot, it wont
wash the family dog
cook breakfast
More specifically:
A user has to come up with the requirements of an
application . . .
. . . and specify the data that is to be stored
Data Modeling(2)
Two important concepts for designing database
applications
Data model: determines which constructs are
available for describing data
Provides a language in which to describe the
structure of data
Schema: a concrete description of a particular data
collection
Uses a particular data model for the description
Data Models
Conceptual models:
Entity Relationship Model (ER Model)
Unified Modeling Language (UML)
Logical Model:
Hierarchical model
Network model
Relational model
Object-oriented model
Object-relational model
Semistructured (XML) model
Modeling Steps
aspects of
the real world
manual modeling
conceptual schema
(ER schema)
semi-automatic
transformation
relational
network
object orient.
schema
schema
schema
Database Systems p. 19/567
Example
students
lectures
professors
real world: university
stud no
name
students
conceptual modeling
pers no
professors
name
give
attend
course no
lectures
title
Database Systems p. 20/567
Example(2)
relational schema
students
stud_no name
26120
25403
...
attend
stud_no course_no
Smith
Jones
...
25403
26120
...
5022
5001
...
lectures
course_no
5001
5022
...
title
Introduction to Prog.
Algorithms
...
Database Systems p. 21/567
Summary
Many applications have similar requirements in terms of
data storage
A DBS provides an infrastructure supporting these
applications
Overview of Course
We cover two aspects:
How do you use a DBS and design/develop
applications for DBSs?
What happens behind the scenes in a DBS?
Overview of Course(2)
Content:
Database design
Relational model
SQL
Relational design theory
Physical data storage
Query processing
Transaction management
Recovery
Multi-user synchronization
Distributed databases
Selected topics
(chapter 2)
(chapter 3)
(chapter 4)
(chapter 5)
(chapter 6)
(chapter 7)
(chapter 8)
(chapter 9)
(chapter 10)
(chapter 11)
(chapter 12)
Database Systems p. 24/567