In: Computer Science
Assume you are creating a database for IS paint store. The database needs to support the following business functions. • Allow customers to browse the inventory. Customers want to search by paint types and colors. Customers also wants to know pricing information. • A customer can be a regular customer (e.g., home owner), or a contractor or painting professionals. Different customers can get different discounts for the same type of paint. We assume each customer can get the same discount for all types of products in this store. • Allow the employees of the IS paint store to record the information of a sale. Each sale has a sale date, sale amount (colors, number of gallons, etc.), and total payment due (including prices and sales tax). • A customer can finance for large sales. For simplicity, we only consider the case where each customer can have 12 installments of payments with 0% interest rate. For example, if the total payment amount is $120, a customer can choose to pay $10 each month for 12 months to complete the payment. For each transaction like this, we should allow the employees to record the type of payment, the next payment date, amount due. If a customer misses a payment, employees of the store need to send a notice to the customer to charge a fine. The data model consists of 4 entities: Inventory, Customer, Transaction, and Transaction_Detail. Please see the solutions for assignment 1 for details of the sample design. Please answer the following questions. 1. Draw the entities and relationships using ER diagram notations. Please specify relationships with cardinalities. You may use any drawing tools to print it out, or draw it clearly on the paper. 2. Answer why you do not want to create relationships for customer search inventory, employee records transaction, and employee sends notice to customer.
a) The entities are
1. DVD
2. Video tapes
3. Customer
4. Transaction
b & c)
DVD | Item ID | Required | Single valued | Stored |
Item Type | Required | Single valued | Stored | |
Title | Required | Single valued | Stored | |
Director | Optional | Single valued | Stored | |
Time | Required | Single valued | Stored | |
Genre | Optional | Single valued | Stored | |
Price | Required | Single valued | Stored | |
Video Tape | Item ID | Required | Single valued | Stored |
Item Type | Required | Single valued | Stored | |
Title | Required | Single valued | Stored | |
Director | Optional | Single valued | Stored | |
Time | Required | Single valued | Stored | |
Genre | Optional | Single valued | Stored | |
Price | Required | Single valued | Stored | |
Customer | Customer ID | Required | Single valued | Stored |
Customer Name | Required | Single valued | Stored | |
Contact Number | Required | Single valued | Stored | |
Required | Single valued | Stored | ||
Last visit date | Optional | Single valued | Stored | |
Transaction | Transaction ID | Required | Single valued | Stored |
Item ID | Required | Multi valued | Derived | |
Due Date | Required | Multi valued | Stored | |
Return Date | Required | Multi valued | Stored | |
Total Rental Price | Required | Single valued | Derived | |
Fine | Required | Single valued | Stored |