Download Exercise 2 1 Domain Relational Calculus (DRC) 2 Relational

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Relational algebra wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

Transcript
Database Systems, Spring 2015
Prof. Dr. Michael Böhlen
DatabaseTechnology Group
Exercise 2
Date of issue: 03th March 2015
Deadline: 10th March 2015
All of the following exercises are based on the Mondial database. The schema
of the database can be found at:
http://www.dbis.informatik.uni-goettingen.de/Mondial/mondial-RS.pdf.
1
Domain Relational Calculus (DRC)
Based on the Mondial database, propose domain relational calculus expressions that represent the following relation descriptions.
1. Give the name of the countries where at least 20% of the people speak
italian or french.
2. For each European country, give the country code, and the name and
length of its rivers.
3. For each European country code, give the name of its longest and its
shortest rivers.
4. Give the name of the countries having exactly two lakes.
2
Relational Algebra to DRC
Express in natural language what the following RA expression states and
transform it into a DRC expression:
πRiver (σCountry=0 IT 0 (geo river)) ∪ πLake (σCountry=0 IT 0 (geo lake))
3
DRC to RA
Express in natural language what the following DRC expression states and
transform it into a RA expression:
{ Country, Height |
∃M ount
geo mountain(M ount, Country, ) ∧
mountain(M ount, , Height, , ) ∧
∃M ount2, Height2(
geo mountain(M ount2, Country, ) ∧
mountain(M ount2, , Height2, , , ) ∧
Height2 > Height)
}
1