• Keine Ergebnisse gefunden

Relational Databases I Exercise Sheet 10: Normalization (36 points)

N/A
N/A
Protected

Academic year: 2021

Aktie "Relational Databases I Exercise Sheet 10: Normalization (36 points)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Relational Databases I

Exercise Sheet 10: Normalization (36 points)

(due by Thursday, January 16, 2014)

Please note: You need 50% of all exercise points to receive the Studienleistung. Solutions have to be turned in on paper until Thursday before the lecture either in the lecture hall or into our mailbox (Informatikzentrum 2nd floor). Please write your matriculation numbers and your tutorial group number on your solutions! You may answer in German or English. You need to pass both the exercises and the exam for the RDB 1 module! Unless otherwise specified: Always use your own words!

Exercise 1 – Modification Anomalies and Decomposition (10 points)

a) Name the three kinds of modification anomalies and briefly explain each anomaly. (3 points) b) What are the properties of a good relational database design? Briefly explain the need for each

property. (3 points)

c) Given the relation R(A, B, C, D, E), explain using your own words: What is a decomposition of R?

Give an example of a valid decomposition. (2 points)

d) What is a lossless decomposition? What problems occur if a decomposition is not lossless? (2 points)

Exercise 2 – Functional Dependencies and Closures (10 points)

Some of the following exercises refer to the relation R(A,  B,  C,  D,  E) or the set of functional dependencies F  =  {  {A}  →  {B,  E},  {}  →  {D},  {E}  →  {B,  D},  {B,  C}  →  {E}  }.

a) What is a functional dependency? (1 point) b) What is a closure? (1 points)

c) Given a subset of attributes Z  =  {A,  E} from relation R, compute the closure (Z,  F)+. Explain for each attribute that is not in the closure, why it is not in. (2 points)

d) What properties are necessary for a set of attributes to be a candidate key for a relation? (2 points)  

e) Explain in your own words what you have to do to find all candidate keys for a set of functional dependencies. (2 points)

f) What are the candidate keys for R with respect to F? Explain your answer. (2 points)

Exercise 3 – Normalization (12 points)

Normalize R into 3NF, given the relation R(A,  B,  C,  D,  E,  F,  G,  H,  I,  J) and the set of functional dependencies Y  =  {  {C}  →  {B,  D},  {E}  →  {A,  C},  {E}  →  {D},  {G}  →  {J},  {B,  G}  →  {F},  {F}  →  {H}  }.

Provide intermediate results for each of the following steps and explain how you reached them:

1) Finding a minimal equivalent of Y.

2) Finding candidate keys.

3) Normalizing R into 3NF (using Heath’s Theorem).

(2)

Relational Databases I

Exercise 4 – Normal Forms (4 points)

Determine for each of the following relations: (1) in which normal form it is in, (2) which prevents it from being in the next higher normal form.

a)

b)

Referenzen

ÄHNLICHE DOKUMENTE

Solutions have to be turned in on paper until Thursday before the lecture either in the lecture hall or into our mailbox (Informatikzentrum 2nd floor)!. Please write

Since okapis are on the ICUN Red List of Threatened Species, additional information is recorded: For each okapi, information about its parents – their home countries and the names

A home might even 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

The new allies stopped fighting until a new integrated organization schema will be available… Integrate the schemas of the Doomsday Legion and the Agents of S.H.I.E.L.D. (see

c) Give an extensional or an intensional set specifications of the following tasks: (3 points) i. All integers between -5 and 5. The aliases of the Fantastic Four. All natural

e) For each power type of powers with greater reach than 5, return the number of heroes that possess it.

e) A list of last names of all those students that took at least all exams in all courses with a course number between 110 and

Given the relational database schema in Exercise 0 and based on the SQL syntax from the lecture, provide an SQL query for each of the following tasks:. a) A query for all