Database Models
Three Types of Relationships
- One-to-many relationships (1:M)
- A painter paints many different paintings, but each one of them is painted by only that painter.
- PAINTER (1) paints PAINTING (M)
- Many-to-many relationships (M:N)
- An employee might learn many job skills, and each job skill might be learned by many employees.
- EMPLOYEE (M) learns SKILL (N)
- One-to-one relationships (1:1)
- Each store is managed by a single employee and each store manager (employee) only manages a single store.
- EMPLOYEE (1) manages STORE (1)