IoT sample database — MongoDB, embedded (1,127,398 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 iot --collection <name> --file <name>.ndjson

Collections:
  actuators — 500 documents, each with its actuator_commands
  alarm_rules — 2,000 documents
  alarms — 5,000 documents
  api_keys — 60 documents
  audit_logs — 10,000 documents
  billing_plans — 4 documents
  device_groups — 60 documents, each with its device_group_members
  device_metrics — 50,000 documents
  device_types — 10 documents
  devices — 1,000 documents, each with its device_configurations, its device_geofences
  error_logs — 10,000 documents
  firmware_deployments — 4,000 documents
  firmware_releases — 40 documents
  gateways — 80 documents, each with its gateway_devices
  geofences — 40 documents
  locations — 100 documents
  maintenance_logs — 2,000 documents
  network_connections — 10,000 documents
  networks — 60 documents
  notifications — 10,000 documents
  organizations — 20 documents
  roles — 4 documents
  sensors — 2,000 documents
  subscriptions — 20 documents
  support_tickets — 1,000 documents
  telemetry_data — 1,000,000 documents
  ticket_replies — 3,000 documents
  users — 300 documents, each with its user_roles

Folded in (no collection of their own):
  actuator_commands — 10,000 rows, as the "actuator_commands" array on actuators (its actuator_id is the parent's _id)
  device_configurations — 3,000 rows, as the "device_configurations" array on devices (its device_id is the parent's _id)
  device_geofences — 1,000 rows, as the "device_geofences" array on devices (its device_id is the parent's _id)
  device_group_members — 800 rows, as the "device_group_members" array on device_groups (its device_group_id is the parent's _id)
  gateway_devices — 1,000 rows, as the "gateway_devices" array on gateways (its gateway_id is the parent's _id)
  user_roles — 300 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.
