Banner

 

Chapter 7

1. Draw data models for the following scenarios:

1a.

Some large cities (e.g., Cologne, Germany) have started a project called car-sharing to reduce the number of cars in the city and also reduce the cost of having a car available when needed by a person. One car is partially owned by several people. The number of owners per car may vary. Typically, not more than four people own one particular car. Also, each person can own a different percentage of the car, depending on how often she uses the car. Each person might own part of more than one car. Obviously, only one person can use the car at any particular time. Thus, a database is needed to keep track of reservations made for the car. Your data model should keep track of the owners of each car and the reservation of the car. Also keep track of any scheduled or unscheduled maintenance, tax payments, and insurance payments for each car.

1b.

A city has many streets and a street has many houses. Each house can have one or more apartment blocks. Each person can have more than one dwelling.

1c.

A new delivery pizzeria has just opened for business and has asked you to build a database for storing customer data, pizza production, pricing, and recipes. The pizzeria offers pizzas in three sizes and with two different crusts. Customers are allowed to ask for extra toppings on any pizza. The company is planning to implement a database that keeps track of what each customer has previously ordered so that personalized offers can be given to faithful customers at the time of their next call.

2.
Design a database to track actors who have won an Oscar by movie and year. Movies can win many Oscars, actors can win several Oscars, and there are many Oscars awarded (e.g., best leading female actor). For movies, you want to include the type of movie (romance, action, comedy, etc.), the movie's title, the year it was released, its rating, and the movie's length. You should record the actor's name, gender and date of birth. For an particular type of Oscar you need to record its purpose (e.g., best foreign film) and the first year it was awarded.

3.
A firms sells clothes on consignment. Each article of clothing is given a price, a date it was given to the consignment shop, the type of clothing and the season when it is worn. For pants you need to also have the waist and inseam measurement, for shirts you need the neck and sleeve measurement. For skirts and dresses you just need the size.

4.
A soccer club has asked you to design its database. A soccer player plays on one and only one team. Each team has a team name and color. Create a UML version of the data model.

 

This page is part of the promotional and support material for Data Management (open edition) by Richard T. Watson
For questions and comments please contact the author
Date revised: 10-Dec-2021