CS 336 Principles of Information and Data Management

CS 336

Principles of Information and Data Management

Homework 2

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)

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

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.

发表评论

电子邮件地址不会被公开。 必填项已用*标注