0% found this document useful (0 votes)
2 views1 page

Code

The document outlines an entity-relationship diagram (ERD) for a sales system involving customers, employees, suppliers, products, sales, and sale items. It defines the relationships between these entities, including how customers place sales, employees process sales, and suppliers supply products. Each entity includes specific attributes such as IDs, names, and relevant details for effective data management.

Uploaded by

Devil's Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Code

The document outlines an entity-relationship diagram (ERD) for a sales system involving customers, employees, suppliers, products, sales, and sale items. It defines the relationships between these entities, including how customers place sales, employees process sales, and suppliers supply products. Each entity includes specific attributes such as IDs, names, and relevant details for effective data management.

Uploaded by

Devil's Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

erDiagram

CUSTOMER ||--o{ SALE : "places"


EMPLOYEE ||--o{ SALE : "processes"
SUPPLIER ||--|{ PRODUCT : "supplies"
SALE ||--|{ SALE_ITEM : "contains"
PRODUCT ||--|{ SALE_ITEM : "is part of"

CUSTOMER {
int customer_id PK
string name
string phone
string email
}
EMPLOYEE {
int employee_id PK
string name
string role
string password_hash
}
SUPPLIER {
int supplier_id PK
string name
string contact_person
string phone
}
PRODUCT {
int product_id PK
string name
float price
int quantity_in_stock
int supplier_id FK
}
SALE {
int sale_id PK
datetime sale_date
float total_amount
int customer_id FK
int employee_id FK
}
SALE_ITEM {
int sale_id PK,FK
int product_id PK,FK
int quantity
float unit_price
}

You might also like