Presentation is loading. Please wait.

Presentation is loading. Please wait.

Order Database – ER Diagram

Similar presentations


Presentation on theme: "Order Database – ER Diagram"— Presentation transcript:

1 Order Database – ER Diagram
By James Jennings

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 Product ProductID Order OrderID Business Rules Customer may have multiple orders Customers may have no orders. Each order has one Customer Each order must have a Customer An Order must have one product An order may have multiple products A product may have multiple orders 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 FirstName LastName Address Major Location Gender Product ProductID ProductName Price BatchSize Description Type Order OrderID Customer Date Product Quantity

6 Step 3: Define Attributes for each Table
Customer CustomerID FirstName LastName Address Major Location Gender Product ProductID ProductName Price BatchSize Description Type OrderID OrderItem OrderID ProductID Quantity Order OrderID CustomerID Date ProductID Quantity

7 Step 2: Define Relationships Among Entity Classes
CUSTOMER ORDER OrderItem PRODUCT

8 Step 4: Create Database


Download ppt "Order Database – ER Diagram"

Similar presentations


Ads by Google