Bank sample database — MongoDB, embedded (1,483,472 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 — 20,000 documents
  addresses — 12,000 documents
  atm_machines — 60 documents
  atm_transactions — 80,000 documents
  audit_logs — 20,000 documents
  bill_payments — 30,000 documents
  branches — 20 documents, each with its branch_addresses
  cards — 15,000 documents
  credit_lines — 3,000 documents
  currency_rates — 12 documents
  customer_support_tickets — 6,000 documents
  customers — 12,000 documents
  departments — 60 documents
  direct_deposits — 6,000 documents
  employees — 300 documents, each with its employee_departments
  investments — 3,000 documents, each with its investment_assets
  kyc_documents — 12,000 documents
  loans — 3,000 documents, each with its loan_payments
  merchant_accounts — 2,000 documents
  mortgages — 1,000 documents
  overdraft_protections — 2,000 documents
  pos_terminals — 4,000 documents
  pos_transactions — 120,000 documents
  safe_deposit_boxes — 200 documents
  safe_deposit_leases — 500 documents
  standing_orders — 4,000 documents
  support_messages — 18,000 documents
  transactions — 1,000,000 documents
  transfers — 50,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 — 9,000 rows, as the "investment_assets" array on investments (its investment_id is the parent's _id)
  loan_payments — 50,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.
