Download Homework 3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Post-quantum cryptography wikipedia , lookup

Mathematical optimization wikipedia , lookup

Computational complexity theory wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Transcript
3/28/2017
MIST.3030 Database Management Systems by Xiaobai Li
1
HOMEWORK 3
Due Date: Thursday, 4/6/2017
Problems (60 points):
1. Transform each of the following ER or EER diagrams to a relational schema that shows
referential integrity constraints and functional dependencies [see the Mapping Example
(Problem 4-33) posted at the course web site for an example].
a. (5 points) Figure 2-9b (Flight), p.72
b. (5 points) Figure 2-11c [not part (a) or (b), which are more complicated], p.77
c. (5 points) Figure 3-6b (Vehicle), p.123
d. (5 points) Figure 3-7a (Patient), p.124
2. (12 points) Problem 4-30, p.195. For each sub-problem, the primary key includes
CourseNo and SectionNo. Indicate the normal form for each of the original relations.
Decompose the relation into 3NF relations only if the original relation is not in 3NF.
Please use a relational schema (not a text format as in the book), which includes
functional dependencies and referential integrity constraints, to demonstrate decomposed
relations. Note that each of the four sub-problems is an independent problem.
3. (10 points) Problem 4-34 (all parts), pp.195-196.
 For Part (c), identify a modification (update) anomaly only.
 Do Parts (b) and (d) together. Combine your answer in a single relational schema, and
then identify a candidate key.
 Part (e) question is related to the relational schema completed in Part (d), not the
original Table 4-3 (which is of course not even in 1NF).
 Do Parts (f) and (g) together. For Part (g), drawings by hand (be clean), Microsoft
Word, or Microsoft Visio are all acceptable.
Do Problems 4 and 5 using Microsoft Access.
4. (12 points) Problem 6-34, p.283, where the beginning words “Write a database
description …” means “Write a SQL statement ...”
 This problem requires you to create a database with six tables based on Figure 6-11
on p.283 (see the paragraph before this problem). The 6 tables are linked as:
FACULTY-QAULIFIED-COURSE-SECTION-REGISTRATION-STUDENT
 Note that CourseID in the SECTION table should be a foreign key and thus dashunderlined in the table.
 Turn in the SQL commands and the Relationship chart (press Alt + Print Screen key
combination to copy-paste the chart into your Word file).
5. (6 points) From the PVF database find all orders placed by customers located in NJ and
all orders that requested Product #8. Write a SQL UNION statement such that only one
column, with heading “Order_ID,” appears in the results. Turn in both the SQL
commands and the Microsoft Access output results.