Page 1 of 1

Given the following database representation: Works On Database: o employees (empno, ename, bdate, title, salary, deptno)

Posted: Fri Jul 01, 2022 5:42 am
by answerhappygod
Given The Following Database Representation Works On Database O Employees Empno Ename Bdate Title Salary Deptno 1
Given The Following Database Representation Works On Database O Employees Empno Ename Bdate Title Salary Deptno 1 (33.02 KiB) Viewed 45 times
Given the following database representation: Works On Database: o employees (empno, ename, bdate, title, salary, deptno) o projects (projno, pname, budget, deptno) • departments (deptno, dname, mgreno) o workson (empno, projno, responsibility, hours) Note: o empno is primary key for employees table o projno is primary key for projects table • deptno is primary key for departments table o both empno, projno form the primary key for workson table Using the description provided above, answer the following questions: A. What does the following SQL query do/ return? SELECT empno, salary FROM employees, departments WHERE dname = 'Consulting' ORDER BY salary DESC B. In the above (Works On) database, create a list of all secondary/foreign keys, the table name where each of these keys belongs, and which primary key each secondary key references in the other table (state the other table name), in your answer follow the format in the example below: • x is the secondary key in table A, it references primary key y in table B (in your answer write the list of secondary keys as shown above and substitute x, y, A, and B as relevant)