0% found this document useful (0 votes)
411 views

Database

This document provides instructions and questions for a database concepts lab assignment. It asks students to analyze dependency diagrams and normalize tables to third normal form. Students are given sample tables and asked to draw the entity relationship diagrams showing attributes, primary keys, and foreign key relationships. The goal of the assignment is to practice skills in dependency analysis, normalization, and creating entity relationship diagrams.

Uploaded by

CiK N.A
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
411 views

Database

This document provides instructions and questions for a database concepts lab assignment. It asks students to analyze dependency diagrams and normalize tables to third normal form. Students are given sample tables and asked to draw the entity relationship diagrams showing attributes, primary keys, and foreign key relationships. The goal of the assignment is to practice skills in dependency analysis, normalization, and creating entity relationship diagrams.

Uploaded by

CiK N.A
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DBA110 Database Concepts

Spring 2016
Lab Assignment 5 - 75 points

1. Given the dependency diagram below, answer items 2a - 2c: (5 Points)

C1 C2 C3 C4 C5

a. C1  C2 represents a _Partial Dependency___.


b. C4  C5 represents a ___Transitive Dependency___.
c. C1, C3  C2, C4, C5 represents a __Full Dependency___.

The dependency diagram below indicates that a patient can receive many
prescriptions for one or more medicines over time.

2. Based on the dependency diagram above, create a database whose tables are in at
least 3NF, showing the dependency diagram for each table. (10 Points)

Prepared by Cindy Waters


Page 1
DBA110 Database Concepts
Spring 2016
Lab Assignment 5 - 75 points

MedName Date

PatientID PatientName RefillsAllowed Dosage ShelfLife

PatientID PatientName

MedName ShelfLife

Using the INVOICE table structure shown below, do the following:

Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value
INV_NUM 211347 211347 211347 211348 211349
PROD_NUM AA-E3422QW QD-300932X RU-995748G AA-E3422QW GH-778345P
SALE_DATE 15-Jan-2010 15-Jan-2010 15-Jan-2010 15-Jan-2010 16-Jan-2010
PROD_LABEL Rotary sander 0.25-in. drill bit Band saw Rotary sander Power drill
VEND_CODE 211 211 309 211 157
VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, Inc.
QUANT_SOLD 1 8 1 2 1
PROD_PRICE $49.95 $3.45 $39.99 $49.95 $87.75
Prepared by Cindy Waters
Page 2
DBA110 Database Concepts
Spring 2016
Lab Assignment 5 - 75 points

3. Write the relational schema, draw its dependency diagram and identify all
dependencies, including all partial and transitive dependencies. You can assume
that the table does not contain repeating groups and that any invoice number may
reference more than one product. (Hint: This table uses a composite primary key.)
(10 Points)

INV_NUM PROD_NUM SALE_DATE PROD_LABEL VEND_CODE VEND_NAME QUANT_SOLD PRICE

Relational Schema: INV_NUM, PROD_NUM, SALE_DATE, PROD_LABEL,


VEND_CODE, VEND_NAME, QUANT_SOLD, PRICE

4. Remove all partial dependencies, draw the new dependency diagrams, and
identify the normal forms for each table structure you created. (10 Points)

INV_NUM PROD_NUM QUANT_SOLD 3NF

INV_NUM SALE_DATE 3NF

PROD_NUM PROD_LABEL VEND_CODE VEND_NAME PRICE 2NF

5. Remove all transitive dependencies, and draw the new dependency diagrams. Also
identify the normal forms for each table structure you created. (10 Points)
Prepared by Cindy Waters
Page 3
DBA110 Database Concepts
Spring 2016
Lab Assignment 5 - 75 points

INV_NUM PROD_NUM QUANT_SOLD 3NF

INV_NUM SALE_DATE 3NF

PROD_NUM PROD_LABEL VEND_CODE PRICE 3NF

VEND_CODE VEND_NAME 3NF

6. To keep track of employees and departments, the Somewhere Company uses the
table structure shown below.
EmpID LastName FirstName DeptID Email DeptName DeptPhone
100 Johnson Sam 325 [email protected] Accounting 834-1100
200 Abernathy Jane 350 [email protected] Finance 834-1200
300 Smathers Henry 350 [email protected] Finance 834-1200
400 Jackson Ronald 300 [email protected] Production 834-1400
500 Caldera Cindy 400 [email protected] Legal 834-1000

a. Draw its dependency diagram, and identify all dependencies. You can assume
that the table does not contain repeating groups and the table uses a single
primary key. (10 Points)

EMP ID LastName FirstName DeptID Email DeptName DeptPhone

Prepared by Cindy Waters


Page 4
DBA110 Database Concepts
Spring 2016
Lab Assignment 5 - 75 points
b. Remove all dependencies and draw the new dependency diagrams. (10 Points)

EMP ID LastName FirstName DeptID Email DeptName DeptPhone

(Never specified what dependencies to remove?)


c. Using the results of 2b, draw the Crow’s Foot ERD. Make sure the ERD
includes primary keys, foreign keys, and attributes. (10 Points)

Employee
Department
PK EMP ID
PK DeptID
LastName
FirstName DeptName
Email FK1 EMP ID

Department Details

PK,FK1 DeptID

DeptPhone

Prepared by Cindy Waters


Page 5

You might also like