Pharmacy sample database — MongoDB, embedded (209,275 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 pharmacy --collection <name> --file <name>.ndjson

Collections:
  active_ingredients — 50 documents
  branches — 15 documents
  coupon_usages — 3,000 documents
  coupons — 60 documents
  customers — 6,000 documents, each with its customer_loyalty
  delivery_details — 4,000 documents
  doctors — 200 documents
  dosage_forms — 8 documents
  employees — 100 documents
  insurance_claims — 5,000 documents
  insurance_providers — 8 documents
  inventory_stocks — 400 documents
  manufacturers — 30 documents
  medicine_categories — 12 documents
  medicines — 240 documents, each with its medicine_ingredients
  packaging_types — 6 documents
  payment_methods — 5 documents
  payments — 29,000 documents
  prescriptions — 8,000 documents, each with its prescription_items
  purchase_orders — 300 documents, each with its purchase_order_items
  returns — 600 documents, each with its return_items
  roles — 6 documents
  sales — 30,000 documents, each with its sale_items
  shelves — 150 documents
  shifts — 1,200 documents
  stock_adjustments — 600 documents
  supplier_invoices — 300 documents
  suppliers — 25 documents
  users — 120 documents, each with its user_roles

Folded in (no collection of their own):
  customer_loyalty — 2,000 rows, as the "customer_loyalty" array on customers (its customer_id is the parent's _id)
  medicine_ingredients — 300 rows, as the "medicine_ingredients" array on medicines (its medicine_id is the parent's _id)
  prescription_items — 15,000 rows, as the "prescription_items" array on prescriptions (its prescription_id is the parent's _id)
  purchase_order_items — 1,500 rows, as the "purchase_order_items" array on purchase_orders (its purchase_order_id is the parent's _id)
  return_items — 900 rows, as the "return_items" array on returns (its return_id is the parent's _id)
  sale_items — 100,000 rows, as the "sale_items" array on sales (its sale_id is the parent's _id)
  user_roles — 140 rows, as the "user_roles" array on users (its user_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.
