Multiple choice technology databases

create table Purchaser{ name string, credit_card integer (primary key), address string } create table Product{ product_id integer (primary key), product_name string } create table Purchaser_Product{ credit_card integer, product_id integer, purchase_date date } Based on the sample code above, what is the primary key in the Purchaser_Product table?

  1. purchase_date

  2. credit_card

  3. null

  4. credit_card & product_id

  5. product_id

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Purchaser_Product is a junction table resolving a many-to-many relationship between Purchaser and Product. Its primary key must be the composite of both foreign keys (credit_card, product_id) to ensure each combination is unique and prevent duplicate purchaser-product associations. Neither credit_card nor product_id alone is sufficient.