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
Given the following database representation: WorksOn Database: employees (empno, ename, bdate, title, salary, deptno) pr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am