Lecture 3 Databases and DBMS Relational Data Model
Lecture 3 Databases and DBMS Relational Data Model
▪ Technological trends
▪ GIS
▪ Databases
▪ Database and DBMS
▪ Users & Interaction with a database (incl. GIS and DBMS)
▪ Spatial DBMS
▪ Wirth's law:
▪ Wired
▪ from 56 kbps (standard dial-up modem) to 1Gbps (fibre optic cable)
▪ Wireless
▪ Bluetooth (up to 3 Mbps)
▪ Wifi (throughput up to 54 Mbps)
▪ Mobile
▪ protocol (up to 20 Mbps)
TECHNOLOGICAL TRENDS
HDW & SFW & NET
1946 2010
GEOGRAPHIC INFORMATION SYSTEM (GIS)
WHAT IS GIS?
• web browser
User interface
• GIS application GUI
Application logic
• GIS server/desktop application
Data storage
• GIS files
• DBMS
DATABASES
• etc.
DATABASE
• A database is a large,
computerized collection of
Database
structured data.
• The data is structured in
tables.
• One such table is called a
relation.
• Relationships connect
tables into structure.
DATA, INFORMATION AND
KNOWLEDGE
• Data
• A resource held on paper or in digital format
that serves to record or administer some facts
and description of phenomena of interest.
• Information
• Data resource(s) as above, interpreted by
humans. (This is a fuzzy discussion, often
disrespected in day-to-day, human
communication)
• Knowledge
• Deeper understanding by humans, as (usually)
derived from various information sources.
DATA SETS
• Data sets
• A homogeneous data collection, normally describing a single kind of phenomenon.
Some examples:
• The soil areas of a district: their soil class, spatial extent, geological history, fitness
for agricultural use. Their number may be in the 100s in the data set.
• The land use laws of a country: their date of act installation, number of the act,
and full texts. May be 10s.
• The land tax officers: their personal details, area of constituency, data hired, and
total revenue collected per annum. May be 10s to a few 100s.
• The agricultural crops grown in the district: their name and growth & harvest
season, and fertilizers use for them. May be 10s.
To modify: on the View menu, click Header and Footer 25/04/2023
• Database system
• Combination of a database and its DBMS.
DATABASE MANAGEMENT SYSTEM
(DBMS)
• In setting up a database we can
Database design Database distinguish a few phases:
structure 1. Database design
2. Data entry
Data entry Database 3. Database maintenance
4. Use of the database (Data
query)
Whoops!
Net Rat
WHY DMBS? – CONCURRENT USE
DBMS
• The DBMS makes sure that data can
be safely shared without generating
conflicts.
• End-user group
• Group of end-users with similar or even identical needs to database systems.
KINDS OF END-USERS
• Naïve end-user: uses the database regularly and routinely, often via
predefined functions (so-called canned transactions) for standard tasks
like reservations, bookings, and other standard administrative processes.
Desk clerks
• Database designer:
• A person, normally operating in a team of designers, who develops a
database system.
• Discovers the requirements for the system through interviews with
future users and organizations management.
• Documents the design decisions.
• Proposes (alternative) solutions for the information needs.
• Implements solutions.
• Prepares end-user documentation: manuals.
DATABASE PROFESSIONALS
Casual
user
Database
professional
SPATIAL DATABASE
Spatial database
SPATIAL DATABASE
Object ID
• This identifier, called the Object ID,
2020
2003 can be used to link the spatial entity
2323 1462 with its spatial data.
2001
40 SPATIAL DBMS
41
GIS AND DBMS
• Large scale GIS applications will require a DBMS for data storage and a
GIS for spatial functionality.
GIS Application
DBMS
• Constraints
• Keys
25/04/2023
▪ GIS files
Data storage
▪ DBMS
25/04/2023
• DBMS used in most GIS makes use of the relational data model
25/04/2023
TERMINOLOGY
UNIVERSE OF DISCOURSE
TERMINOLOGY
DATA MODEL
TERMINOLOGY
RELATIONAL DATA MODEL
TERMINOLOGY
RELATIONAL DATA MODEL
cid single,
crop varchar(255),
annum integer,
score integer,
quality varchar(255)
)
25/04/2023
TERMINOLOGY
RELATIONAL DATA MODEL
SELECT *
TERMINOLOGY
THE LANGUAGE USED IN RELATIONAL DATA MODEL
TERMINOLOGY
TUPLES
TERMINOLOGY
ATTRIBUTES
TERMINOLOGY
DOMAIN
• 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…
TERMINOLOGY
RELATION
TERMINOLOGY
RELATION
on 18.10.2010 – 15:47
RELATIONS
• Although not all tables are relations, the terms table and relation are
normally used interchangeably
• The following sets of terms are equivalent:
THE RELATIONAL DATA MODEL
Example:
• For the relational data model,
the structures used to define Three tables or relations called
PrivatePerson, Parcel and TitleDeed:
the database are:
• Relations
• Tuples
• Attributes
• Attribute domains
Name of the
Relation • The definition of a relation is
Attributes also known as the relation
schema.
Attribute’s domain
THE RELATIONAL DATA MODEL
Database schema:
RELATIONS
RELATIONAL DATABASE
Relational database
• A collection of relations, where each relation stores facts of a certain type.
A database schema:
• A collection of relation schemata (with no duplicate relation names) – e.g.:
FAOcrop (Productions,Yields, Countries, Population)
25/04/2023
RELATIONS
DATABASE INSTANCE
373729 records
Key, combination of 2
attributes
KEY
Primary key
FOREIGN KEY
Foreign key
• A tuple can refer to another tuple by
storing that other tuple’s key value.
• This makes it possible to link the two
relations that store the same tuple
value.