Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help with these questions. The following tables form part of a database held in a Relational Database Management System: Employee (empID, fName, 1Name, address,
need help with these questions.
The following tables form part of a database held in a Relational Database Management System: Employee (empID, fName, 1Name, address, DOB, sex, deptNo) Department (deptNo, deptName, mgrEmpID) Project (projNo, projName, deptNo) WorksOn (empID, projNo, hoursWorked) 1. Employee table contains employee details and empID is the key 2. Department table contains department details and deptNo is the key. mgrEmpID identifies the employee who is the manager of the department. Thee is only one manager for each department projNo (no two departments can run the same projedt empID and projNo together form the key. 3. Project table contains details of the projects in each depaatmentand the key is 4. WorksOn table contains details of the hours worked ty on each project, and (a) (2 marks) Discuss the differences betw e candhyate keys and the primary key of ign key. How do foreign keys of relations a relation. Explain what is meant by relate to candidate keys? Give examplefroi the above tables to illustrate your answer (b) (2 marks) Formulate queries 9tYo the following: (i) List details of all female em (i) For each employ who work in the HR department ia their names (fName, lName), the projects they work on (projNane and the number of hours they work on those projects. (c) (2 marks) (i) Provide an expression in relational algebra corresponding to part b(i), that is, the expression that will return the details of all female employees who work in the HR departmentStep 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