Question: (25 marks) Consider the following ER-diagram and assumptions for a selling system. gname Group area Belong to sid Salesman pid name Sell Product pname cid


(25 marks) Consider the following ER-diagram and assumptions for a selling system. gname Group area Belong to sid Salesman pid name Sell Product pname cid Customer producer name Every group has a unique gname. Every salesman has a unique sid. Every customer has a unique cid. Every product has a unique pid. Every product can be uniquely identified by its pname and producer. A salesman belongs to exactly one group. A group contains at least one salesmen. A salesman can sell any number of products to a customer. a) (5 marks) List all the superkey(s) of Product". b) (4 marks) List all the candidate key(s) of "Product". c) (6 marks) Assume that pid is a primary key, complete the ER-diagram by adding all missing constraints (weak entity, key constraints, participation constraints and relationship constraints). d) (10 marks) This ER model does not allow a salesman to sell one product to the same customer twice. Please briefly state why this is happening and try to modify the diagram to make it work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
