The following tables form part of a database held in a relational DBMS (Primary Key, Foreign Key): Employee (empNo, empName, empAddress, empGender, empPosition, deptNo) Department (deptNo, deptName, ManagerEmpNo) Project (projNo, projName, deptNo) WorksOn (empNo, projNo, dateWorked, hoursWorked) …where:             Employee contains employee details Department contains department details. ManagerEmpNo identifies the employee who is the Manager of the department. There is only one Manager for each department. Project contains details of the projects in each department. No two departments can run the same project. WorksOn contains details of the hours worked by each employee on each project.               Give SQL for the following queries  List all details of all female employees List the Names and Addresses of all employees who work in the department named “Human Resources”. List the Names of all employees who worked on the project named Manhattan

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 2MC
icon
Related questions
Question
  1. The following tables form part of a database held in a relational DBMS (Primary Key, Foreign Key):

Employee (empNo, empName, empAddress, empGender, empPosition, deptNo)

Department (deptNo, deptName, ManagerEmpNo)

Project (projNo, projName, deptNo)

WorksOn (empNo, projNo, dateWorked, hoursWorked)

…where:

            Employee contains employee details

Department contains department details. ManagerEmpNo identifies the employee who is the Manager of the department. There is only one Manager for each department.

Project contains details of the projects in each department. No two departments can run the same project.

WorksOn contains details of the hours worked by each employee on each project.

 

            Give SQL for the following queries 

  1. List all details of all female employees
  2. List the Names and Addresses of all employees who work in the department named “Human Resources”.
  • List the Names of all employees who worked on the project named Manhattan
  1. List the total number of hours worked on the project named Manhattan
  2. List the total number of hours worked on each project by each of the employees (i.e., each employee who has worked on a project should be listed along with the total number of hours they have worked)

 

Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Fundamentals of Datawarehouse
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning