Design employee and department tables (one-to-many, then many-to-many) and write a query listing all employees in a specific department.
Asked in the Round 2 stage.
Ad Operations.employee_id, employee_name, and department_name.employee_name, then employee_id.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| department_description | VARCHAR(255) | Optional department description |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(150) | Employee full name |
| employee_email | VARCHAR(255) | Employee email address |
| primary_department_id | INT | Optional primary department for the one-to-many design |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Employee participating in the department assignment |
| department_idPK | INT | Department participating in the employee assignment |
| assignment_type | VARCHAR(30) | Type of department assignment |