Database Management Systems/3e Review Questions and Exercises Chapter 2 Review Questions 1. How are business rules represented in class diagrams? 2. What is the purpose of a class diagram (or entity-relationship diagram)? 3. What is a reflexive association and how is it shown on a class diagram? 4. What is a primary key? 5. What is multiplicity and how is it shown on a class diagram? 6. What are the primary data types used in business applications? 7. How is inheritance shown in an entity-relationship diagram? 8. How do events and triggers relate to objects or entities? 9. What problems are complicated with large projects? 10. How can computer-aided software engineering tools help on large projects? Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin Exercises 1. A small company that rents canoes needs a database to track basic information about the rental and the canoes. Eventually, the firm wants to identify customers who cause problems by damaging the canoes, but for now, the managers just want to track the costs. The managers have outlined the data as a form. Create the class diagram for this case. Rental ID Canoe Rental Rent Date Customer Credit Card Number Last Name, First Name Expiration Date Email Phone Name on Card Address Deposit Amount City, State PostalCode Country Number Description: Length, Material Returned Date Fee Damage Charge Total Total 2. A small company that specializes in pet grooming needs a database to record the work done by its employees. Currently, the company uses a paper sheet similar to the form shown here. For each time slot, the employee records information about the customer, the pet, and the tasks performed. All tasks have a base fee, but the employee can alter the amount depending on the difficulty and the animal. The employees are also encouraged to record comments regarding the pet and the specific task. Create the class diagram for this case. Employee Last Name First Name DateHired Specialty Daily Grooming Record Date Start Time Owner Name, Phone, Address Pet Name, Category, Gender Task Time Fee Comments Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin 3. A dentist who runs a small office employing himself, three hygienists, and a receptionist wants a database to schedule appointments. He has a commercial billing system to handle payments and insurance, but appointments are currently written on a paper form similar to the sample shown here. The form currently only tracks the patient name and the primary procedure to be performed (cleaning, x-ray, filling, and so on). He wants to add a little more detail and list al of the procedures planned, the estimated fee for each procedure, and the estimated insurance coverage. The base fees should be stored with the procedures, but the insurance amounts are highly variable and will be entered by the receptionist who can get estimates from the billing system. The system also has to track the patient’s phone number and e-mail address and record how they want to be notified. Eventually, it could send e-mail messages to patients as reminders. Create the class diagram for this case. Date Time Dentist 10:00 Patient Name Procedure Fee 10:30 Hygienist Mary Patient Name Procedure Hygienist Susan Hygienist David Patient Name Procedure 11:00 Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin 4. An aging shoe manufacturing company has decided to abandon the highly competitive market for low-cost mass-market shoes. Instead, it wants to have customers order custom shoes that will be made on demand. Customers will trace or scan their feet and molds will be built specifically for each customer. The foot information will be digitized and stored in the database so it can be retrieved and used whenever the customer orders shoes. The firm will produce a variety of standard styles of shoes. Customers will select a style, choose a color and size, and in many cases choose a material. The orders are sent to company factories that customize the shoe to each person. Customers can also specify minor adjustments to most shoes—such as asking for slightly wider shoes for certain tasks. The basic information is entered on the sample form, but the company needs everything in a database. Create the normalized tables for this case. OrderID Estimated Ship Date Order Date Actual Ship Date Shipping Cost Customer Last Name, First Name, Phone, Email Address, City, State, PostalCode Country LeftFootID, RightFoodID, Comments Shipping Address City, State, PostalCode Country StyleID Description Color Material Size Adjustments Price 5. Experience exercise: Talk to a manager (or a local store) and create a class diagram for the system. Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin 6. Identify the typical relationships between the following entities. Write down any assumptions or comments that affect your decision. Be sure to include minimum and maximum values. a) Bookstore, Book b) Van, Driver c) Computer, IP Address d) Person, Prescription glasses e) House, Kitchen f) Cruise ship, Pool g) Cruise ship, Docking berth h) Bank, Federal Reserve district i) Company, Director j) Television show, Time slot k) Company, NAICS 6-digit code l) Checking account number, Customer m) Automobile, VIN n) Fishing license, Person o) Drivers license, Person p) Plane ticket, Passenger q) Prescription, Patient r) Latitude longitude point, Road 7. For each of the entities in the following list (left side), identify whether each of the items on the right should be an attribute of that entity or a separate entity. a) Shoes Size, Sale date, Color, Price, Salesperson, Style, Manufacturer b) Automobile Model, Owner, Manufacturer, Salesperson, Engine, Driver c) Factory Machine, City, Employee, Manager, Owner, Size d) Prison Guard, Prisoner, Warden, Location, State/Federal, Capacity e) Party Location, Reason, Guest, Menu, Start time, Caterer, Band Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin 8. Your college radio station has a problem. To broadcast songs—particularly those streamed over the Internet, the station has to keep a detailed log of what songs were played. The studios also want to know how many listeners received the song. For Internet streams, this number is shown by the streaming software. Although the studios want detailed information on each song, the station’s DJs find it easier to pick the songs by the artist and the CD. The station wants an easy-to-use database that lets the DJ quickly pick the song each time it is played, enter the number of listeners, and any comments—particularly if the song does not play all the way through for some reason. Based on your knowledge of music and the sample log page, create the class diagram for this case. Date Time Employee Song Artist CD Studio Post, Database Management Systems, 3/e – Review Questions and Exercises Comments #Listeners ©2005 McGraw-Hill/Irwin 9. A local company is creating a new in-car toll system. Customers will purchase an emitter which is a small transmitter placed in the car. They will register a credit card number with the company. Whenever the customer drives past the toll collection point, the emitter sends an ID signal that is picked up at the booth. The time and fee are recorded and the customer is sent a bill at the end of the month and the credit card is automatically billed for the total monthly amount. The slightly complicated part is that each location charges different fees based on the day of the week and the time of day. For instance, rush hour charges are generally higher than at other times. The report provides a partial picture of the fee structure and the data collected at a single location. Of course, there are multiple locations, and the customer data has to be consolidated to provide a total bill. To help reduce theft, emitters are identified with specific vehicles, but customers can transfer them when they sell a car. Create the class diagram for this case. Fee Structure Location Description Traffic Log Date Time EmitterID Fee DayOfWeek Start Time End Time Fee MTWTF 6:00 8:00 $3 MTWT F SS 15:00 15:00 00:00 18:00 18:00 24:00 $3 $5 $2 Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin Sally’s Pet Store 10. Do some initial research on retail sales and pet stores. Identify the primary benefits you expect to gain from a transaction processing system for Sally’s Pet Store. Estimate the time and costs required to design and build the database application. 11. Extend the class diagram for Sally’s Pet Store by including the details needed to track the genealogy of the all of the animals. 12. Extend the class diagram for Sally’s Pet Store by including the details needed to track the health and veterinary records for the animals. 13. Extend the Pet Store class diagram to include scheduling of appointments for pet grooming. Rolling Thunder Bicycles 14. Redesign the Rolling Thunder class diagram using an object-oriented approach. Identify all of the classes, properties, and methods. 15. Rolling Thunder Bicycles is thinking about opening a chain of bicycle stores. Explain how the database would have to be altered to accommodate this change. Add the proposed components to the class diagram. 16. If Rolling Thunder Bicycles wants to add a website to sell bicycles over the Internet, what additional data needs to be collected? Extend the class diagram to handle this additional data. Post, Database Management Systems, 3/e – Review Questions and Exercises ©2005 McGraw-Hill/Irwin
© Copyright 2026 Paperzz