08.02.2014 Views

Web-DSS-Chapter-03

Web-DSS-Chapter-03

Web-DSS-Chapter-03

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SECTION 3.22 ■ Exercises 73<br />

7. “Electronic commerce” is one of the most common<br />

terms in the business world. It is the buying<br />

and selling of goods and services on the Internet.<br />

One of the most popular products in e-commerce,<br />

as it is more commonly known, is the compact<br />

disc. This exercise describes the database of a CD<br />

warehouse.<br />

The company’s customers and employees<br />

access the database. Assume that customers have<br />

access to a company’s <strong>Web</strong> site and that they are<br />

able to open an account by providing their social<br />

security number, name, address, and music preferences.<br />

For each employee, the following information<br />

is recorded: an employee identification<br />

number, a name, an address, a birth date, and the<br />

title of the position within the company.<br />

The products for the CD warehouse are the<br />

albums. The database records the following information<br />

about each album: an album identification<br />

number, the name, the group name, the<br />

musical category, the name of the vocalist, the<br />

names of the other band members, and the number<br />

of CDs in stock. The database also keeps the<br />

following information about suppliers: a supplier<br />

identification number, the address, the name of<br />

the company, and the name of the contact<br />

person.<br />

An album may be bought by one or more<br />

customers, and one customer may buy one or<br />

more albums. Additionally, an employee may<br />

monitor one or more albums; however, an album<br />

is monitored by exactly one employee. Suppliers<br />

may provide one or more albums; however, an<br />

album is supplied by exactly one supplier. Using<br />

the above information, draw an E-R diagram for<br />

the CD warehouse database. Identify the relationship<br />

cardinalities and the key attribute of each<br />

entity.<br />

8. One of the three-star hotels in the Miami area is<br />

in the process of updating its database. The hotel<br />

has various room types on each of its floors. The<br />

rooms may be regular, deluxe, or a suite and each<br />

can be either a single, double, or triple. The suites<br />

have ocean views and are bigger than the regular<br />

rooms. The deluxe rooms are as big as suites, but<br />

they do not have an ocean view. All the rooms<br />

have air conditioning. Most of the rooms are<br />

non-smoking, but the hotel offers some smoking<br />

rooms as well. Each floor has a different number<br />

of a particular room type. The price of each room<br />

differs by the size of the room, the view, and the<br />

room’s location (first floor, second floor, etc.).<br />

The customers are charged on a per-day<br />

basis. The number of days is computed based on<br />

the check-in time and the check-out time. The<br />

following details are stored for each customer:<br />

name, address, check-in date, check-out date,<br />

payment method, and final bill amount. In addition<br />

to the room charges, there may be extra fees,<br />

such as telephone usage, fax services, extra beds,<br />

and room service. For this application, we assume<br />

that a room can be booked by more than<br />

one customer as long as there is no overlap and<br />

that a customer can be assigned to any available<br />

room. Draw an E-R diagram for the hotel database<br />

and state any assumptions made in order to<br />

develop a complete diagram.<br />

9. The Newark divisional office of the Life Insurance<br />

Corporation of America stores all the necessary<br />

information about its policyholders in a<br />

database. A policyholder pays a premium until<br />

the maturity of the policy or until his or her<br />

death, at which time the sum assured and the<br />

bonus are paid to the beneficiary. The premium<br />

to be paid is determined based on the age of the<br />

person proposed and the term of the policy. The<br />

Newark division records the following information<br />

about each policyholder: social security<br />

number, name, address, date of birth, maturity<br />

amount, and annual premium.<br />

The corporation has divided its Newark<br />

division into 15 zones for its convenience. For<br />

each zone, they store the Zone ID and the location.<br />

Each zone also has a manager. Every zone<br />

has a number of agents allotted, typically ranging<br />

from 10 to 20 and every agent must procure a<br />

minimum of 10 customers. Each policyholder in<br />

a particular zone is assigned to only one agent<br />

affiliated with that zone; this agent puts forth the<br />

terms of the policy. Additionally, an agent in a<br />

particular zone can serve multiple policyholders.<br />

Make assumptions for the remaining relationships<br />

and draw an E-R diagram for the corporation’s<br />

database.<br />

10. Ford distribution centers provide automotive<br />

parts to authorized dealers. The dealers then<br />

distribute the parts to customers throughout<br />

North America. Ford is under pressure to provide<br />

excellent customer service at a minimum<br />

cost. Maintaining a well-organized database of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!