Chapter 5
Chapter 5
Chapter 5
This table contains information about patients of a dentist. Each patient belongs to a household. Patient (HouseholdNum, HouseholdName, Street, City, State, Zip, Balance, PatientNum, PatientName, (ServiceCode, Description, Fee, Date)) The following dependencies exist in the Patient table: PatientNum ==> HouseholdNum, HouseholdName, Street, City, State, Zip, Balance, PatientName HouseholdNum ==> HouseholdName, Street, City, State, Zip, Balance ServiceCode ==> Description, Fee PatientNum, ServiceCode ==> Date
12. Using your knowledge of the college environment, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in the third normal form. Student (StudentNum, StudentName, NumCredits, AdvisorNum, AdvisorName, DeptNum, DeptName, (CourseNum, Description, Term, Grade)) PREMIER PRODUCTS EXERCISE: The following exercises are based on the Premier Products database: 1. Using your knowledge of Premier Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal form. Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice)) 2. List the functional dependencies in the following table that concerns invoicing (an application Premier Products is considering adding to its database), subject to the specified conditions. For a given invoice (identified by the InvoiceNum), there will be a single customer. The customers number, name, and complete address appear on the invoice, as does the date. Also, there may be several different parts appearing on the invoice. For each part that appears, display the part number, description, price, and number shipped. Each customer that orders a particular part pays the same price. Convert this table to an equivalent collection of tables that are in third normal form. Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State, Zip, Date, (PartNum, Description, Price, NumShipped))
CHAPTER 6 REVIEW QUESTIONS: 2. What is the purpose of breaking down the overall design problem into a consideration of individual user views? 7. A database at a college is required to support the following requirements. Complete the informational level design for this set of requirements. Use your own experience to determine any constraints you need that are not stated in the problem. Represent the answer in DBDL. a. For a department, store its number and name. b. For an advisor, store his or her number, name and the number of the department to which he or she is assigned. c. For a course, store its code and description (for example, MTH110 or Algebra) d. For a student, store his or her number and name. For each course the student has taken, store the course code, course description, and grade received. In addition, store the number and name of the students advisor. Assume that an advisor may advise any number of students but that each student has just one advisor. 8. List the changes that would need to be made in your answer to Question 7 if a student could have more than one advisor. PREMIERE PRODUCTS EXERCISES: The following exercises are based on the Premier Products database as designed in Example 1: 1. Indicate the changes that need to be made to the design of the Premier Products database to support the following situation: A customer is not necessarily represented by a single sales rep, but can be represented by several sales reps. When a customer places an order, the sales rep who gets the commission on the order must be one of the collection of sales reps who represents the customer. Note: do not show design 2. Indicate the changes that need to be made to the design of the Premier Products database to support the following situation: There is no relationship between customers and sales reps. When a customer places an order, it may be through any sales rep. On the order, identify both the customer placing the order and the sales rep responsible for the order. Note: do not show design