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

ER Diagram

This document contains the schema for several database tables related to an e-commerce application. The tables include users, products, orders, discounts, and other related entities. Primary keys are designated as id fields and timestamps are used for created and updated fields. Indexes are defined for many tables. Relationships between tables are defined through foreign keys linking primary keys.

Uploaded by

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

ER Diagram

This document contains the schema for several database tables related to an e-commerce application. The tables include users, products, orders, discounts, and other related entities. Primary keys are designated as id fields and timestamps are used for created and updated fields. Indexes are defined for many tables. Relationships between tables are defined through foreign keys linking primary keys.

Uploaded by

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

app_user_discounts

discounted_user_id BIGINT
discounts_id BIGINT
Indexes

app_user product_inventory discounts cart


id BIGINT id BIGINT id BIGINT id BIGINT
address VARCHAR(255) created_at DATETIME(6) created_at DATETIME(6) created_at DATETIME(6)

created_at DATETIME(6) quantity INT discount_name VARCHAR(255) updated_at DATETIME(6)


first_name VARCHAR(255) updated_at DATETIME(6) discount_percentage FLOAT Indexes

last_name VARCHAR(255) Indexes updated_at DATETIME(6)


password VARCHAR(255) active_or_not BIT(1)

phone_number VARCHAR(255) Indexes

role VARCHAR(255)
updated_at DATETIME(6)
username VARCHAR(255)
product_brand wish_list product
cart_id BIGINT
id BIGINT id BIGINT id BIGINT
wish_list_id BIGINT
Indexes name VARCHAR(255) created_at DATETIME(6) color VARCHAR(255)
url VARCHAR(255) updated_at DATETIME(6) created_at DATETIME(6)

created_at DATETIME(6) user_id BIGINT description VARCHAR(255)


updated_at DATETIME(6) Indexes image VARCHAR(255)
Indexes name VARCHAR(255)
price BIGINT
sku VARCHAR(255)

updated_at DATETIME(6)
brand_id BIGINT
cart_items wish_list_items product_category order_details
category_id BIGINT
id BIGINT id BIGINT id BIGINT id BIGINT
inventory_id BIGINT
created_at DATETIME(6) created_at DATETIME(6) created_at DATETIME(6) created_at DATETIME(6)
sales BIGINT
quantity BIGINT updated_at DATETIME(6) type VARCHAR(255) payment_id VARCHAR(255) Indexes
updated_at DATETIME(6) user_wishlist_id BIGINT updated_at DATETIME(6) total_price BIGINT

cart_product_id BIGINT wishlisted_product_id BIGINT url VARCHAR(255) updated_at DATETIME(6)


user_cart_id BIGINT Indexes Indexes order_user_id BIGINT
Indexes Indexes

order_item sales_in_day_products_sold sales_in_day


id BIGINT sales_in_day_id BIGINT id BIGINT

created_at DATETIME(6) products_sold_id BIGINT date DATE


quantity INT Indexes total_sale_amount BIGINT
updated_at DATETIME(6) total_sale_quantity BIGINT
order_details_id BIGINT Indexes

product_id BIGINT
Indexes

You might also like