Knowee
Questions
Features
Study Tools

Consider the three relations given below.Note that the primary keys are underlined.employees (employee_num, employee_name, contact_num, salary)taskAssignment (employee_num, task_num, task_duration)tasks (task_num, location)Select the list of possible foreign key(s) for the given relations.employee_numemployee_num, task_numtask_numtask_num, task_duration

Question

Consider the three relations given below.Note that the primary keys are underlined.employees (employee_num, employee_name, contact_num, salary)taskAssignment (employee_num, task_num, task_duration)tasks (task_num, location)Select the list of possible foreign key(s) for the given relations.employee_numemployee_num, task_numtask_numtask_num, task_duration

🧐 Not the exact question you are looking for?Go ask a question

Solution

The possible foreign keys for the given relations are:

  1. employee_num in taskAssignment: This can be a foreign key referencing employee_num in the employees table. This is because each employee can be assigned multiple tasks, and each task assignment must correspond to an existing employee.

  2. task_num in taskAssignment: This can be a foreign key referencing task_num in the tasks table. This is because each task can be assigned to multiple employees, and each task assignment must correspond to an existing task.

So, the correct answer is "employee_num, task_num".

This problem has been solved

Similar Questions

Task 1: Consider the following relational schema • Employee (EmpID, Name, Dob, Gender, Doj, Designation, Basic_pay, DNo); Gender must take value ‘M’ or ‘F’. • Dept (DNo, DName); • SkillSet (SkillNo, Description, Charge_Outrage); • EmpSkills (EmpID, SkillNo); • Project (PNo, PName, Start_Date, End_Date, Project_Manager_ID); Project Number must start with ‘P’. • Works (EmpID, PNo, Date_Worked_On, Intime, Outtime); Questions 1. Develop DDL to implement the above schema specifying appropriate data types for each attributes and enforcing primary key, check constraints and foreign key constraints. 2. Develop a SQL query to list the details of staff who earn the AVG basic pay of all staff. 3. Develop a SQL query to list the details of staff who have skills with a charge outrate greater than 60 per hour. 4. Develop a SQL query that will keep track of the department number, department name, the number of employees in the department and total basic pay expenditure for the department and store result in a temporary table. 5. Develop a SQL query to list the details of Depts which has more than 3 employees working in it. 6. Develop a SQL query to list the details of employees who have 2 or more skills but not more than 4

Write a SQL query considering below schema. Create tables with Primary Key, foreign key constraints in given schemas.Manager (mid, eid, mname)Department (did, mid, dname, location)Employee (eid, ename, mobile, salary, joining_date, mid)i.Give the name and salary of employees whose salary are greater than each and every employees who are working under managerid 14.ii.Give the name of employees who have not assigned any department.iii.Give the employee names whose location is Kota.iv.Give the name of manager along with count of employees assigned to him/her in descending order

For given relation:Employee(eid, ename, address,deptname ,salary)Project(eid, pid, pname, location)(1) Display name and salary of employee who is taking maximum salary.(2) Display highest salary department wise and name of employee who is taking thatsalary.(3) Find details of employee who works on a pid equal to 10

we have following relations:employees(emp_id, name, dept_id, city, DOJ)salaries (emp_id, salary)1) Find out the names of employees who belong to the same department as John.2) Find out names of employees whose salaries are greater than average salary.3) Retrieve the names of employees who have corresponding entries of the salary.

Consider following schema and write query for given statementEmp (eid,ename,city,dname,salary) Project(eid,pid,pname,location)Create tables with Primary Key, foreign key constraints in given schemas.(1) Display name of employees who belongs to Computer department.(2) Display employee id whose name starts from letter J.(3) Display all details of employees whose salary is from 10000 to 20000.(4) Display name of employees who are having maximum salary.(5) Display name of employees whose salary is higher than average salary of the employee.(6) Display name of employees whose project id is 3 and location is Mumbai

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.