Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Determine the methodology for evaluating various assets.

Answered: 1 week ago

Question

=+4. About the medium.

Answered: 1 week ago