Starting from:

$25

CS532-Homework 2 Solved

1.     Transform the instructor’s ER diagram for the Student Registration System (see the Homework 1 folder in MyCourses) to relations using the approach discussed in Chapter 4 of the Lecture Notes. When transforming the IS_A hierarchy, use Method 1 (i.e., sub entity set only explicitly inherits the key from the sub entity set). For composite attributes, use Method 1 (i.e., use the more specific attributes only) to perform the transformation and rename the component attributes to avoid ambiguity as needed. For each relation obtained, underscore the primary key, specify (using words) other candidate keys (if any) and foreign keys (if any), and specify the constraints associated with the relation (including all constraints that are described in the Requirements Document).

 

2.     Consider a relation R with 3 attributes A, B and C. What is the maximum number of possible keys R could have? What they may look like (list all possibilities)? Justify your answer.

 

3.     Let A be the primary key of relation R1 and B be the primary key of R2. If A is declared as a foreign key referencing B and B is also declared a foreign key referencing A. What problem this mutual foreign key references can cause when using R1 and R2? Explain. 

  

4.     Consider the following ER Diagram:   

 

 

 

If the relationship is transformed into a foreign key attribute in relation Students, can null value be avoided in this attribute? Explain. Propose a different way to transform this relationship such that null values can be avoided.

More products