UCLouvain / ICTEAM, 2015-2016 Bernard Lambeau
[email protected]
LINGI2172 – Databases Summary & Mission M2
Summary of S2
?
Typical exam question • What is a relation? • from a mathematic perspective? • from a predicate logic perpective? • How does it relate to the notion of data independence?
The Relational Data Model…
The Interface
The Data Model
… is (mostly) about Relations SID
Name
CID
S1 S1
Anne Anne
C1 C2
S2
Boris
C1
“Student
, named , is enrolled on course .”
• A relation (variable) represents a predicate
– Intension: the intended meaning of captured information – Extension (at a given time) : the relation body
• The body is a set of tuples – Things get interesting here: sets expose a sound & declarative language
M2 starts this week! Week Wednesday
Topic
S1
03/02
Introduction
S2
10/02
The Relational Model (Part I) – The Data Model
S3
17/02
The Relational Model (Part II) – The Interface
S4
24/02
Querying Databases (Part I)
S5
02/03
Querying Databases (Part II)
S6
09/03
Missions M1
M2
• A collection of query puzzles to be solved – In Tutorial D and in SQL – Increasing difficulty scale (open) – Individually (similar question at the final exam)
Example (a hard one) Get supplier numbers for suppliers supplying at least as many parts as the three "best" suppliers (in terms of the total sum of supplied quantities), together with their respective total. Extension predicate: With a total quantity of supplied parts `total`, supplier with number `sid` is among those who supply the three largest total quantities of parts.