Designing One-to-Many & Many-to-Many Tables
Learn Designing One-to-Many & Many-to-Many Tables (Relationships & Database Design, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction In a one-to-many design the foreign key lives on the many side: each employee row stores one dept_id . A many-to-many relationship cannot be stored in either table, so it gets a third table holding one row per pair.