IoT sample database — MongoDB, embedded (2,238 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 — 10 documents, each with its actuator_commands
  alarm_rules — 10 documents
  alarms — 10 documents
  api_keys — 60 documents
  audit_logs — 10 documents
  billing_plans — 4 documents
  device_groups — 60 documents, each with its device_group_members
  device_metrics — 50 documents
  device_types — 10 documents
  devices — 10 documents, each with its device_configurations, its device_geofences
  error_logs — 10 documents
  firmware_deployments — 10 documents
  firmware_releases — 40 documents
  gateways — 80 documents, each with its gateway_devices
  geofences — 40 documents
  locations — 10 documents
  maintenance_logs — 10 documents
  network_connections — 10 documents
  networks — 60 documents
  notifications — 10 documents
  organizations — 20 documents
  roles — 4 documents
  sensors — 10 documents
  subscriptions — 20 documents
  support_tickets — 10 documents
  telemetry_data — 1,000 documents
  ticket_replies — 10 documents
  users — 300 documents, each with its user_roles

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