Task: DB schema of a system which is currently working as follow.
Employees:- different levels/types of user in organisation like CEO, administrator, Manager, Supervisiors, workers etc etc
Departments
HR, IT, Health, Accounts etc etc
Each employee is working in multiple roles like user "ABC" is working manager as well as worker. It is also possible that manger of "ERT" dept and "SGY" can assign duty to worker "XYZ"
1 Please design a DB schema which handles this situation in a most efficient way. Please design most suitable and best way to handle all these activites. and also poplule some data in DB and design SQL queries which gives us following results
1.1 Show managers who are also reporting to other managers of other departments.
1.2 Show all employees who have more than 1 managers.
1.3 Show all employees who don't have any managers.