2023-05-04 - Schema Desgin and SQL


main topics


When there's a Many-to-One (N:1) relationship, the relation is stored in the N entity.

Example: city and inhabitant. The inhabitant stores the city they live.

DB Schema one-to-many.png

In a Many-to-Many (N:N) relationship, a new table is created.

DB Schema many-to-many.png