Restaurant sample database — MongoDB, embedded (189,431 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 restaurant --collection <name> --file <name>.ndjson

Collections:
  area_codes — 10 documents
  attendance — 3,000 documents
  customers — 3,000 documents, each with its customer_offers
  delivery_assignments — 45 documents
  delivery_boys — 30 documents
  delivery_shifts — 4 documents
  feedback — 5,000 documents
  food_and_beverage_catalog — 49 documents
  food_category — 6 documents
  food_subcategory — 14 documents
  orders — 35,000 documents, each with its order_items
  payments — 35,000 documents
  promotions — 12 documents, each with its promotion_items
  reservations — 6,000 documents
  restaurant_tables — 16 documents
  shift_assignments — 50 documents
  special_offers — 6 documents
  staff — 45 documents
  staff_shifts — 4 documents, each with its staff_shift_assignments

Folded in (no collection of their own):
  customer_offers — 2,000 rows, as the "customer_offers" array on customers (its customer_id is the parent's _id)
  order_items — 100,000 rows, as the "order_items" array on orders (its order_id is the parent's _id)
  promotion_items — 60 rows, as the "promotion_items" array on promotions (its promotion_id is the parent's _id)
  staff_shift_assignments — 80 rows, as the "staff_shift_assignments" array on staff_shifts (its staff_shift_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.
