Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Null? Null? NOT NULL EMPLOYEES Name EMP_ID FIRST NAME LAST NAME JOB SALARY DEPT_ID DEPARTMENTS Type Name NUMBER(4) DEPT ID VARCHAR2(10) DEPT_NAME VARCHAR2(10) DEPT LOC

image text in transcribed

Null? Null? NOT NULL EMPLOYEES Name EMP_ID FIRST NAME LAST NAME JOB SALARY DEPT_ID DEPARTMENTS Type Name NUMBER(4) DEPT ID VARCHAR2(10) DEPT_NAME VARCHAR2(10) DEPT LOC ID VARCHAR2(9) NUMBER NUMBER(2) Type NUMBER(2) VARCHAR2(20) NUMBER NOT NULL I. Provide SQL query code for the following three questions based on the provided schemas. 1. List the records for employees who have top salary and bottom salary for each department sorted based on department id and salary amount. 2. List the records for employees who have salary higher than their individual departments average salary. 3. List the 2nd highest salary for each department and the salary is higher than the average salary of the department. II. Conduct 18, 2d, 3rd, and BCNF normalization for the following two questions. 1. R(A,B,C,D,E,F,G) with FDs as A-B, CED, D-F, ACE-BDF 2. R(A,B,C,D,E,F) with FDs as A-E, CEAF, DEBF, B-F|| Null? Null? NOT NULL EMPLOYEES Name EMP_ID FIRST NAME LAST NAME JOB SALARY DEPT_ID DEPARTMENTS Type Name NUMBER(4) DEPT ID VARCHAR2(10) DEPT_NAME VARCHAR2(10) DEPT LOC ID VARCHAR2(9) NUMBER NUMBER(2) Type NUMBER(2) VARCHAR2(20) NUMBER NOT NULL I. Provide SQL query code for the following three questions based on the provided schemas. 1. List the records for employees who have top salary and bottom salary for each department sorted based on department id and salary amount. 2. List the records for employees who have salary higher than their individual departments average salary. 3. List the 2nd highest salary for each department and the salary is higher than the average salary of the department. II. Conduct 18, 2d, 3rd, and BCNF normalization for the following two questions. 1. R(A,B,C,D,E,F,G) with FDs as A-B, CED, D-F, ACE-BDF 2. R(A,B,C,D,E,F) with FDs as A-E, CEAF, DEBF, B-F||

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions