Explain joins using a scenario and show how the table schemas affect the result.
Use the provided employees and departments tables to demonstrate the result of joining employees to their departments. Account for nullable department references and departments without employees.
employee_id, employee_name, department_id, and department_name.employee_id ascending.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | Referenced department identifier; null when unassigned |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |