PROJECT 

Build a deductive database of three tables:

EMPLOYEE(Name, Department, Salary),
MANAGER(Name, Department, List_of_Degrees)
CEO  (Name, Division, List_of_depts_in_division).
DEPARTMENT(Department_name, Number_of_employees)

(Note: managers are also listed in the EMPLOYEE table)

The following queries should be addressed:

(a) Given a department name, find the manager of that department

(b) Given a department name, find all employees in that department.

(c) Given an employee name, find the department he works in and
the name of his manager.

(d) Find all employee names whose salary is more than 100000.

(e) Find all employee names whose salary is more than 50000 and
do not work in accounting.

(f) Find the names of the managers who have a phD degree and manage
a department of at least 30 employees.

(g) Given a department, find the division that it belongs to, and
the name of the CEO in that division.

(h) Given the name of a CEO, find the names of all the managers and 
employees under him.

(i) Given the name, department and salary of a new employee, insert him
in the knowledge base. 
Note: Two integrity constraints are to be satisfied: 
1. you cannot insert the employee if the department does not 
exist-you will first have to create the department in the department 
table, and also put the given employee as manager.
2.Also When you insert a new employee, you have to update
the Number_of_employees in the department.

(j) Given the name of an employee who was fired, delete them 
from the database.
Note: CEOs are never fired. If the employee who was fired is a manager,
then you can make any other employee as the new manager. 
You will also have to update the 
Number_of_employees for that department, and when this number reaches 
zero, you will also have to 
delete the whole department and the manager.

-----------------------------------------------