Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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, nb Hours) 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] 111. 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] 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. [15] 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started