Uploaded by Emmm Song

ERD Problems (1)

advertisement
1. Create an E-R model for the following requirements.
 An INVOICE is written by a SALESREP. Each sales representative can write
many invoices, but each invoice is written by a single sales representative.
 The INVOICE is written for a single CUSTOMER. However, each customer
may have many invoices.
 An INVOICE may include many detail lines (LINE) which describe the
products bought by the customer.
 The product information is stored in a PRODUCT entity.
 The product's vendor information is found in a VENDOR entity.
1
2. Automata Inc. produces specialty vehicles by contract. The company
operates several departments, each one of which builds a particular vehicle,
such as a limousine, a truck, a van, or an RV.
When a new vehicle is built, the department places an order with the
Purchasing Department to request specific components. Automata's
Purchasing Department is interested in creating a database to keep track of
orders and to accelerate the process of delivering materials.
The order received by the Purchasing Department can contain several
different items. An inventory is maintained so that the most frequently
requested items are delivered almost immediately. When an order comes in, it
is checked to determine whether the requested item(s) is (are) in inventory. If
an item is not in inventory, it must be ordered from a supplier. Each item may
have several suppliers.
2
3. Given the following brief summary of business rules for the ROBCOR
catering service, draw the fully labeled E-R diagram. Make sure you include
all appropriate relationships and connectivities.
Each dinner is based on a single entree, but each entree can be served at many
dinners. A guest can attend many dinners and each dinner can be attended by
many guests. Each dinner invitation may be mailed to many guests and each
guest may receive many invitations.
3
4. Draw an E/R diagram to show relationships for the following problem:
A video store rents VCR’s and videos. It has two types of customers. Those of age >= 18 and
those less than. If a customer is < 18, they must have a guardian responsible for paying and we
will want the name and phone # of the guardian. For a video we keep the title and copy# while
we keep Make and Model for a VCR. Anyone under 18 can only rent a video, not a VCR.
Anyone over 18 can rent either. For each item rented we keep the charge and description. Each
time a rental occurs we keep the date.
4
5. A warehouse holds an inventory of all the marketing and stationary supplies for a
national company. Each inventory item has a stock number. Each branch sends
their orders by fax/email/mail to the Distribution Centre for processing. The
warehouse staff pick, pack and ship each order, charging each branch for the
supplies and the cost of shipping. When an order is picked and packed, thereby
reducing the inventory, this must be reflected in the inventory.
5
6. Use the following business rules to write all appropriate connectivities in an E-R
diagram:
 A department employs many employees, but each employee is employed
by one department.
 Some employees, known as "rovers," are not assigned to any department.
 A division operates many departments, but each department is operated
by one division.
 An employee may be assigned to many projects and a project may have
many employees assigned to it.
 A project must have at least one employee assigned to it.
 One of the employees manages each department.
 One of the employees runs each division.
6
7. The Jonesburgh County Basketball Conference (JCBC) is an amateur
basketball association. Each city in the county has one team that represents it.
Each team has a maximum of twelve players and a minimum of nine players.
Each team also has up to three coaches (offensive, defensive, and PT coaches.)
Each team plays two games (home and visitor) against each of the other teams
during the season.
Given these conditions, do the following:
a. Identify the connectivity of each relationship.
b. Draw the E-R diagram to represent the JCBC database.
7
Download