Bank sample database — MongoDB, embedded (149,222 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 bank --collection <name> --file <name>.ndjson

Collections:
  accounts — 2,000 documents
  addresses — 1,200 documents
  atm_machines — 60 documents
  atm_transactions — 8,000 documents
  audit_logs — 2,000 documents
  bill_payments — 3,000 documents
  branches — 20 documents, each with its branch_addresses
  cards — 1,500 documents
  credit_lines — 300 documents
  currency_rates — 12 documents
  customer_support_tickets — 600 documents
  customers — 1,200 documents
  departments — 60 documents
  direct_deposits — 600 documents
  employees — 300 documents, each with its employee_departments
  investments — 300 documents, each with its investment_assets
  kyc_documents — 1,200 documents
  loans — 300 documents, each with its loan_payments
  merchant_accounts — 200 documents
  mortgages — 100 documents
  overdraft_protections — 200 documents
  pos_terminals — 400 documents
  pos_transactions — 12,000 documents
  safe_deposit_boxes — 200 documents
  safe_deposit_leases — 50 documents
  standing_orders — 400 documents
  support_messages — 1,800 documents
  transactions — 100,000 documents
  transfers — 5,000 documents

Folded in (no collection of their own):
  branch_addresses — 20 rows, as the "branch_addresses" array on branches (its branch_id is the parent's _id)
  employee_departments — 300 rows, as the "employee_departments" array on employees (its employee_id is the parent's _id)
  investment_assets — 900 rows, as the "investment_assets" array on investments (its investment_id is the parent's _id)
  loan_payments — 5,000 rows, as the "loan_payments" array on loans (its loan_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.
