Question: 2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department, ProjectName) EMPLOYEES(Number, Surname, FirstName, Department) ALLOCATIONSEmplovee, Project, Function, Date)

2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department, ProjectName) EMPLOYEES(Number, Surname, FirstName, Department) ALLOCATIONSEmplovee, Project, Function, Date) NOTE: relation ALLOCATIONS stores the registration number (attribute Employee) of employees that are assigned to a given project (attribute Project is the number of the project, not the name of the project), the function the employee has in that project (i.e., technician, manager, etc.) and the date when the employee has been assigned to that project. a) Write the SQL query that finds the project number of projects in the Administration Department. (3marks) (8marks) (14marks) b) Write the SQL query that finds the employee number, the employee surname and the name of projects they are assigned to. c Write the SQL query that retrieves all the following information for each employee number: the employee's surname and department - how many different projects he/she has been assigned to - how many different functions he/she has
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
