Food delivery sample database — MongoDB, embedded (2,430,995 rows)

Tables that belong to another are folded into it as arrays, so the documents read the way the application uses them. The rest are collections of their own, joined by key as in the flat version.

Load it:
  sh import.sh                    (into mongodb://localhost:27017)
  sh import.sh "<connection string>"

Or one collection at a time: mongoimport --db food-delivery --collection <name> --file <name>.ndjson

Collections:
  addresses — 100,000 documents
  cart_items — 20,000 documents, each with its cart_item_modifiers
  cities — 10 documents
  countries — 1 documents
  coupons — 20 documents
  courier_reviews — 80,000 documents
  couriers — 2,000 documents, each with its courier_locations
  cuisine_types — 12 documents
  deliveries — 400,000 documents
  dietary_tags — 6 documents
  menu_categories — 300 documents
  menu_items — 1,800 documents, each with its menu_item_tags
  modifier_groups — 1,800 documents
  modifier_options — 5,400 documents
  operating_hours — 300 documents
  order_items — 1,000,000 documents, each with its order_item_modifiers
  orders — 400,000 documents, each with its order_coupons
  payment_methods — 30,000 documents
  payouts — 6,000 documents
  restaurants — 60 documents, each with its restaurant_cuisines
  reviews — 100,000 documents
  shopping_carts — 10,000 documents
  states — 6 documents
  support_messages — 20,000 documents
  support_tickets — 8,000 documents
  users — 40,000 documents

Folded in (no collection of their own):
  cart_item_modifiers — 4,000 rows, as the "cart_item_modifiers" array on cart_items (its cart_item_id is the parent's _id)
  courier_locations — 10,000 rows, as the "courier_locations" array on couriers (its courier_id is the parent's _id)
  menu_item_tags — 1,200 rows, as the "menu_item_tags" array on menu_items (its menu_item_id is the parent's _id)
  order_coupons — 40,000 rows, as the "order_coupons" array on orders (its order_id is the parent's _id)
  order_item_modifiers — 150,000 rows, as the "order_item_modifiers" array on order_items (its order_item_id is the parent's _id)
  restaurant_cuisines — 80 rows, as the "restaurant_cuisines" array on restaurants (its restaurant_id is the parent's _id)

Types: numeric columns are Decimal128, so totals stay exact; dates and timestamps are
Date values read as UTC (the data has no time zone); times and UUIDs are strings;
JSON columns are embedded objects.

Synthetic data, CC0-1.0, from databasesample.com. The same rows as the SQL and CSV files.
