Library sample database — MongoDB, flat (1,765,730 rows)

A collection per table. Each primary key is the document _id; foreign keys are fields under their own names, so the SQL version's joins become $lookup stages.

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

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

Collections:
  addresses — 31,000 documents
  audit_logs — 20,000 documents
  authors — 6,000 documents
  book_authors — 16,000 documents
  book_tag_mappings — 30,000 documents
  book_tags — 40 documents
  books — 12,000 documents
  categories — 20 documents
  copies — 40,000 documents
  event_registrations — 40,000 documents
  events — 3,000 documents
  fine_policies — 4 documents
  fines — 60,000 documents
  languages — 10 documents
  libraries — 8 documents
  library_hours — 56 documents
  loans — 1,000,000 documents
  memberships — 35,000 documents
  notification_templates — 8 documents
  notifications — 250,000 documents
  order_items — 10,000 documents
  payments — 50,000 documents
  publishers — 60 documents
  purchase_orders — 2,000 documents
  reservations — 80,000 documents
  reviews — 50,000 documents
  roles — 4 documents
  staff_profiles — 500 documents
  suppliers — 20 documents
  users — 30,000 documents

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.
