Complete relational database design for online stores including users, products, orders, and inventory.
Interactive Preview
Plan your application data model.
Share schema with developers.
erDiagram
USER ||--o{ ORDER : places
USER {
string id PK
string email
string name
datetime created_at
}
ORDER ||--|{ ORDER_ITEM : contains
ORDER {
string id PK
string user_id FK
float total
string status
}
ORDER_ITEM }o--|| PRODUCT : references
PRODUCT {
string id PK
string name
float price
int stock
}Flowchart