CRM sample database — MongoDB, embedded (3,029 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 crm --collection <name> --file <name>.ndjson

Collections:
  accounts — 20 documents, each with its account_territories
  business_units — 5 documents
  calls — 100 documents
  campaign_members — 80 documents
  campaigns — 40 documents
  competitors — 15 documents
  contacts — 60 documents
  contracts — 30 documents
  deal_stages — 7 documents
  deals — 80 documents, each with its deal_competitors, its deal_products
  industry_types — 15 documents
  invoices — 250 documents, each with its invoice_lines
  kb_articles — 10 documents
  kb_categories — 8 documents
  lead_sources — 8 documents
  lead_statuses — 6 documents
  leads — 60 documents
  meetings — 40 documents, each with its meeting_participants
  payments — 220 documents
  price_book_entries — 180 documents
  price_books — 3 documents
  products — 60 documents
  quotes — 60 documents, each with its quote_line_items
  roles — 6 documents
  tasks — 60 documents
  territories — 12 documents
  ticket_priorities — 4 documents
  ticket_statuses — 5 documents
  tickets — 50 documents
  users — 10 documents

Folded in (no collection of their own):
  account_territories — 25 rows, as the "account_territories" array on accounts (its account_id is the parent's _id)
  deal_competitors — 30 rows, as the "deal_competitors" array on deals (its deal_id is the parent's _id)
  deal_products — 200 rows, as the "deal_products" array on deals (its deal_id is the parent's _id)
  invoice_lines — 1,000 rows, as the "invoice_lines" array on invoices (its invoice_id is the parent's _id)
  meeting_participants — 90 rows, as the "meeting_participants" array on meetings (its meeting_id is the parent's _id)
  quote_line_items — 180 rows, as the "quote_line_items" array on quotes (its quote_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.
