Download presentation
Presentation is loading. Please wait.
1
Order Database – ER Diagram
Prepared by Taylor Segrave Spring 2017
2
Designing Databases with Entity Relationship Diagrams
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
3
Step 1: Define Entity Classes and Primary Keys
CUSTOMER CustomerID ORDER OrderID PRODUCT ProductID ORDERITEM ProductID;OrderID There is not a limit to the number of orders a customer may place. Each customer can have one order, multiple orders, or be in your database without any orders. Each order is made by a single customer. Orders must have at least one product. Orders may have multiple products. The same product could be sold through many orders. Products can be listed in the database but not ordered by a customer. Business Rules 1. Customer can have multiple orders. 2. Customer may have no orders. 3. Each order must have one Customer. 4. Each order must have a Customer. 5. An Order must have one Product. 6. An Order may have multiple Products. 7. A Product may have multiple orders. 8. A Product may have no orders.
4
Step 2: Define Relationships Among Entity Classes
CUSTOMER ORDER PRODUCT
5
Step 3: Define Attributes for each Table
CUSTOMER CustomerID LastName FirstName address Location Gender Major PhoneNumber ORDER OrderID [CustomerID] OrderDate Quantity Price ProductID PRODUCT ProductID Description OrderID ORDERITEM OrderID ProductID
6
Step 3: Define Attributes for each Table
CUSTOMER CustomerID FirstName LastName Address Major Location Gender ORDER OrderID [CustomerID] OrderDate PRODUCT ProductID ProductName Price BatchSize Description Type ORDERITEM OrderID ProductID Quantity
7
(DBMS system - Microsoft Access)
Step 4: Create Database (DBMS system - Microsoft Access)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.