You work as a Database Developer for GraySoft Inc. You are designing a database to record information about
potential customers. You create a table named ProductInquiry for the database.
The table is given below:
You want to uniquely identify the product in which a customer is interested. Choose the columns on which a
PRIMARY KEY constraint needs to
be created to accomplish this.
Answer:
Explanation:
Create a PRIMARY KEY constraint on theInquiryID and ProductID columns to uniquely identify
the product in which a customer is
interested.
The ProductInquiry table is working as a junction table to create a many-to-many relationship between the
Products table and the Inquiries
table. A customer can be interested in many products, while a product can also be inquired by many
customers. However, the inquiry
information of one product by a particular customershould be stored only once. For the next subsequent
inquiry for the same product by the
same customer, only the LastInquiredOn column should be updated. The correct entity relationship diagram for
this scenario is given below: