Loan management sample database — MongoDB, flat (243,077 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 — 2,500 documents
  application_documents — 8,000 documents
  application_reviews — 3,800 documents
  audit_logs — 3,000 documents
  branch_targets — 100 documents
  branches — 25 documents
  collateral_types — 8 documents
  collaterals — 1,600 documents
  collections — 1,000 documents
  credit_scores — 3,000 documents
  customer_references — 1,900 documents
  customers — 2,200 documents
  delinquencies — 500 documents
  departments — 8 documents
  disbursements — 2,500 documents
  employees — 130 documents
  fee_types — 8 documents
  guarantors — 1,000 documents
  insurance_policies — 1,300 documents
  legal_actions — 100 documents
  loan_applications — 3,800 documents
  loan_fees — 3,800 documents
  loan_products — 12 documents
  loan_reschedules — 200 documents
  payment_allocations — 100,000 documents
  payment_methods — 6 documents
  payments — 50,000 documents
  penalties — 2,500 documents
  repayment_schedules — 50,000 documents
  write_offs — 80 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.
