← Back to course

RetailMart V3 — Schema Explorer

Download ZIP ↓ 16 schemas · 55 tables

Entity Relationship Diagram

Primary and foreign keys only — full column lists and sample data are in the table browser below. Drag to pan, use the zoom buttons, or pick a table on the left.

erDiagram
    audit__application_logs {
        int log_id PK
    }
    audit__procedure_calls {
        SERIAL call_id PK
    }
    audit__record_changes {
        int change_id PK
        int changed_by FK
    }
    audit__refund_failures {
        SERIAL failure_id PK
    }
    audit__refund_log {
        SERIAL refund_id PK
    }
    call_center__calls {
        int call_id PK
        int customer_id FK
        int agent_id FK
    }
    call_center__transcripts {
        int transcript_id PK
        int call_id FK
    }
    core__dim_brand {
        int brand_id PK
        int category_id FK
    }
    core__dim_category {
        int category_id PK
    }
    core__dim_date {
        date date_key PK
    }
    core__dim_department {
        int dept_id PK
    }
    core__dim_expense_category {
        int exp_cat_id PK
    }
    core__dim_region {
        int region_id PK
    }
    customers__addresses {
        int address_id PK
        int customer_id FK
    }
    customers__customers {
        int customer_id PK
    }
    customers__loyalty_points {
        int loyalty_id PK
        int customer_id FK
    }
    customers__reviews {
        int review_id PK
        int customer_id FK
        int product_id FK
    }
    customers__wallets {
        SERIAL wallet_id PK
        INT cust_id FK
    }
    finance__accounts {
        SERIAL account_id PK
    }
    finance__expenses {
        int expense_id PK
        int exp_cat_id FK
    }
    finance__payment_modes {
        SERIAL mode_id PK
    }
    finance__payments {
        INT payment_id PK
        INT order_id FK
    }
    finance__revenue_summary {
        int summary_id PK
    }
    finance__transfer_log {
        SERIAL transfer_id PK
        INT from_account FK
        INT to_account FK
    }
    hr__attendance {
        int attendance_id PK
        int employee_id FK
    }
    hr__salary_history {
        int payment_id PK
        int employee_id FK
    }
    loyalty__members {
        int customer_id PK
        int tier_id FK
    }
    loyalty__redemptions {
        int redemption_id PK
        int customer_id FK
    }
    loyalty__tiers {
        int tier_id PK
    }
    manufacture__production_lines {
        int line_id PK
    }
    manufacture__work_orders {
        int work_order_id PK
        int product_id FK
        int line_id FK
    }
    marketing__ads_spend {
        int spend_id PK
        int campaign_id FK
    }
    marketing__campaigns {
        int campaign_id PK
    }
    marketing__email_clicks {
        int email_id PK
        int campaign_id FK
    }
    payroll__pay_slips {
        int pay_slip_id PK
        int employee_id FK
    }
    products__inventory {
        int store_id FK
        int product_id FK
    }
    products__products {
        int product_id PK
        int brand_id FK
        int supplier_id FK
    }
    products__promotions {
        int promo_id PK
    }
    products__suppliers {
        int supplier_id PK
    }
    sales__order_items {
        int order_item_id PK
        int order_id FK
        int prod_id FK
    }
    sales__orders {
        int order_id PK
        int cust_id FK
        int store_id FK
    }
    sales__payments {
        int payment_id PK
        int order_id FK
    }
    sales__returns {
        int return_id PK
        int order_id FK
        int prod_id FK
    }
    sales__shipments {
        int shipment_id PK
        int order_id FK
    }
    stores__employees {
        int employee_id PK
        int store_id FK
        int dept_id FK
    }
    stores__expenses {
        int store_expense_id PK
        int store_id FK
    }
    stores__stores {
        int store_id PK
        int region_id FK
    }
    supply_chain__inventory_snapshots {
        int warehouse_id FK
        int product_id FK
    }
    supply_chain__shipments {
        int shipment_id PK
        int supplier_id FK
        int warehouse_id FK
        int product_id FK
    }
    supply_chain__warehouses {
        int warehouse_id PK
    }
    support__tickets {
        int ticket_id PK
        int customer_id FK
        int agent_id FK
    }
    web_events__events {
        int event_id PK
        int view_id FK
    }
    web_events__page_views {
        int view_id PK
        int customer_id FK
    }
    core__dim_category ||--o{ core__dim_brand : "category_id"
    core__dim_region ||--o{ stores__stores : "region_id"
    stores__stores ||--o{ stores__employees : "store_id"
    core__dim_department ||--o{ stores__employees : "dept_id"
    stores__stores ||--o{ stores__expenses : "store_id"
    core__dim_brand ||--o{ products__products : "brand_id"
    products__suppliers ||--o{ products__products : "supplier_id"
    stores__stores ||--o{ products__inventory : "store_id"
    products__products ||--o{ products__inventory : "product_id"
    customers__customers ||--o{ customers__addresses : "customer_id"
    customers__customers ||--o{ customers__reviews : "customer_id"
    products__products ||--o{ customers__reviews : "product_id"
    customers__customers ||--o{ customers__loyalty_points : "customer_id"
    customers__customers ||--o{ sales__orders : "cust_id"
    stores__stores ||--o{ sales__orders : "store_id"
    sales__orders ||--o{ sales__order_items : "order_id"
    products__products ||--o{ sales__order_items : "prod_id"
    sales__orders ||--o{ sales__payments : "order_id"
    sales__orders ||--o{ sales__shipments : "order_id"
    sales__orders ||--o{ sales__returns : "order_id"
    products__products ||--o{ sales__returns : "prod_id"
    core__dim_expense_category ||--o{ finance__expenses : "exp_cat_id"
    stores__employees ||--o{ hr__attendance : "employee_id"
    stores__employees ||--o{ hr__salary_history : "employee_id"
    marketing__campaigns ||--o{ marketing__ads_spend : "campaign_id"
    marketing__campaigns ||--o{ marketing__email_clicks : "campaign_id"
    customers__customers ||--o{ support__tickets : "customer_id"
    stores__employees ||--o{ support__tickets : "agent_id"
    customers__customers ||--o{ web_events__page_views : "customer_id"
    web_events__page_views ||--o{ web_events__events : "view_id"
    products__suppliers ||--o{ supply_chain__shipments : "supplier_id"
    supply_chain__warehouses ||--o{ supply_chain__shipments : "warehouse_id"
    products__products ||--o{ supply_chain__shipments : "product_id"
    supply_chain__warehouses ||--o{ supply_chain__inventory_snapshots : "warehouse_id"
    products__products ||--o{ supply_chain__inventory_snapshots : "product_id"
    customers__customers ||--o{ loyalty__members : "customer_id"
    loyalty__tiers ||--o{ loyalty__members : "tier_id"
    customers__customers ||--o{ loyalty__redemptions : "customer_id"
    products__products ||--o{ manufacture__work_orders : "product_id"
    manufacture__production_lines ||--o{ manufacture__work_orders : "line_id"
    stores__employees ||--o{ payroll__pay_slips : "employee_id"
    customers__customers ||--o{ call_center__calls : "customer_id"
    stores__employees ||--o{ call_center__calls : "agent_id"
    call_center__calls ||--o{ call_center__transcripts : "call_id"
    stores__employees ||--o{ audit__record_changes : "changed_by"
    finance__accounts ||--o{ finance__transfer_log : "from_account"
    finance__accounts ||--o{ finance__transfer_log : "to_account"
    sales__orders ||--o{ finance__payments : "order_id"
    customers__customers ||--o{ customers__wallets : "cust_id"

Browse Tables

← Pick a table from the list to see its columns and sample data.
audit

api_requests

request_idtext
timestamptimestamp
endpointvarchar(100)
methodvarchar(10)
status_codeint
response_time_msint
user_agenttext
Sample data
request_idtimestampendpointmethodstatus_coderesponse_time_msuser_agent
f9962189-591b-472f-9b28-e554b1d8275c2025-09-14 10:04:59/api/v1/productsPUT2001686Mozilla/5.0 (Linux; Android 3.2.1) Apple
4b38a415-2544-48ef-ba45-67a53f93f2d12024-03-27 15:48:41/api/v1/ordersGET400882Mozilla/5.0 (iPad; CPU iPad OS 10_3_3 li
bb555fe5-9888-4335-a4eb-8a3a7a0a5f5e2024-02-14 17:08:42/api/v1/ordersDELETE2001131Mozilla/5.0 (iPod; U; CPU iPhone OS 3_0
audit

application_logs

log_idint🔑 PK
timestamptimestamp
service_namevarchar(50)
levelvarchar(10)
messagetext
trace_idvarchar(50)
Sample data
log_idtimestampservice_namelevelmessagetrace_id
12025-08-05 15:11:25PaymentGatewayFATALSystem crash - engage plug-and-play infob178a52d-a8eb-427b-8b5d-645c22cf2557
22025-10-20 14:16:02AuthServiceERRORDatabase deadlock - cultivate value-adde5b760acd-9921-4bc5-9afa-46f64b389691
32024-02-27 10:32:12AuthServiceERRORInvalid schema - reinvent killer web ser48515880-8786-41c9-b385-a45ff4233372
audit

procedure_calls

call_idSERIAL🔑 PK
proc_nameVARCHAR(200)
input_paramsJSONB
outcomeVARCHAR(20)
error_stateVARCHAR(10)
error_messageTEXT
duration_msINT
called_atTIMESTAMP
Sample data
call_idproc_nameinput_paramsoutcomeerror_stateerror_messageduration_mscalled_at
1compute_customer_tier{"id": 47398}success24602025-07-01 20:21:25
2close_expired_orders{"id": 33272}success20642025-07-10 19:08:35
3transfer_money{"id": 46730}success3072025-12-08 23:32:02
audit

record_changes

change_idint🔑 PK
table_namevarchar(50)
record_idint
column_namevarchar(50)
old_valuetext
new_valuetext
changed_byintFK → stores.employees
changed_attimestamp
actionvarchar(10)
Sample data
change_idtable_namerecord_idcolumn_nameold_valuenew_valuechanged_bychanged_ataction
1products2552price4519.364660.812352024-03-30 17:49:50UPDATE
2employees1632salary305493288022542024-11-06 22:14:51UPDATE
3products23price773.9835.0410012024-01-11 11:42:20UPDATE
audit

refund_failures

failure_idSERIAL🔑 PK
payment_idINT
error_messageTEXT
failed_atTIMESTAMP
Sample data
failure_idpayment_iderror_messagefailed_at
178685Amount exceeds original payment2026-01-11 00:11:50
293910Payment gateway timeout2025-09-28 07:31:05
3100688Duplicate refund attempt2025-07-04 14:25:55
audit

refund_log

refund_idSERIAL🔑 PK
payment_idINT
order_idINT
amountNUMERIC(14,2)
reasonTEXT
refunded_atTIMESTAMP
statusVARCHAR(20)
Sample data
refund_idpayment_idorder_idamountreasonrefunded_atstatus
157847.56Wrong Item2025-08-08 00:00:00Completed
27967490.76Wrong Item2024-06-19 00:00:00Completed
355606482.04Wrong Item2026-02-10 00:00:00Completed
call_center

calls

call_idint🔑 PK
customer_idintFK → customers.customers
agent_idintFK → stores.employees
call_start_timetimestamp
call_duration_secondsint
call_reasonvarchar(50)
statusvarchar(20)
Sample data
call_idcustomer_idagent_idcall_start_timecall_duration_secondscall_reasonstatus
174182422025-06-06 20:11:53.322867754Return/RefundPending
22005414252025-05-23 06:38:23.602628958Return/RefundEscalated
3311116682026-01-18 08:36:28.3755001654Order InquiryPending
call_center

transcripts

transcript_idint🔑 PK
call_idintFK → call_center.calls
transcript_texttext
sentiment_scorenumeric(4,2)
Sample data
transcript_idcall_idtranscript_textsentiment_score
11Customer called about return/refund. Men0.95
22Customer called about return/refund. Men0.82
33Customer called about order inquiry. Men0.75
core

dim_brand

brand_idint🔑 PK
brand_namevarchar(100)
category_idintFK → core.dim_category
Sample data
brand_idbrand_namecategory_id
1Samsung1
2Apple1
3Sony1
core

dim_category

category_idint🔑 PK
category_namevarchar(50)
Sample data
category_idcategory_name
1Electronics
2Fashion
3Home & Kitchen
core

dim_date

date_keydate🔑 PK
dayint
monthint
yearint
quarterint
day_namevarchar(10)
month_namevarchar(10)
Sample data
date_keydaymonthyearquarterday_namemonth_name
2024-01-011120241MonJan
2024-01-022120241TueJan
2024-01-033120241WedJan
core

dim_department

dept_idint🔑 PK
dept_namevarchar(50)
Sample data
dept_iddept_name
1Sales
2Operations
3Marketing
core

dim_expense_category

exp_cat_idint🔑 PK
category_namevarchar(50)
Sample data
exp_cat_idcategory_name
1Rent
2Utilities
3Maintenance
core

dim_region

region_idint🔑 PK
region_namevarchar(20)
countryvarchar(50)
statevarchar(50)
Sample data
region_idregion_namecountrystate
1North EastIndiaRajasthan
2NorthIndiaBihar
3NorthIndiaAndhra Pradesh
customers

addresses

address_idint🔑 PK
customer_idintFK → customers.customers
address_linetext
cityvarchar(50)
statevarchar(50)
pincodevarchar(10)
is_defaultboolean
Sample data
address_idcustomer_idaddress_linecitystatepincodeis_default
11H.No. 702 BhattacharyyaPuriOdisha961295True
2273, Deep GanjNoidaUttar Pradesh783840True
customers

customers

customer_idint🔑 PK
first_namevarchar(50)
last_namevarchar(50)
emailvarchar(100)
phonevarchar(20)
registration_datedate
tiervarchar(20)
tier_updated_attimestamp
Sample data
customer_idfirst_namelast_nameemailphoneregistration_datetiertier_updated_at
1MeeraNaidumeera.naidu0@bmw.com9126542351162023-06-12Bronze2025-07-27 00:00:00
2LakshmiSinghlakshmi.singh1@expedia.com94078161842025-08-23Silver2025-06-29 00:00:00
3ZoyaLalzoya.lal2@yahoo.com59310341312024-04-17Bronze2026-01-17 00:00:00
customers

loyalty_points

loyalty_idint🔑 PK
customer_idintFK → customers.customers
points_earnedint
sourcevarchar(50)
date_earneddate
Sample data
loyalty_idcustomer_idpoints_earnedsourcedate_earned
115691185Bonus2025-10-15
2669663Purchase2025-08-25
33090236Bonus2025-08-17
customers

reviews

review_idint🔑 PK
customer_idintFK → customers.customers
product_idintFK → products.products
ratingint
review_texttext
review_datedate
Sample data
review_idcustomer_idproduct_idratingreview_textreview_date
1341532954Ipsa aliquid sit esse explicabo.2025-10-26
24761357835Consectetur dolores distinctio dolorum e2024-12-10
34091848735Ad corporis sint sapiente incidunt volup2025-06-14
customers

wallets

wallet_idSERIAL🔑 PK
cust_idINTFK → customers.customers
balanceNUMERIC(14,2)
last_updatedTIMESTAMP
Sample data
wallet_idcust_idbalancelast_updated
11730.362026-01-02 18:39:32
2282.712025-05-21 00:17:21
331230.312025-09-02 18:00:51
finance

accounts

account_idSERIAL🔑 PK
account_holderVARCHAR(100)
account_typeVARCHAR(20)
balanceNUMERIC(14,2)
created_atTIMESTAMP
Sample data
account_idaccount_holderaccount_typebalancecreated_at
1Aryan MaharajSavings67467.892023-09-26 03:45:28
2Harsh ChahalCurrent66360.262024-10-08 14:08:35
3Ayushman ChanderSavings465038.662023-08-28 09:48:21
finance

expenses

expense_idint🔑 PK
expense_datedate
exp_cat_idintFK → core.dim_expense_category
amountnumeric(12,2)
descriptiontext
Sample data
expense_idexpense_dateexp_cat_idamountdescription
12024-11-15537409.99Software expense engineer best-of-breed
22025-01-308899229.97Payroll expense cultivate customized ban
32026-02-11623458.38Travel expense mesh sticky e-services
finance

payment_modes

mode_idSERIAL🔑 PK
mode_nameVARCHAR(30)
Sample data
mode_idmode_name
1Cash
2UPI
3Credit Card
finance

payments

payment_idINT🔑 PK
order_idINTFK → sales.orders
cust_idINT
amountNUMERIC(14,2)
statusVARCHAR(20)
refund_reasonTEXT
refunded_atTIMESTAMP
Sample data
payment_idorder_idcust_idamountstatusrefund_reasonrefunded_at
111077022033.22Completed
2339584314.36Completed
3427898237279.22Completed
finance

revenue_summary

summary_idint🔑 PK
summary_datedate
total_revenuenumeric(12,2)
total_ordersint
avg_order_valuenumeric(12,2)
Sample data
summary_idsummary_datetotal_revenuetotal_ordersavg_order_value
12024-01-01145488.61174836.14
22024-01-02406425.03511157.91
32024-01-03196978.441231601.45
finance

transfer_log

transfer_idSERIAL🔑 PK
from_accountINTFK → finance.accounts
to_accountINTFK → finance.accounts
amountNUMERIC(14,2)
transferred_atTIMESTAMP
statusVARCHAR(20)
Sample data
transfer_idfrom_accountto_accountamounttransferred_atstatus
111010848287.042025-04-13 08:48:27Failed
21108841400.42025-08-20 12:45:07Success
3894611702.052025-06-11 02:32:49Success
hr

attendance

attendance_idint🔑 PK
employee_idintFK → stores.employees
attendance_datedate
Sample data
attendance_idemployee_idattendance_datecheck_incheck_out
115492024-04-212024-04-21 10:00:002024-04-21 20:00:00
2112024-02-182024-02-18 10:00:002024-02-18 18:00:00
3122025-09-172025-09-17 10:00:002025-09-17 19:00:00
hr

salary_history

payment_idint🔑 PK
employee_idintFK → stores.employees
amountnumeric(12,2)
payment_datedate
statusvarchar(20)
Sample data
payment_idemployee_idamountpayment_datestatus
114058.612025-03-25Processed
214152.622025-04-25Processed
314116.932025-05-25Processed
loyalty

members

customer_idint🔑 PK
tier_idintFK → loyalty.tiers
points_balanceint
join_datedate
Sample data
customer_idtier_idpoints_balancejoin_date
255574125082022-12-19
17637350912021-11-04
2971356962021-03-22
loyalty

redemptions

redemption_idint🔑 PK
customer_idintFK → customers.customers
reward_namevarchar(100)
points_redeemedint
redemption_datedate
Sample data
redemption_idcustomer_idreward_namepoints_redeemedredemption_date
122457Free Shipping Voucher2002025-07-15
238909Product Discount5002024-11-09
331452Gift Card $1010002025-12-31
loyalty

tiers

tier_idint🔑 PK
tier_namevarchar(20)
min_pointsint
max_pointsint
benefitstext
Sample data
tier_idtier_namemin_pointsmax_pointsbenefits
1Bronze0999Free Shipping > $50
2Silver100049995% Discount, Free Shipping
3Gold5000999910% Discount, Priority Support
manufacture

production_lines

line_idint🔑 PK
line_namevarchar(50)
capacity_per_hourint
supervisor_namevarchar(50)
Sample data
line_idline_namecapacity_per_hoursupervisor_name
1Line-1142Jacob Parsons
2Line-2230Ronnie Parker
3Line-3278Darlene James
manufacture

work_orders

work_order_idint🔑 PK
product_idintFK → products.products
line_idintFK → manufacture.production_lines
start_timestamptimestamp
end_timestamptimestamp
quantity_producedint
rejected_quantityint
statusvarchar(20)
Sample data
work_order_idproduct_idline_idstart_timestampend_timestampquantity_producedrejected_quantitystatus
123732025-12-17 02:46:27.7786512025-12-17 13:46:27.778651255170Completed
2567942024-05-20 19:46:11.6382692024-05-21 03:46:11.638269190158Completed
3494062024-11-04 18:00:40.6618092024-11-04 20:00:40.66180948110Completed
marketing

ads_spend

spend_idint🔑 PK
campaign_idintFK → marketing.campaigns
spend_datedate
amountnumeric(12,2)
platformvarchar(50)
Sample data
spend_idcampaign_idspend_dateamountplatform
142025-03-15360.28Facebook
2762024-12-02538.49Google
3152025-11-161599.49LinkedIn
marketing

campaigns

campaign_idint🔑 PK
campaign_namevarchar(100)
start_datedate
end_datedate
budgetnumeric(12,2)
Sample data
campaign_idcampaign_namestart_dateend_datebudget
1Switchable context-sensitive toolset2024-04-052024-04-13398126.48
2Enterprise-wide holistic capability2025-04-162025-04-22334073.16
3Secured tertiary extranet2024-01-012024-01-10110231.45
marketing

email_clicks

email_idint🔑 PK
campaign_idintFK → marketing.campaigns
sent_datedate
emails_sentint
emails_openedint
emails_clickedint
Sample data
email_idcampaign_idsent_dateemails_sentemails_openedemails_clicked
12432024-11-19966153771698
21272025-09-043120383952884
31162024-10-1369961654818
payroll

pay_slips

pay_slip_idint🔑 PK
employee_idintFK → stores.employees
salary_monthvarchar(20)
salary_yearint
basic_salarynumeric(12,2)
hranumeric(12,2)
other_allowancesnumeric(12,2)
pfnumeric(12,2)
professional_taxnumeric(12,2)
income_taxnumeric(12,2)
gross_salarynumeric(12,2)
net_salarynumeric(12,2)
payment_datedate
Sample data
pay_slip_idemployee_idsalary_monthsalary_yearbasic_salaryhraother_allowancespfprofessional_taxincome_taxgross_salarynet_salarypayment_date
11August20251631.63815.821223.72195.82000.03671.173275.372025-08-31
21September20251631.63815.821223.72195.82000.03671.173275.372025-09-30
31October20251631.63815.821223.72195.82000.03671.173275.372025-10-31
payroll

tax_brackets

min_salarynumeric(12,2)
max_salarynumeric(12,2)
tax_ratenumeric(4,2)
Sample data
min_salarymax_salarytax_rate
03000000.0
3000016000000.05
6000019000000.1
products

inventory

store_idintFK → stores.stores
product_idintFK → products.products
quantity_on_handint
reorder_levelint
Sample data
store_idproduct_idquantity_on_handreorder_level
863285413
239223715
132532611019
products

products

product_idint🔑 PK
product_namevarchar(150)
brand_idintFK → core.dim_brand
supplier_idintFK → products.suppliers
pricenumeric(12,2)
cost_pricenumeric(12,2)
Sample data
product_idproduct_namebrand_idsupplier_idpricecost_price
1Samsung Animi Max190125812.0788068.45
2Samsung Recusandae Lite150106495.4974546.84
3Samsung Placeat Plus123149041.53104329.07
products

promotions

promo_idint🔑 PK
promo_namevarchar(100)
discount_percentint
start_datedate
end_datedate
activeboolean
Sample data
promo_idpromo_namediscount_percentstart_dateend_dateactive
1Multi-lateral Sale102026-02-122026-02-16False
2Open-architected Sale152024-11-292024-12-09True
3Customer-focused Sale52025-08-012025-08-16True
products

suppliers

supplier_idint🔑 PK
supplier_namevarchar(100)
contact_namevarchar(100)
cityvarchar(50)
emailvarchar(100)
Sample data
supplier_idsupplier_namecontact_namecityemail
1Tata Consumer ProductsAishani SenguptaDelhiutkarsh26@prabhakar.org
2ITC FoodsBachittar VoraNashikaadi24@grewal.org
3Hindustan UnileverGaurang ShuklaPunewsura@singhal.com
sales

order_items

order_item_idint🔑 PK
order_idintFK → sales.orders
prod_idintFK → products.products
quantityint
unit_pricenumeric(12,2)
gross_amountnumeric(12,2)
discount_amountnumeric(12,2)
net_amountnumeric(12,2)
Sample data
order_item_idorder_idprod_idquantityunit_pricegross_amountdiscount_amountnet_amount
115159211016.6122033.220.022033.22
225611233554.567109.00.067109.0
32548034379.4813138.440.013138.44
sales

orders

order_idint🔑 PK
cust_idintFK → customers.customers
store_idintFK → stores.stores
order_datedate
order_statusvarchar(20)
gross_totalnumeric(12,2)
discount_amountnumeric(12,2)
net_totalnumeric(12,2)
payment_mode_idint
Sample data
order_idcust_idstore_idorder_dateorder_statusgross_totaldiscount_amountnet_totalpayment_mode_id
1107701332024-05-02Out for Delivery22033.220.022033.227
2110611692024-09-22Failed300772.00.0300772.01
339581162025-11-24Delivered4314.360.04314.368
sales

payments

payment_idint🔑 PK
order_idintFK → sales.orders
payment_datedate
payment_modevarchar(30)
amountnumeric(12,2)
Sample data
payment_idorder_idpayment_datepayment_modeamount
112024-05-02EMI22033.22
232025-11-24Gift Card4314.36
342026-02-20EMI237279.22
sales

returns

return_idint🔑 PK
order_idintFK → sales.orders
prod_idintFK → products.products
return_datedate
reasontext
refund_amountnumeric(12,2)
Sample data
return_idorder_idprod_idreturn_datereasonrefund_amount
1733432025-08-09Not liked282.52
2946022024-06-11Defective5357.45
36013822026-02-13Wrong Item5918.21
sales

shipments

shipment_idint🔑 PK
order_idintFK → sales.orders
courier_namevarchar(50)
shipped_datedate
delivered_datedate
statusvarchar(30)
Sample data
shipment_idorder_idcourier_nameshipped_datedelivered_datestatus
13Delhivery2025-11-272025-11-30Delivered
24Delhivery2026-02-212026-02-23Delivered
35BlueDart2024-12-112024-12-15Delivered
stores

employees

employee_idint🔑 PK
store_idintFK → stores.stores
first_namevarchar(50)
last_namevarchar(50)
emailvarchar(100)
rolevarchar(50)
dept_idintFK → core.dim_department
joining_datedate
salaryint
Sample data
employee_idstore_idfirst_namelast_nameemailroledept_idjoining_datesalary
180AbhiramBenabhiram.ben@retailmart.comVisual Merchandiser42025-08-1648949
265EkarajNaikekaraj.naik@retailmart.comLogistics Coordinator82024-11-1744465
398BhavnaRaybhavna.ray@retailmart.comStore Associate32025-01-2727845
stores

expenses

store_expense_idint🔑 PK
store_idintFK → stores.stores
expense_typevarchar(50)
amountnumeric(12,2)
expense_datedate
Sample data
store_expense_idstore_idexpense_typeamountexpense_date
1116Security3776.672025-05-30
2144Repair9509.612025-03-28
3199Repair7333.342025-03-14
stores

stores

store_idint🔑 PK
store_namevarchar(100)
region_idintFK → core.dim_region
cityvarchar(50)
square_ftint
opening_datedate
Sample data
store_idstore_nameregion_idcitysquare_ftopening_date
1RetailMart Gwalior17Gwalior22052024-06-25
2RetailMart Indore4Indore27042025-02-08
3RetailMart Prayagraj7Prayagraj45242024-09-26
supply_chain

inventory_snapshots

warehouse_idintFK → supply_chain.warehouses
product_idintFK → products.products
snapshot_datedate
quantity_on_handint
Sample data
warehouse_idproduct_idsnapshot_datequantity_on_hand
143342025-02-261019
143342025-02-271039
143342025-02-281022
supply_chain

shipments

shipment_idint🔑 PK
supplier_idintFK → products.suppliers
warehouse_idintFK → supply_chain.warehouses
product_idintFK → products.products
quantityint
shipped_datedate
arrival_datedate
statusvarchar(20)
Sample data
shipment_idsupplier_idwarehouse_idproduct_idquantityshipped_datearrival_datestatus
185236089832024-10-022024-10-08In Transit
22455223112024-03-032024-03-15Received
325225231022025-07-242025-07-26Received
supply_chain

warehouses

warehouse_idint🔑 PK
namevarchar(100)
location_cityvarchar(50)
regionvarchar(20)
capacity_sqftint
manager_namevarchar(50)
Sample data
warehouse_idnamelocation_cityregioncapacity_sqftmanager_name
1Warehouse LisashireNorth AdamboroughNorth13502Judith Smith
2Warehouse FeliciabergNorth MatthewburghNorth24952Hannah Castillo
3Warehouse JacquelinetownSouth KelseyburghWest37914Steven Webster
support

tickets

ticket_idint🔑 PK
customer_idintFK → customers.customers
agent_idintFK → stores.employees
categoryvarchar(50)
priorityvarchar(20)
statusvarchar(20)
created_datetimestamp
resolved_datetimestamp
subjecttext
Sample data
ticket_idcustomer_idagent_idcategoryprioritystatuscreated_dateresolved_datesubject
12125513Login IssueLowResolved2025-01-252025-01-31 08:00:00Login Issue - Architecto aliquid in.
28212995Account UpdateHighResolved2025-01-042025-01-08 23:00:00Account Update - Corrupti consequatur te
3147612458Account UpdateMediumClosed2025-05-092025-05-10 16:00:00Account Update - Eos aliquid dicta harum
web_events

events

event_idint🔑 PK
view_idintFK → web_events.page_views
event_typevarchar(50)
element_idvarchar(50)
event_timestamptimestamp
Sample data
event_idview_idevent_typeelement_idevent_timestamp
113068clickform_login2025-07-12 09:56:01.169530
2103619scrollform_login2025-11-20 04:08:41.126044
3467268hoverinput_search2025-07-30 09:48:41.956120
web_events

page_views

view_idint🔑 PK
session_idvarchar(50)
customer_idintFK → customers.customers
page_urlvarchar(255)
view_timestamptimestamp
device_typevarchar(20)
osvarchar(20)
Sample data
view_idsession_idcustomer_idpage_urlview_timestampdevice_typeos
1dca7c881-adac-40e9-8d18-86ea32f939c3/product/402026-02-13 13:34:23.116111MobileiOS
2f9041c62-8363-4e40-a026-7965b9898a274602/home2025-07-16 15:38:14.011698MobileMacOS
3d94b034c-c2e2-4450-8e1f-995d9c5c210b43290/product/12025-11-12 14:53:45.004664DesktopLinux