week5.docx

Chapter 8 Problems and Exercises

3. Imagine the worst possible reports from a system. What is wrong with them? List as many problems as you can. What are the consequences of such reports? What could go wrong as a result? How does the prototyping process help guard against each problem? (5points)

4. Given the guidelines presented in this chapter, identify flaws in the design of the Report of Employees shown. What assumptions about users and tasks did you make in order to assess this design? Redesign this report to correct these flaws. (5 points)

Report of Employees-1-2-08

Em_ID

Name, Title

0124543

John Smith, VP Marketing

2345645

Jared Wright, Project Manager

2342456

Jennifer Chang, Systems Analyst

4564234

Mark Walters, Software Engineer

7875468

Nick Shelley, BI Analyst

4446789

Kim Eagar, HR Manager

4678899

Emily Graham, Receptionist

4452378

Matt Hoffman, Network Operations Specialist

Chapter 9 Problems and Exercises

3. Transform the E-R diagram of Figure 9–21 into a set of 3NF relations.

(5 points)

FIGURE 9-21 E-R diagram for Problem and Exercise 3.

5. Consider the following 3NF relations about a sorority or fraternity:

MEMBER(Member_ID, Name, Address, Dues_Owed)

OFFICE(Office_Name, Officer_ID, Term_Start_Date, Budget)

EXPENSE(Ledger_Number, Office_Name, _Expense_Date, Amt_Owed)

PAYMENT(Check_Number, Expense_Ledger_ Number, Amt_Paid)

RECEIPT(Member_ID, Receipt_Date, Dues_Received)

COMMITTEE(Committee_ID, Officer_ in_Charge)

WORKERS(Committee_ID, Member_ID)

a. Foreign keys are not indicated in these relations. Decide which attributes are foreign keys and justify your decisions.

b. Draw an E-R diagram for these relations, using your answer to part a.

c. Explain the assumptions you made about cardinalities in your answer to part b. Explain why it is said that the E-R data model is more expressive or more semantically rich than the relational data model.

6. Consider the following functional dependencies:

Applicant_ID→Applicant_Name

Applicant_ID→Applicant_Address

Position_ID→Position_Title

Position_ID→Date_Position_Opens

Position_ID→Department

Applicant_ID + Position_ID→Date_Applied

Applicant_ID + Position_ID + Date_Interviewed?→

a. Represent these attributes with 3NF relations. Provide meaningful relation names.

b. Represent these attributes using an E-R diagram. Provide meaningful entity and relationship names.

7. Suppose you were designing a file of student records for your university’s placement office. One of the fields that would likely be in this file is the student’s major. Develop a coding scheme for this field that achieves the objectives outlined in this chapter for field coding.

8. In Problem and Exercise 3, you developed integrated normalized relations. Choose primary keys for the files that would hold the data for these relations. Did you use attributes from the relations for primary keys or did you design new fields? Why or why not?

9. Suppose you created a file for each relation in your answer to Problem and Exercise 3. If the following queries represented the complete set of accesses to this database, suggest and justify what primary and secondary key indexes you would build.

a. For each PART, list all vendors and their associated prices for that part.

b. List all PART RECEIPTs, including related PART fields for all the parts received on a particular day.

c. For a particular VENDOR, list all the PARTs and their associated prices that VENDOR can supply.

10. Suppose you were designing a default value for the marriage status field in a student record at your university. What possible values would you consider and why? How would the default value change depending on other factors, such as type of student (undergraduate, graduate, professional)?

11. Consider Figure 9-19B. Explain a query that would likely be processed more quickly using the denormalized relations rather than the normalized relations.

313

314

12. Consider your answers to parts a and b of Problem and Exercise 11 in Chapter 7.

a. Transform the E-R diagram you developed in part a into a set of 3NF relations. Clearly identify primary and foreign keys. Explain how you determined the primary key for any manyto- many relationships or associative entities.

b. Transform the E-R diagram you developed in part b into a set of 3NF relations. Clearly identify primary and foreign keys. Explain how you determined the primary key for any many-to-many relationships or associative entities.

13. Model a set of typical family relationships—spouse, father, and mother—in a single 3NF relation. Also include nonkey attributes name and birth date. Assume that each person has only one spouse, one father, and one mother. Show foreign keys with dashed underlining.