Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Assignment - 3: ER diagram for Pre-owned dealer database

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:

CUSTOMER and CUSTOMER_RELATION Integration 

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 Integration Process – 2 ER Diagram:

SALES and TRANSACTIONS Integration 

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-3 :

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.

Pros –

 Integration process is represented by multiple ER diagrams


 Crow’s foot notation is used for describing entity relationships
 Data integrity and no loss of information

Cons –

 Transaction entity could be split further


 Few data redundancy like date, sale date and price, purchase price.

You might also like