Pharmacy sample database — MongoDB, embedded (3,062 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 — 30 documents
  coupons — 60 documents
  customers — 60 documents, each with its customer_loyalty
  delivery_details — 40 documents
  doctors — 10 documents
  dosage_forms — 8 documents
  employees — 10 documents
  insurance_claims — 50 documents
  insurance_providers — 8 documents
  inventory_stocks — 10 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 — 290 documents
  prescriptions — 80 documents, each with its prescription_items
  purchase_orders — 10 documents, each with its purchase_order_items
  returns — 10 documents, each with its return_items
  roles — 6 documents
  sales — 300 documents, each with its sale_items
  shelves — 150 documents
  shifts — 12 documents
  stock_adjustments — 10 documents
  supplier_invoices — 10 documents
  suppliers — 25 documents
  users — 10 documents, each with its user_roles

Folded in (no collection of their own):
  customer_loyalty — 20 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 — 150 rows, as the "prescription_items" array on prescriptions (its prescription_id is the parent's _id)
  purchase_order_items — 15 rows, as the "purchase_order_items" array on purchase_orders (its purchase_order_id is the parent's _id)
  return_items — 10 rows, as the "return_items" array on returns (its return_id is the parent's _id)
  sale_items — 1,000 rows, as the "sale_items" array on sales (its sale_id is the parent's _id)
  user_roles — 10 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.
