Business data
HOMEWORK 1:
NAME:______________________________________
STUDENT ID:________________________________
GRADE: ____________ / 100
1. What is the purpose of a class diagram? (10 points)
2. What is a primary key? (5 points)
3. What is multiplicity and how is it shown in a class diagram? (10 points)
4. What are the advantages of relational databases. (10 points)
5. Adapted from the examples we did in class, identify the relationship between the following five entities. Follow the example as shown below. Write down assumptions or business rules that affect your decision. Draw UML class diagram with sample properties for each class. Be sure to include minimum and maximum values. (15 points)
A sample answer is as follows:
Order, Customer
An order must have one and only one customer associated with it. A Customer can have many orders, but does not need to have any. This is an one-to-many [1:*] relationship.
[1:*]
Customer 0..* 1..1
Order
CustomerID Name A ddress …
OrderID OrderDate Subtotal Tax …
1) order, items
2) employee, order
3) customer, credit card number
4) airplane, flight
5) employee, CEO
6. (25 points)
A small company makes winter gloves for men and women. Originally, the gloves were woven wool, but recently the company has also added leather gloves and might consider synthetic materials in the future. The woolen gloves come in a variety of colors. Sizes are typically small, medium, and large which are slightly different for men and women (largely in terms of finger length). The factory also produces different styles which tend to be variations in length of the glove, cuffs, or designs in the stitching or emblems. The company needs a database to track the orders.
Create the class diagram and the tables in table notation for this glove manufacturing company based on their business rules. Pay attention to many-to-many relationships. As we discussed in class especially in this level there is not just one answer. You have to justify the decisions you made for the classes and the relationships.
7. (25 points)