Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Assignment – 1 ER Diagram: Tables Name: [1] - CUSCTOMER_RELATION, [2] - INVENTORY, [3]-DISCOUNT, [4] -SALES

Description of entity relation


Label-1 Defined 1 to One-Many relationship - One customer can buy One or Multiple cars.
Label-2 Defined 1 to Zero-Many relationship - Discount can apply to Zero/One or multiple customer sales. If there is 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.
Label-3 Defined 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.
Note: ER Diagram has been designed in “Information Engineering Style”.
Assignment – 3 ER Diagram: Tables Name: [1] – CUSCTOMER, [2] - TRANSACTIONS

Description of entity relation


Label-1 Defined 1 to One-Many relationship - One customer can make transaction one or more time to Buy or Trade car with same
dealer.
Assignment -1 and Assignment-3 ER Diagram integration Process – 1:

Process-1ERD-1
Process-1ERD-2

Integration process narrative:


1. Defined One to One (and only one) relation. Dealer will maintain only one CUSTOMER_RELATION table to keep unique information that
will help to get discount offer, transaction details and maintain customer unique information’s.
2. CUSTOMER table had Transaction attribute that I removed and added in the CUSTOMER_RELATION. It will help to establish relation with
other table and get information about entire sell and trade for specific customer and keep data organized.
3. Break down CUSTOMER_NAME into FIRST_NAME and LAST_NAME because in excel data was comma separated and it will keep
CUSTOMER and CUSTOMER_RELATION table data in sync. Other advantage it will help to organize data that will help in search by
FIRST_NAME and LAST_NAME.
4. Renamed ADDRESS attribute of CUSTOMER_TABLE to STREET to keep in sync with CUSTOMER table and as per data provided in the data
file ADDRESS attribute was misleading because address means “street name + city name + zip” but city and zip defined as separate
attribute in the CUSTOMER_RELATION table.
Assignment -1 and Assignment-3 ER Diagram integration Process – 2:

Integration process narrative:


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-2:
Final ERD integration process narrative:

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.

You might also like