Online grocery delivery database schema

How an online supermarket models its data: per-store catalogue and pricing, weight-priced items billed on what was actually picked, baskets, substitution preferences and real substitutions, picking tasks, capacity-limited delivery windows and inventory counts.

Grocery Delivery ER diagram

Online grocery delivery database schema n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 customers idBIGINT emailVARCHAR full_nameVARCHAR phoneVARCHAR default_substitut…VARCHAR created_atTIMESTAMP updated_atTIMESTAMP stores idBIGINT nameVARCHAR slugVARCHAR address_lineVARCHAR cityVARCHAR country_codeCHAR currency_codeCHAR timezoneVARCHAR weight_unitVARCHAR is_activeBOOLEAN created_atTIMESTAMP products idBIGINT gtinVARCHAR nameVARCHAR brandVARCHAR category_pathVARCHAR sold_byVARCHAR price_unitVARCHAR average_unit_weig…INTEGER is_age_restrictedBOOLEAN created_atTIMESTAMP store_products idBIGINT store_idBIGINT product_idBIGINT aisleVARCHAR price_centsINTEGER was_price_centsINTEGER currency_codeCHAR is_availableBOOLEAN substitution_rankINTEGER updated_atTIMESTAMP inventory_counts idBIGINT store_product_idBIGINT counted_atTIMESTAMP sourceVARCHAR quantity_on_shelfNUMERIC is_out_of_stockBOOLEAN confidenceVARCHAR delivery_windows idBIGINT store_idBIGINT window_dateDATE starts_atTIME ends_atTIME capacity_ordersINTEGER reserved_ordersINTEGER fee_centsINTEGER currency_codeCHAR is_openBOOLEAN baskets idBIGINT customer_idBIGINT store_idBIGINT session_tokenVARCHAR created_atTIMESTAMP updated_atTIMESTAMP basket_items idBIGINT basket_idBIGINT store_product_idBIGINT requested_quantityNUMERIC substitution_pref…VARCHAR note_to_pickerVARCHAR added_atTIMESTAMP pickers idBIGINT store_idBIGINT full_nameVARCHAR phoneVARCHAR statusVARCHAR items_per_hourNUMERIC onboarded_atTIMESTAMP orders idBIGINT customer_idBIGINT store_idBIGINT basket_idBIGINT delivery_window_idBIGINT order_codeVARCHAR statusVARCHAR delivery_addressJSON authorised_total_…INTEGER captured_total_ce…INTEGER currency_codeCHAR delivery_fee_centsINTEGER placed_atTIMESTAMP picked_atTIMESTAMP delivered_atTIMESTAMP cancelled_atTIMESTAMP order_items idBIGINT order_idBIGINT store_product_idBIGINT name_snapshotVARCHAR sold_byVARCHAR unit_price_centsINTEGER price_unitVARCHAR requested_quantityNUMERIC estimated_weight_…INTEGER picked_quantityNUMERIC picked_weight_gra…INTEGER estimated_total_c…INTEGER final_total_centsINTEGER substitution_pref…VARCHAR statusVARCHAR note_to_pickerVARCHAR picking_tasks idBIGINT order_idBIGINT picker_idBIGINT sequenceINTEGER statusVARCHAR item_countINTEGER route_hintJSON assigned_atTIMESTAMP started_atTIMESTAMP completed_atTIMESTAMP substitutions idBIGINT order_item_idBIGINT substitute_store_…BIGINT substitute_name_s…VARCHAR reasonVARCHAR decided_byVARCHAR price_difference_…INTEGER customer_responseVARCHAR created_atTIMESTAMP

Related database schemas