Database 1
Data Manipulation
- Prof. dr. Paul M.E. De Bra
- Dept. of Computer Science
- Eindhoven Univ. of Technology
Beer question n (tupel calculus)
- Give all beers that are served in bars where none of the visitors like any other beer (than the ones served in that bar).
Answer from 2M400 website:
Alternative formulation (through standard conversion):
This answer is wrong:
Suppose there are 2 beers a, b, 1 bar k, 2 drinkers x, y;
everyone serves/visits/likes everything
Then the correct answer should result in {a, b}.
The tupel calculus expression:
does not contain a, because every visitor of k also likes b.
The answer should have been:
- This answer is wrong:
Suppose there are 2 beers a, b, 1 bar k, 2 drinkers x, y;
everyone serves/visits/likes everything
Then the correct answer should result in {a, b}.
The tupel calculus expression:
does not contain a, because every visitor of k also likes b.
The answer should have been:
Common tupel calculus mistakes
- Explain what is wrong in the following queries:
Slide 5
Slide 6
Slide 7