• Keine Ergebnisse gefunden

q Relational Databases 1 Exercise Sheet 7: Relational Calculus (until Thursday, 08.12.2016) (36 points)

N/A
N/A
Protected

Academic year: 2021

Aktie "q Relational Databases 1 Exercise Sheet 7: Relational Calculus (until Thursday, 08.12.2016) (36 points)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

q Relational Databases 1

Exercise Sheet 7: Relational Calculus (until Thursday, 08.12.2016) (36 points)

Please note: you need 50% of all exercise points to receive the Studienleistung for this lecture. In order to pass the RDB I Module, you need both the Studienleistung and you need to pass the exam.

Exercises have to be turned in until Thursday before the lecture either in the lecture hall or into our mailbox at the IFIS floor (Mühlenpfordtstraße 23, 2

nd

floor). Please do not forget your Matrike- lnummer and your tutorial group number on your solutions. If you forget to write your Matrike- lnummer and/or your tutorial group number, you get automatically 0 points. Your solutions may be in German or English. Unless otherwise specified: Always use your own words!

Exercise 7.1 (6 points)

Answer the following questions

1. What is the Open World Assumption (OWA)? (2 point) 2. What is difference between a formula and an atom? (2 points) 3. What is relational completeness? (2 point)

Exercise 7.2 (30 point)

Consider the following relation schema.

Movie(id, title, year)

Person(id, name, gender, birthday) Genre(name, description)

actor(person → Person, movie → Movie, role) director(person → Person, movie → Movie) reviewer(person → Person, movie → Movie, stars) hasGenre(movie → Movie, genre → Genre)

The schema describes movie data, including the movie's title and the production year. Also actors, reviewers, and directors are described, by introducing the relationship types "actor", “reviewer”, and

"director", which connects persons with movies. The actor relationship type also includes the role played by the person in the respective movie. Persons are further described by their name, gender, and birthday. A movie can have several reviews. For example the movie “Aliens” can have a 5 star review given by a specific Person. The attribute “stars” of the “reviewer” has a value from 1 to 5 (lowest to highest) to basically indicate the opinion of a person on a movie. A movie can also have several genres, which are further described by a description attribute.

Based on this relation schema, please provide statements returning following results in relational alge- bra, tuple relational calculus and domain relational calculus:

1. The title of all the movies that have been produced after 1979. (3 points) 2. The name of all drama movies. (3 points).

3. The name of all persons who participated in a "drama" movie. (3 points)

4. The name of all persons who have reviewed the movie “The Angry Silence”. (3 points)

(2)

5. The name of all persons who have reviewed movies with at least 3 stars. (3 points)

6. The name of all persons who have reviewed “romantic” movies but not “comedy” movies. (3 points)

7. The name of all persons who only played in the movie "Anatomy of a murder" but apart from that in no other movie. (6 points)

8. The name of all persons who have reviewed at least the same movies as “Joe Smith”. (6 points)

Referenzen

ÄHNLICHE DOKUMENTE

Schüler/innen laden ein Foto in die App und gestalten eine leere Fläche auf diesem Bild (z. schneiden sie den Mund aus dem Foto eines Prominenten aus. Achtung: Da- bei

In the case of the pH = 10 dispersions, the PTCDA is exposed to the basic environment while being adsorbed on the nanotube where it is easily hydrolyzed to yield the perylene

At the fast tempo, there is less movement than for the slow sequences (especially for /a/), with the velum staying in an intermediate position... 09 mamamamama

Zu den fachlichen Voraussetzungen führte die Antragstellerin aus, die Muttergesellschaft der Telemediendienst GmbH, die Premiere Fernsehen GmbH, verfüge bereits über

You are going to listen to a recording about a joint European movie project.. First you will have 45 seconds to study the task below, then you will hear the

Abrams pulls off an astonishing feat of movie magic with Super 8, recapturing that (4) ___ of walking out of ET or The Goonies feeling happy and, just as (5) ___, feeling like

Veranstalter der Gesprächsrunde sind GIRLS GO MOVIE (Stadt Mannheim/Fachbereich Kinder, Jugend und Familie/Jugendförderung und Stadtjugendring Mannheim e.V./forum – Gefördert durch

Lila, nicht mehr die Jüngste und auch nicht unbedingt die Schönste, wagt es auf einer Reise nach Amsterdam, einen lang gehegten Wunsch in die Realität umzusetzen: Sie bestellt