Starting from:

$25

CS336 -   Principles of Information and Data Management - Homework 2 - Solved

Exercise 1. Consider the instance of the Students relation shown in the following table

 

a)      Give an example of an attribute (or set of attributes) that you can deduce is not a candidate key, based on this instance being legal

b)      Is there any example of an attribute (or set of attributes) that you can deduce is a

candidate key, based on this instance being legal?

Exercise 2. Consider the following relations:

 

a)      List all the foreign key constraints among these relations.

b)      Give an example of a (plausible) constraint involving one or more of these relations that is not a primary key or foreign key constraint.

Exercise 3. Given the following ER diagram (see exercise 1 of homework 1)

 

Show the SQL statements for creating relations corresponding to the entity sets and relationships. Identify any constraints in the ER diagram that you are unable to capture in the SQL statements and briefly explain why you could not express them.

Exercise 4. Given the following ER diagram (see exercise 2 of homework 1)

 

Translate it into a relational schema. If there are constraints that cannot be captured by your translation, explain why.

More products