dirtbike order database– er diagram prepared by (rahul dhami) fall 2012
TRANSCRIPT
![Page 1: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/1.jpg)
DirtBike Order Database– ER Diagram
Prepared by
(Rahul Dhami)
Fall 2012
![Page 2: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/2.jpg)
Step 1: Define Entity Classes and Primary Keys
Step 2: Define Relationships Among Entity Classes
Step 3: Define Fields for each Relationship
Step 4: Create Database
Designing Databases with Entity Relationship Diagrams
![Page 3: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/3.jpg)
Entity Class Primary Key
Customer Customer ID
Order Order ID
Product Product ID
Distributor Distributor ID
Step 1: Define Entity Classes and Primary Keys
Business RulesEach order is made by a single customer
Each customer can have multiple orders
Each customer can have on order
Customers can be in your database without any orders
Products can be listed in your database but not purchased
Orders cannot be blank
Orders can have more than one (multiple) products
A distributor can supply multiple products
A distributor has to supply at least one product
Each product has to have a distributor
![Page 4: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/4.jpg)
E-R Diagrams
Use 5 symbols1. Rectangle – entity class
2. Dotted line – relationship
3. | - single relationship
4. 0 – zero/optional relationship
5. Crow’s foot () – multiple relationship
![Page 5: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/5.jpg)
PRODUCT
CUSTOMER ORDER
Step 2: Define Relationships Among Entity Classes
DISTRIBUTOR
Detailed Orders
![Page 6: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/6.jpg)
Step 3: Define Fields for each Relationship
Customer ID LastName FirstName Address City State Zip Phone
ENTITY
Product ID Product Name
Manufacturer MSRP Ignition Weight QOH Distributor ID
Product
Order ID Customer ID Order Date
Order
Distributor ID Distributor
Distributor
Order ID Product ID Quantity
Detailed Orders
![Page 7: DirtBike Order Database– ER Diagram Prepared by (Rahul Dhami) Fall 2012](https://reader036.vdocument.in/reader036/viewer/2022082821/5697c0111a28abf838ccb71e/html5/thumbnails/7.jpg)
Step 4: Create Database
(At this point we will begin working with our DBMS system, which will be Microsoft Access)