🔗 One-to-One Relationship:


🔗 One-to-Many Relationship or Many-to-One Relationship:


🔗 Many-to-Many Relationship:

.


Food for Thought:

  1. How would you represent product items in an order for a given order_id? Would it be a one-to-one or one-to-many relationship?
  2. What would be the relationship between the product table and shipments table?

Answers:

  1. It would be a one-to-many relationship: one order can have multiple product items. In our electronics database, orders table would have one-to-many relationship with orderdetails table.
  2. It would be a many-to-many relationship: one product can have multiple suppliers and one supplier can ship multiple products.