,Lecture I :
introduction
A database CDB) is a collection of data with :
-
a certain logical structure
specific semantics
'
a
specific
-
a users
group of
A database ( DBMS)
management system allows to :
create modify and manipulate database
-
. a
coetrieve) the data using language
'
greenery a
query
support persistent large of data
-
storage of amounts
-
enable durability and
recovery from failure
-
control access to the data
by many users in parallel
without unexpected interactions ( isolation)
'
among users
actions partial ( atomicity)
'
on the data should never be
Motivation for Database Management systems
why not store data in files ?
no
language
-
greenery
Ceimiled directories )
'
weak logical structure to
no efficient access
-
file
searching through large hours
'
a can take
no limited protection
-
or from data loss
no parallel manipulation data
-
access control for of
ANSI SPARC Architecture
Motivation for DBMS :
data independence
'
logical view the data independent physical storage
-
on of
-
user interacts with a simple view on the data
( invisible Ofer )
behind the the
storage structures
'
scenes to are complex
that allow rapid access and manipulation
avoidance duplication
-
of
different views on the same database
-
different users lappli cations
'
for
hiding parts the data for privacy or
security
-
of
This is achieved by the ANSI SPARC Architecture
,ANSI SPARC Architecture : 3 levees
-
different applications might use different
views
data stored physical ( good for
'
once at level
consistency)
view level :
application hide details
-
programs of data types
information
'
hide for privacy or
security
( conceptual schema)
Logical
:
level
describes data stored in database
'
the ,
describes relations data
-
among
Physical level :
how the data is stored
-
disk index record order
'
pages , structures , byte layout ,
This ensures and physical data independence
logical
Data independence
Logical data independence is the ability to modify the
logical schema without
breaking existing applications
applications views
logical database
'
access the , not the
Physical data independence is the ability to modify the physical schema
without
changing the logical schema
workload might cook need
e
change in the for
a :
-
g
- .
different indexing structures
'
different database
engine
'
distributing the database on multiple machines
"
Relational Model
in this course , we work with relational databases
view and level relations
logical represent data as 1 tables
in the pure relational model ,
a table is a
set of tuples :
crows)
'
has no duplicate tuples
-
no order on the tuples
, Relational Model :
schema
Database schema =
structure of the database .
: relations + constraints
)
'
Database instance content C database
'
=
actual State of the at some moment
/
Structured
Query Language
Motivation for database
management systems :
high level declarative
-
query languages
'
greenery tells what you want , independent of storage structure
efficient ( automatic optimisation)
'
data access
query
Declarative
greenery languages
:
describe what information is
sought
'
prescribe desired information
-
not now to retrieve the
imperative vs Declarative Languages
( Kowalski )
Algorithm logic +
=
control
imperative earrgeeages
:
Declarative ecerrgeeages :
control implicit
'
explicit control
-
implicit logic explicit
'
logic
-
(
e.g .
logic programming Prolog)
SQL ( Haskell)
functional programming
A declarative data manipulation ( HTML)
markup languages
language .
the user describes conditions
the requested data is required to ceeefill .
More concise imperative languages
:
than
expensive
-
less program development
easier maintenance
-
Database system will optimise the
query
:
decides possible
-
now to execute the fast
greenery as as
users casually) do need think about efficiency
-
not to
Data Models &
Integrity constraints
Motivation for DBMS :
defined constraints
well data models & data
integrity
- -
relational model
-
meta
language for describing
-
data
-
data relationships
-
-
data constraints
SQL can be used for table and constraint definitions
introduction
A database CDB) is a collection of data with :
-
a certain logical structure
specific semantics
'
a
specific
-
a users
group of
A database ( DBMS)
management system allows to :
create modify and manipulate database
-
. a
coetrieve) the data using language
'
greenery a
query
support persistent large of data
-
storage of amounts
-
enable durability and
recovery from failure
-
control access to the data
by many users in parallel
without unexpected interactions ( isolation)
'
among users
actions partial ( atomicity)
'
on the data should never be
Motivation for Database Management systems
why not store data in files ?
no
language
-
greenery
Ceimiled directories )
'
weak logical structure to
no efficient access
-
file
searching through large hours
'
a can take
no limited protection
-
or from data loss
no parallel manipulation data
-
access control for of
ANSI SPARC Architecture
Motivation for DBMS :
data independence
'
logical view the data independent physical storage
-
on of
-
user interacts with a simple view on the data
( invisible Ofer )
behind the the
storage structures
'
scenes to are complex
that allow rapid access and manipulation
avoidance duplication
-
of
different views on the same database
-
different users lappli cations
'
for
hiding parts the data for privacy or
security
-
of
This is achieved by the ANSI SPARC Architecture
,ANSI SPARC Architecture : 3 levees
-
different applications might use different
views
data stored physical ( good for
'
once at level
consistency)
view level :
application hide details
-
programs of data types
information
'
hide for privacy or
security
( conceptual schema)
Logical
:
level
describes data stored in database
'
the ,
describes relations data
-
among
Physical level :
how the data is stored
-
disk index record order
'
pages , structures , byte layout ,
This ensures and physical data independence
logical
Data independence
Logical data independence is the ability to modify the
logical schema without
breaking existing applications
applications views
logical database
'
access the , not the
Physical data independence is the ability to modify the physical schema
without
changing the logical schema
workload might cook need
e
change in the for
a :
-
g
- .
different indexing structures
'
different database
engine
'
distributing the database on multiple machines
"
Relational Model
in this course , we work with relational databases
view and level relations
logical represent data as 1 tables
in the pure relational model ,
a table is a
set of tuples :
crows)
'
has no duplicate tuples
-
no order on the tuples
, Relational Model :
schema
Database schema =
structure of the database .
: relations + constraints
)
'
Database instance content C database
'
=
actual State of the at some moment
/
Structured
Query Language
Motivation for database
management systems :
high level declarative
-
query languages
'
greenery tells what you want , independent of storage structure
efficient ( automatic optimisation)
'
data access
query
Declarative
greenery languages
:
describe what information is
sought
'
prescribe desired information
-
not now to retrieve the
imperative vs Declarative Languages
( Kowalski )
Algorithm logic +
=
control
imperative earrgeeages
:
Declarative ecerrgeeages :
control implicit
'
explicit control
-
implicit logic explicit
'
logic
-
(
e.g .
logic programming Prolog)
SQL ( Haskell)
functional programming
A declarative data manipulation ( HTML)
markup languages
language .
the user describes conditions
the requested data is required to ceeefill .
More concise imperative languages
:
than
expensive
-
less program development
easier maintenance
-
Database system will optimise the
query
:
decides possible
-
now to execute the fast
greenery as as
users casually) do need think about efficiency
-
not to
Data Models &
Integrity constraints
Motivation for DBMS :
defined constraints
well data models & data
integrity
- -
relational model
-
meta
language for describing
-
data
-
data relationships
-
-
data constraints
SQL can be used for table and constraint definitions