Docsity

Database Management Systems - Sample Final Exam Questions | MIS 310, Exams of Introduction to Database Management Systems

Toggle sidebar
bg1
Sample Final Exam
PART I: (60 POINTS) Use tables from the back of the test
1) Draw a relational schema of the database, using the description of tables provided
(10 points)
2) (5 points) Write SQL statement that is used to create the ASSIGNMENT table.
(Assume that all other necessary tables have been created)
3) (5 points) Which one of the following orders of table creations is correct
a. ASSIGNMENT, PROJECT, EMPLOYEE DEPARTMENT
b. PROJECT, EMPLOYEE, DEPARTMENT, ASSIGNMENT
c. DEPARTMENT, EMPLOYEE, PROJECT, ASSIGNMENT
d. DEPARTMENT, PROJECT, EMPLOYEE, ASSIGNMENT
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Database Management Systems - Sample Final Exam Questions | MIS 310 and more Exams Introduction to Database Management Systems in PDF only on Docsity!

Sample Final Exam

PART I: (60 POINTS) Use tables from the back of the test

1) Draw a relational schema of the database, using the description of tables provided

(10 points)

2) (5 points) Write SQL statement that is used to create the ASSIGNMENT table.

(Assume that all other necessary tables have been created)

3) (5 points) Which one of the following orders of table creations is correct

a. ASSIGNMENT, PROJECT, EMPLOYEE DEPARTMENT

b. PROJECT, EMPLOYEE, DEPARTMENT, ASSIGNMENT

c. DEPARTMENT, EMPLOYEE, PROJECT, ASSIGNMENT

d. DEPARTMENT, PROJECT, EMPLOYEE, ASSIGNMENT

4) (5 points) assume that SAL column represents monthly salary and BONUIS

column represents annual (once a year) bonus. Write an SQL statement that will

add a bonus amount of $400 for all employees (except for clerks) whose total

annual compensation is less than $40,000.

5) (5 points)Write a query that will list the name, occupation and department's

location of all employees in departments other than SALES, hired before 1983

whose monthly salary is more than $2750.

9) (10 points) Write a query that will list the employee number and the location of

his or her department of an employee who has the highest number of hours

allocated to the project C6.

Part II Normalization (40 points):

Use the following PATIENT PROCEDURE report structure:

Attribute Name Sample Value

PROCEDURENUM X3A

PROCEDURENAME MRI-Knee

DEPT Radiology

LOCATION Wing D

PATNUM 35621

PATNAME Sam Jones

PATINSURANCE TRIGON

CHARGE $239.

DEDUCTIBLE $

The following assumptions are made:

 A patient has unique insurance

 Each procedure is performed in one department

 A hospital wing (location) can have multiple departments in it, but each

department is located in just one wing

 Charge for a given procedure will be the same regardless of patient insurance

plan, but the deductible for a given procedure (amount patient has to pay from his/

her own pocket) will differ from one insurance plan to another.

 Deductible is not fixed for patients under the insurance plans in this database (it

varies form one procedure to another)

a) Create a list of functional dependencies (15 points)

FOLLOWING TABLES ARE NEEDED FOR THE PART I OF THE TEST:

(PAY ATTENTION TO THE PRIMARY AND FOREIGN KEY

DESIGNATIONS!!!)

Table

EMP:

EMPNO ENAME JOB HIREDATE SAL BONUS DEPTNO

7839 KING PRESIDENT 17-NOV-81 5000 1000 10

7698 BLAKE MANAGER 01-MAY-81 2850 30

7782 CLARK MANAGER 09-JUN-81 2450 10

7566 JONES MANAGER 02-APR-81 2975 20

7654 MARTIN SALESMAN 28-SEP-81 1250 1400 30

7499 ALLEN SALESMAN 20-FEB-81 1600 300 30

7844 TURNER SALESMAN 08-SEP-81 1500 70 30

7900 JAMES CLERK 03-DEC-81 950 30

7521 WARD SALESMAN 22-FEB-81 1250 500 35

7902 FORD ANALYST 03-DEC-81 3000 20

7369 SMITH CLERK 17-DEC-80 800 100 40

7788 SCOTT ANALYST 09-DEC-82 3000 400 20

7876 ADAMS CLERK 12-JAN-83 1100 20

7934 MILLER CLERK 23-JAN-82 1300 400 10

7991 BENK0 ANALYST 22-MAY-85 2950 350 40

7992 JOSHI ANALYST 27-MAY-85 2955 20

7900 NESTOR ANALYST 02-JAN-83 3005 40

7555 GIBSON SALESMAN 25-FEB-81 1200 800 35

Description of EMP:

_Name Null? Type Keys


EMPNO NOT NULL NUMBER(4) PK ENAME VARCHAR(20) JOB VARCHAR(9) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) BONUS NUMBER(7,2) DEPTNO NOT NULL NUMBER(2) FK_


Table

DEPT:

DEPTNO DNAME LOC

10 ACCOUNTING NEW YORK

20 RESEARCH DALLAS

30 SALES CHICAGO

35 SALES BALTIMORE

40 OPERATIONS BOSTON

Description of DEPT:

_Name Null? Type Keys


DEPTNO NOT NULL NUMBER(2) PK DNAME VARCHAR(14) LOC VARCHAR(13)_

Table

PROJECT:

PROJNO PROJTYPE PROJCUSTOMER PROJREP

A3 DEVELOPMENT TARGET 7654

B7 CONSULTING MACY'S 7499

A8 CONSULTING BN 7521

A6 CONSULTING SAFEWAY 7499

C1 PROGRAMMING GIANT 7521

C6 DEVELOPMENT HECHTS 7844

Description of PROJECT:

_Name Null? Type Keys


PROJNO NOT NULL CHAR(2) PK PROJTYPE VARCHAR(14) PROJCUSTOMER NOT NULL CHAR(13) PROJREP NUMBER(4) FK


__

Table

ASSIGNMENT:

PROJNO EMPNO HRS

A3 7900 10

A3 7876 5

A8 7992 15

A8 7788 10

B7 7992 5

B7 7991 10

C6 7369 10

C6 7788 20

C6 7566 6

C6 7900 10

C1 7991 15

Description of ASSIGNMENT:

_Name Null? Type Keys


PROJNO NOT NULL CHAR(2) PK , FK EMPNO NOT NULL NUMBER(4) PK , FK HRS NUMBER(2)_