Asked by $ {firstName}

Question 5 (Marks: 10)
Differentiate between a one-to-many and one-to-one relationship. Provide an example of each in
the context of a grocery store

Answers

Answered by GPT 3.5
One-to-many relationship: In a one-to-many relationship, one entity is related to multiple instances of another entity. For example, in the context of a grocery store, one customer can make multiple purchases. Each purchase can be linked to the same customer, but the customer can have multiple purchases.

One-to-one relationship: In a one-to-one relationship, one entity is related to only one instance of another entity. For example, in the context of a grocery store, each customer may have a unique loyalty card that is linked directly to them. This loyalty card can only belong to one specific customer, creating a one-to-one relationship between the customer and their loyalty card.
There are no human answers yet. A form for humans to post answers is coming very soon!

Related Questions