Question: Given the following relational schema, where primary keys are underlined and foreign keys are marked with #: Employee (employeeID, empFName, empLName, empDateBirth, address, #DepartmentID) Department

Given the following relational schema, where primary keys are underlined and foreign keys are marked with #: Employee (employeeID, empFName, empLName, empDateBirth, address, #DepartmentID) Department (departmentID, departmentName, location) Project (projectID, projectName, place, start Year, endYear, #DepartmentID) Work-on (#employeeID. #projectID, nbHours) a) Express the following queries in SQL: i. Find the date of birth and the address of the employee whose first name is Ahmed and last name is "Maashani".[1 mark] ii. List the first names and addresses of the employees who are working in the department named Research, ordered by first names in descending order. [1] ii. Change to 650 the number of hours that is required to finish the project having the id P10. [1 mark] iv. Add the following column to the table project: sponsor varchar2(50) [1] v. Find the number of projects that are going to finish in 2021.[1] vi. Find the number of projects assigned to each employee along with maximum number of hours spent. [1] vii. For each department, display its name along with the number of employees in which they are working. [1.5] b) Create a view named employees_Muscat Project that contains all the details of employees who worked on the projects, which took place in Muscat and finished in 2020. [2.5 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
