Consider the relationship R between two entity sets E_1 and E_2. Let K_1 and K_2
ID: 3830705 • Letter: C
Question
Consider the relationship R between two entity sets E_1 and E_2. Let K_1 and K_2 be the sets of key attributes of E_1 and E_2, respectively. [a] Assume that R has no attributes and is one-one between E_1 and E_2. What are the keys for the relation R? [b] If R is one-many from E_1 to E_2, what are the keys for the relation R? [c] If R is many-many between E_1 and E_2, what are the keys for the relation R? [d] If R is many-many between E_1 and E_2 and has an attribute A, what are the keys for the relation R? [e] Assume that R is a multiway relationship between three entity sets E_1, E_2, and E_3, with K_1, K_2, and K_3 as the respective sets of their key attributes. Further, assume that in the E/R diagram there is one arrowhead pointing to and no arrowheads pointing to E_2 and E_3. What are the keys for the relation R? Is the following interpretation correct: "Given E_2 entity and E_3 entity, there is at most one related E_1 entity"? Explain your answer. If incorrect, give the correct interpretation. [f] Continuing; assume that in the E/R diagram there is one arrowhead pointing to E_1, one arrowhead pointing to E_2, and no arrowhead pointing to E_3. What are the keys for the relation R? Is the following interpretation correct: "Given E_3 entity, there is at most one related E_1 entity and at most one related E_2 entity"? Explain your answer. If incorrect, give the correct interpretation. [g] Continuing; assume that in the E/R diagram there is one arrowhead pointing to each of the entity sets. What are the keys for the relation R? [h] Continuing; assume that in the E/R diagram there are no arrowheads pointing to any of the entity sets. What are the keys for the relation R?Explanation / Answer
As per Chegg policy, I am giving you the solution to the first 4 parts:
a.) For R, we can have primary key from either E1 or E2. But better way to include the key from the total participation side.
b.) Foreign key should be added to the relation having "N" in E-R diagram notation.
c.) In many to many relation, we have primary keys from both E1 and E2 and these keys combindly become as primary key of the relation R.
d.) In case R also having attributes then R will have keys from both E1 and E2 including the attribute A.
Hope it helps, do give your response.