Given the following database representation: WorksOn Database: employees (empno, ename, bdate, title, salary, deptno) pr

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Given the following database representation: WorksOn Database: employees (empno, ename, bdate, title, salary, deptno) pr

Post by answerhappygod »

Given the following database representation:
WorksOn Database:
employees (empno, ename, bdate, title, salary, deptno) projects(projno, pname, budget, deptno) departments (deptno, dname, mgreno)workson (empno, projno, responsibility, hours) Note: empno isprimary key for employees table projno is primary key for projectstable deptno is primary key for departments table both empno,projno form the primary key for workson table
Using the description provided above, answer the followingquestions:
A. What does the following SQL query do/ return? SELECT enameFROM employees WHERE deptno = 'D1' ORDER BY salary DESC
B. In the above (WorksOn) database, create a list of allsecondary/foreign keys, the table name where each of these keysbelongs, and which primary key each secondary key references in theother table (state the other table name), in your answer follow theformat in the example below: x is the secondary key in table A, itreferences primary key y in table B
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply