Order Database – ER Diagram Prepared by Evan Hollister Spring 2016
Step 1: Define Entity Classes and Primary Keys Step 2: Define Relationships Among Entity Classes Step 3: Define Attributes for each Table Step 4: Create Database Designing Databases with Entity Relationship Diagrams
Entity ClassPrimary Key CUSTOMERCustomerID ORDERSOrderID PRODUCTSProductID ORDERITEMOrderID ProductID Step 1: Define Entity Classes and Primary Keys Business Rules A customer may have no orders. A customer may have multiple orders Each order must have a customer Each order is made by only one customer Each order has at least one product Each order may consist of many products Each product may have multiple orders Each product may have no orders
Step 2: Define Relationships Among Entity Classes CUSTOMER PRODUCT ORDER
Step 3: Define Attributes for each Table CustomerIDLastNameFirstName AddressMajor LocationGender CUSTOMER OrderIDCustomerIDOrderDate ORDER ProductIDProductNamePriceBatchSizeDescription PRODUCT OrderIDProductIDQuantity ORDERITEM
Step 4: Create Database (DBMS system - Microsoft Access)