one to many vs many to many relationship

database, relational-database

Solution

The food sample does work well for a one-to-many relationship: One customer can order many dishes.

The many-to-many relationship is better described by a book sample:

An author can write many books (that would be a one-to-many relationship). But he can have co-authors also involved - one book can have many authors.

Problem

I just started learning database and I'm confused with using one to many vs many to many relationship. so I came up with a simple example on the relation beside customer and food. Customers orders food. 1)If i use one to many relationship, I will say that A customer can order MANY food. Base on the above diagram, ``` 1)bob orders noodles and rice 2)jane orders noodles and crab ``` 1)If i use many to many relationship, I will say that MANY customer can order MANY food. ``` 1)bob orders noodles and rice 2)jane orders noodles and crab ``` I keep seeing it as the same thing. ``` bob still orders noodles and rice and jane still orders noodles and crab ``` regardless whether I use one to many or many to many relationships. correct me if I am wrong.

Original source