Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Create the initial ER diagram. Base your design on the following business rules: A store may place many orders. ( Note the use
Create the initial ER diagram. Base your design on the following business rules: A store may place many orders. Note the use of may which is reflected in the ORDER optionality. An order must be placed by a store. Note that STORE is mandatory to ORDER. In this ERD, the order environment apparently reflects a wholesale environment. An order contains at least one order line. Note that ORDERLINE is mandatory to ORDER, and viceversa. Each order line is contained in one and only one order. Discussion: Although a given item such as a hammer may be found in many orders, a specific hammer sold to a specific store is found in only one order. Each order line has a specific product written in it A product may be written in many orders. Discussion: Many stores can order one or more specific products, but a product that is not in demand may never be sold to a store and will, therefore, not show up in any order line note that ORDERLINE is optional to PRODUCT.Also, note that each order line may indicate more than one of a specific item. For example, the item may be hammer and the number sold may be or or The ORDERLINE entity would have at least the following attributes: ORDERNUM, ORDLINENUM, PRODCODE, ORDLINEPRICE, ORDLINEQUANTITY. The ORDERLINE composite PK would be ORDERNUM ORDLINENUM. You might add the derived attribute ORDLINEAMOUNT, which would be the result of multiplying ORDLINEPRICE and ORDLINEQUANTITY. A store may employ many employees. Discussion: A new store may not yet have any employees, yet the database may already include the new store information location, type, and so on If you made the EMPLOYEE entity mandatory to STORE, you would have to create an employee for that store before you had even hired one. Each employee is employed by one and only one store. An employee may have one or more dependents. Discussion: You cannot require an employee to have dependents, so DEPENDENT is optional to EMPLOYEE. Note the use of the word may in the relationship. A dependent must be related to an employee. Discussion: It makes no sense to keep track of dependents of people who are not even employees. Therefore, EMPLOYEE is mandatory to DEPENDENT.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started