Subscription SaaS sample database — MongoDB, embedded (2,405 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 subscription --collection <name> --file <name>.ndjson

Collections:
  apikeys — 30 documents
  apirequests — 1,000 documents
  access_tokens — 50 documents
  activity_log — 100 documents
  audit_logs — 30 documents
  billing_invoices — 250 documents
  discounts — 8 documents
  messages — 30 documents
  notifications — 80 documents
  payment_methods — 60 documents
  payments — 240 documents
  review_comments — 10 documents
  roles — 4 documents
  subscription_analytics — 10 documents
  subscription_categories — 6 documents, each with its subscription_category_mapping
  subscription_reviews — 10 documents
  subscriptions — 8 documents, each with its subscription_features
  support_tickets — 10 documents
  system_logs — 30 documents
  ticket_responses — 20 documents
  user_subscriptions — 60 documents
  users — 50 documents, each with its user_addresses, its user_discounts, its user_feedback, its user_preferences, its user_profiles, its user_roles

Folded in (no collection of their own):
  subscription_category_mapping — 14 rows, as the "subscription_category_mapping" array on subscription_categories (its category_id is the parent's _id)
  subscription_features — 40 rows, as the "subscription_features" array on subscriptions (its subscription_id is the parent's _id)
  user_addresses — 50 rows, as the "user_addresses" array on users (its user_id is the parent's _id)
  user_discounts — 15 rows, as the "user_discounts" array on users (its user_id is the parent's _id)
  user_feedback — 10 rows, as the "user_feedback" array on users (its user_id is the parent's _id)
  user_preferences — 80 rows, as the "user_preferences" array on users (its user_id is the parent's _id)
  user_profiles — 50 rows, as the "user_profiles" array on users (its user_id is the parent's _id)
  user_roles — 50 rows, as the "user_roles" array on users (its user_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.
