• Keine Ergebnisse gefunden

Relational Databases 1 Exercise Sheet 3: Data Modeling (until Thursday 08.11.2012)

N/A
N/A
Protected

Academic year: 2021

Aktie "Relational Databases 1 Exercise Sheet 3: Data Modeling (until Thursday 08.11.2012)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Relational Databases 1

Exercise Sheet 3: Data Modeling (until Thursday 08.11.2012)

Please note that you need 50% of all exercise points to receive the “Studienleistung”. Exercises have to be turned in until Thursday of each respective week and must be completed in teams of two students each. You may hand in your solutions either on paper before the lecture or into the mailbox at the IFIS floor (Informatikzentrum, 2nd floor). Please do not forget to write your

“Matrikelnummer” and your tutorial group number on your solutions. Your solutions may be in German or English. Please note: To pass the “RDB 1 Modul” you need both the exercise points and the exam!

Exercise 3.1 (3 points)

Briefly explain in your own words:

 Inheritance

 Subclass

 Union Type

Exercise 3.2 (2 points)

"Animal" can be specialized into "dog" and "cat". Is this specialization overlapping or disjoint? Is it total or partial? Briefly explain your answer.

Exercise 3.3 (6 points)

Decide if the following statements are always false, always true or possible true. Explain your answers.

 Deleting an entity from a superclass deletes it from all subclasses.

 A subclass has more attributes than a superclass.

 In a lattice, there is at least one overlapping specialization.

 Multi inheritance in an EER-Diagram causes problems.

 The number of entities in a superclass is equal to the number of entities in its subclasses.

 A lattice contains at least 4 entity types.

Exercise 3.4 (10 points)

Model the following mini-world in EER. Please document every non trivial design decision.

In this world we have persons with an identifying ID, a name, a power-level and an evilness-level. A person with a power-level greater than 10 is considered a powered person. Each powered person is either a super villain, if its evilness is higher than 0, or a superhero otherwise. A superhero may have

(2)

up to 2 sidekicks, while a person is only the sidekick of 1 superhero (or not a sidekick at all). A super villain may have any amount of persons as underlings, but has at least one, while a person may be an underling of several super villains.

Each person lives in at least one home which is identified by its address, consisting of country, street, nr and zip-code. A home does also have a number of rooms. A home might however be an evil lair or a secret base (or both, if a hero and a villain rent an apartment in the same building). An evil lair does always contain a weapon of mass destruction, while a secret base contains a hero outfit.

Of course a hero always lives in at least one secret base and in a secret base there lives at least one hero. The same goes for villains and evil lairs.

Referenzen

ÄHNLICHE DOKUMENTE

actor(person → Person, movie → Movie, role) director(person → Person, movie → Movie) hasGenre(movie → Movie, genre → Genre) connection(from → Movie, to → Movie, type)..

Based on this relation schema, please provide statements returning following results in relational algebra, tuple relational calculus and domain relational calculus:.

Is the data contained in the view created in exercise 11.1a physically stored or calculated at query time.. How can you influence, if the data is stored

Moreover, each event takes place at exactly one location and at each location several different events can

Decide whether the following statements are (1) always false, (2) always true, or (3) true in some cases but false in others. Explain your answers. a) The number of entities

Translate the following ER-Schemata to relational schemata. Please write down all additional con- straints that are not represented in your relational model.. c).

f) Show a list of all people (name) that includes the number of movies they have participated in as an actor. Of course, the list should also include all people that have

The Movie relation includes an id, the movie title, the year of publication, the country where the movie was produced, its box-office takings, and a type (e.g. cinema or TV)..