Auto >> AutoSPT >  >> Car Photos

Examples of ER diagram for car company?

Here's an example of an ER diagram for a car company:

Entity: Car

- Attributes:

- car_id (primary key)

- make

- model

- year

- color

- price

Entity: Customer

- Attributes:

- customer_id (primary key)

- name

- address

- phone_number

- email

Entity: Sale

- Attributes:

- sale_id (primary key)

- car_id (foreign key)

- customer_id (foreign key)

- sale_date

- sale_price

Entity: Employee

- Attributes:

- employee_id (primary key)

- name

- position

- department

Entity: Department

- Attributes:

- department_id (primary key)

- department_name

Relationships:

- Car is related to Sale (one-to-many)

- Customer is related to Sale (one-to-many)

- Employee is related to Department (many-to-one)

- Department is related to Employee (one-to-many)