Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.

Database

Syed Ahmer Shah edited this page Oct 30, 2026 · 1 revision

Database

43 InnoDB tables and 11 reporting views (utf8mb4). The schema and seed live in database/commerza.sql. The seed contains 5 sections, 40 products, FAQ, slider, ticker, testimonials, email templates, and settings. It has no admin accounts and no personal data.

erDiagram
    users ||--o{ orders : places
    users ||--o| cart : owns
    users ||--o| wishlist : owns
    users ||--o{ product_reviews : writes
    users ||--o{ refund_requests : files
    sections ||--o{ products : groups
    products ||--o{ order_items : "sold as"
    products ||--o{ cart_items : "added to"
    products ||--o{ wishlist_items : "saved in"
    products ||--o{ product_reviews : receives
    orders ||--|{ order_items : contains
    orders ||--o{ refund_requests : "may have"
    orders ||--o{ coupon_redemptions : applies
    coupons ||--o{ coupon_redemptions : "used by"
    admin_users ||--o{ admin_sessions : "signs in"
    admin_users ||--o{ notifications : receives
Loading

The column-level ERD and table groups are in docs/DATABASE.md.

Clone this wiki locally