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

Collections:
  active_loans — 25 documents
  application_documents — 80 documents
  application_reviews — 38 documents
  audit_logs — 30 documents
  branch_targets — 10 documents
  branches — 25 documents
  collateral_types — 8 documents
  collaterals — 16 documents
  collections — 10 documents
  credit_scores — 30 documents
  customers — 22 documents, each with its customer_references
  delinquencies — 10 documents
  departments — 8 documents
  disbursements — 25 documents
  employees — 10 documents
  fee_types — 8 documents
  guarantors — 10 documents
  insurance_policies — 13 documents
  legal_actions — 10 documents
  loan_applications — 38 documents
  loan_fees — 38 documents
  loan_products — 12 documents
  loan_reschedules — 10 documents
  payment_methods — 6 documents
  payments — 500 documents, each with its payment_allocations
  penalties — 25 documents
  repayment_schedules — 500 documents
  write_offs — 10 documents

Folded in (no collection of their own):
  customer_references — 19 rows, as the "customer_references" array on customers (its customer_id is the parent's _id)
  payment_allocations — 1,000 rows, as the "payment_allocations" array on payments (its payment_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.
