Database 1
Data Manipulation

Prof. dr. Paul M.E. De Bra

Dept. of Computer Science

Eindhoven Univ. of Technology

Recognizing Types of Queries for TC

Translate the following questions (for the bank database) to the tuple calculus:

Give the name of customers that have a loan with a branch where they also have an account.

Give the name of customers who have a loan at a branch where they do not have an account.

Give the name of customers who have a loan at every branch where they have an account.

Give the name of customers who have loans only at branches where they have an account.

Library TC questions

Give the name and faculty of borrowers, and the ISBN-number of the books of which they were the first borrower.

Give the name and faculty of borrowers who have never borrowed the most recently purchased copy of a book.

Give the title of books that are “present” in the library, reserved by someone, but not yet borrowed (by anyone).

Preparation for labsession 3

You do not have to study anything new for labsession 3. You should spend the extra time on the homework.

You should study part of SQL (chapter 4 up to and including section 4.3) by April 28.

In this colstruction we are going to try to understand to recognize different types of queries by looking at the question formulated in natural language. We then translate to tupel calculus. If you find it hard to translate from natural language to tupel calculus you can of course try to translate the relational algebra solutions to tupel calculus.

Note that these questions are from the June 30, 2003 exam. (This exam is available with solutions, but these solutions are not all in SQL.)

Databases 1, Colstructie 6

Practice with Tupel Calculus

Paul De Bra

2003-04-01T22:52:54

Paul De Bra