Professional Documents
Culture Documents
Assignment - 3: ER Diagram For Pre-Owned Dealer Database: Tables Name: 1. Customer 2. Transactions
Assignment - 3: ER Diagram For Pre-Owned Dealer Database: Tables Name: 1. Customer 2. Transactions
Tables Name:
1. CUSTOMER
2. TRANSACTIONS
Description
Relation-1 1 to One-Many relationship - One customer can make transaction one or more time to Buy
or Trade car with same dealer.
Assignment - 1 ER Diagram:
Tables Name:
1. CUSTOMER_RELATION
2. INVENTORY
3. DISCOUNT
4. SALES
Description
Relation-1 One to One-Many relationship - One customer can buy One or Multiple cars.
Relation-2 1 to Zero-Many relationship - Discount can apply to Zero/One or multiple customer sales. If there
are no seasonal discount dealers offering and customer not return customer and not eligible for
senior citizen discount in that case discount will not apply on sales. Or Might be there are multiple
sales eligible for same discount or another discount offers.
Relation-3 One to One--multiple relationship – Inventory contains one or more Car’s (New and used) for sales
and sales can also contains sales records of same car one or multiple times. If car sold as new and
same car came in inventory again to sell as used car but VIN number will be same and that establish
relation One-Many between Sales and Inventory.
Assignment -1 and Assignment-3 Integration Process – 1 ER Diagram:
1. Defined One to One or Many relations, SALES may contain one or more transactions in the TRANSACTION
table.
2. Added TRANSACTION attribute in the SALES and defined as Foreign Key to establish relation with the
TRANSACTIONS table with Primary Key attribute TRANSACTION.
3. In TRANSACTIONS table defined TRANSACTION attribute as Primary Key to establish relation with SALES.
Final integrated ER diagram of Assignment-1 and Assignment-3 :
1. Integrated process-1 diagram CUSTOMER + CUSTOMER_RELATION with SALES to track history of sales and
trade transactions with relation one to one or many.
2. Integrated DISCOUNT and INVENTORY tables with process-2 diagram (SALES + TRANSACTIONS) tables.
3. In entire ERD integration process I tried not loss any provided data and utilize in normalized way and keep
design simple.
4. Entity relations are defined as diamond box between connector of entities.
Pros –
Cons –