3 DBMS
3 DBMS
• Contents:
– Databases: what and why ?
– Using a DBMS
– The relational data model
– Querying a relational database
– GIS databases
Data, Dataset, Database, DBMS and DB System
• Data
– Is a resource held on paper or in digital format that
serves to record or administer some facts and
description of phenomena of interest.
• Data set (or dataset):
– A homogeneous collection of data normally
describing a single kind of phenomenon
Databases: what and why ?
What is a database ?
• Database
– A collection of interrelated data sets properly
structured by means of, and stored through a DBMS.
(A file containing datasets)
– A collection of inter-related data stored together to
serve one or more applications
– A combination of software and hardware that
makes it possible and convenient to perform tasks
that involve handling large amounts of data
– Textbook : a large, computerized collection of
structured data
Databases: what and why ?
Why use a database ?
• Database characteristics
–Applications oriented
–Data sharing
–Minimum redundancy
–Data integrity
–Secure and reliable
–Database management system -DBMS
Database management system (DBMS), Database
system
• Database management system (DBMS)
A software package that is designed for the purpose of
managing databases. This means, DBMS allows to set-
up, maintain and exploit one or more databases.
• Database system
Combination of a database and its DBMS.
Using a DBMS
A DBMS consists of a set of programs that provide
facilities to set up, use and maintain a database.
• Domain
– A set of atomic values – e.g.: the domain of the real
numbers, the domain of the dates, the domain of
character strings with maximal length 10…
on 18.10.2010 – 15:47 relation Productions had five attributes and 6930 tuples
Terminology
Relation
• Example – Countries
table in
FAOcrops.mdb
– Two candidate keys:
ID, CNAME
Terminology overview
First principles of data extraction:
Tuple selection
Attribute projection
Tuple selection & attribute projection
Table joining
Terminology
Data extraction, Query and Transaction
• Data extraction
The process of acquiring from a data set precisely that data
that is required/wanted/needed.
• Query
Precisely formulated request to extract data from the
database.
• Transaction
Precisely formulated request to make changes to data in the
database (may include data extraction).
Steps:
1. INPUT RELATION
• On which relation is the query based?
• What will be the tuple variable?
2. SELECTION CONDITION
• What is the condition that the selected tuple for the output
must fulfill?
3. OUTPUT RELATION
• What are the attributes in the output?
Querying the database
How to..?
Querying the database
Tuple selection example
Querying the database
Tuple selection example
Terminology
Tuple selection
Observe that some tuples in the input are selected and others are left out.
Querying the database
Attribute projection example
Querying the database
Attribute projection example
Querying the database
Attribute projection example
Terminology
Attribute projection