Loan management sample database — MongoDB, flat (2,430,167 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 loan-management --collection <name> --file <name>.ndjson

Collections:
  active_loans — 25,000 documents
  application_documents — 80,000 documents
  application_reviews — 38,000 documents
  audit_logs — 30,000 documents
  branch_targets — 1,000 documents
  branches — 25 documents
  collateral_types — 8 documents
  collaterals — 16,000 documents
  collections — 10,000 documents
  credit_scores — 30,000 documents
  customer_references — 19,000 documents
  customers — 22,000 documents
  delinquencies — 5,000 documents
  departments — 8 documents
  disbursements — 25,000 documents
  employees — 1,300 documents
  fee_types — 8 documents
  guarantors — 10,000 documents
  insurance_policies — 13,000 documents
  legal_actions — 1,000 documents
  loan_applications — 38,000 documents
  loan_fees — 38,000 documents
  loan_products — 12 documents
  loan_reschedules — 2,000 documents
  payment_allocations — 1,000,000 documents
  payment_methods — 6 documents
  payments — 500,000 documents
  penalties — 25,000 documents
  repayment_schedules — 500,000 documents
  write_offs — 800 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.
