{
  "format": "dataset-manifest/1",
  "slug": "nvr-camera-system",
  "version": 2,
  "seed": "nvr-camera-system:1",
  "spec": {
    "format": "dataset/1",
    "slug": "nvr-camera-system",
    "name": "Surveillance Camera Activity",
    "tagline": "User interactions, camera activity, detection events, and maintenance tasks from a surveillance camera network.",
    "description": "Users interact with a network of surveillance cameras deployed across various locations, ensuring security and gathering analytical insights. Each camera captures detection events, recording movements that trigger alerts or require attention. These events are pivotal for understanding security dynamics, particularly in high foot traffic areas where activity is frequent. Meanwhile, users can modify settings for each camera, tailoring the surveillance experience to specific needs, and ensuring optimal performance based on situational requirements. \n\nThe tables are interconnected, with each row representing vital aspects of the surveillance system. The 'users' table stores information about the individuals managing the cameras, while the 'cameras' table holds details about each camera, including its location and specifications. The 'detection_events' table logs instances of activity detected by the cameras, allowing for an analysis of patterns and anomalies. 'settings_changes' captures modifications made to camera configurations by users, helping to track how adjustments impact detection and overall performance. Additionally, 'maintenance_tasks' outlines scheduled and unscheduled interventions to keep the cameras operational, while 'firmware_updates' records instances of software upgrades necessary for enhancing functionality. \n\nThis dataset provides a wealth of opportunities for practice, enabling developers to answer questions such as: How frequently are detection events triggered in various locations? What are the typical settings users prefer for specific camera types? How do maintenance tasks correlate with detection event frequency? With synthetic data representing real-world complexities, this dataset offers a realistic environment to hone skills in data analysis and visualization.",
    "domain": "iot",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "surveillance",
      "cameras",
      "IoT",
      "detection events",
      "settings",
      "maintenance"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table holds information about users who interact with the camera system. Each user can manage multiple cameras and settings.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the user.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address associated with the user.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the user was created."
          }
        }
      },
      "cameras": {
        "description": "This table contains details about the surveillance cameras in the network. Each camera is assigned to a specific location.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each camera."
          },
          "location": {
            "kind": "words",
            "max": 3,
            "description": "Physical location of the camera.",
            "nullable": true,
            "pool": [
              "entrance",
              "lobby",
              "parking",
              "hallway",
              "stairwell",
              "roof",
              "basement",
              "corridor",
              "exterior",
              "interior",
              "office",
              "warehouse",
              "loading",
              "exit",
              "reception",
              "elevator",
              "garden",
              "patio",
              "front",
              "back"
            ],
            "min": 1
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "Reference to the user who manages the camera."
          },
          "install_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date when the camera was installed.",
            "nullable": true
          }
        }
      },
      "detection_events": {
        "description": "This table logs motion detection events captured by the cameras. Each event is linked to a specific camera and user.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each detection event."
          },
          "camera_id": {
            "kind": "fk",
            "ref": "cameras.id",
            "description": "Reference to the camera that detected the event."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "Reference to the user who viewed the event."
          },
          "detected_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "dayProfile": "waking",
            "description": "Timestamp when the motion was detected."
          }
        }
      },
      "settings_changes": {
        "description": "This table records changes made to camera settings, including updates by users and system changes.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each settings change."
          },
          "camera_id": {
            "kind": "fk",
            "ref": "cameras.id",
            "description": "Reference to the camera whose settings were changed."
          },
          "changed_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the settings were changed."
          },
          "change_description": {
            "kind": "sentence",
            "max": 100,
            "description": "Description of the settings change made.",
            "nullable": true
          }
        }
      },
      "maintenance_tasks": {
        "description": "This table tracks maintenance tasks performed on the cameras, including scheduled and unscheduled maintenance.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each maintenance task."
          },
          "camera_id": {
            "kind": "fk",
            "ref": "cameras.id",
            "description": "Reference to the camera that underwent maintenance."
          },
          "task_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the maintenance task was performed."
          },
          "task_description": {
            "kind": "sentence",
            "max": 100,
            "description": "Description of the maintenance task.",
            "nullable": true
          }
        }
      },
      "firmware_updates": {
        "description": "This table logs firmware updates applied to the cameras, detailing the version and date of the update.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each firmware update."
          },
          "camera_id": {
            "kind": "fk",
            "ref": "cameras.id",
            "description": "Reference to the camera that received the firmware update."
          },
          "updated_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the firmware update was applied."
          },
          "version": {
            "kind": "words",
            "max": 3,
            "description": "Version number of the firmware update.",
            "nullable": true,
            "pool": [
              "1.0",
              "1.1",
              "1.2",
              "2.0",
              "2.1",
              "2.2",
              "3.0",
              "3.1",
              "3.2",
              "4.0",
              "4.1",
              "4.2",
              "5.0",
              "5.1",
              "5.2",
              "6.0",
              "6.1",
              "6.2",
              "7.0",
              "7.1"
            ],
            "min": 1
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "self-referencing",
      "nullable"
    ],
    "analysisQuestions": [
      "How frequently are motion detection events occurring during different times of the day?",
      "What types of settings changes are most common among users?",
      "How does the frequency of maintenance tasks correlate with camera installations?",
      "Which cameras have had the most firmware updates, and why might that be?",
      "Are there patterns in user interactions with detection events based on location?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Users and Cameras",
        "sql": "SELECT users.full_name, cameras.location FROM users JOIN cameras ON users.id = cameras.user_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Detection Events by Camera",
        "sql": "SELECT camera_id, COUNT(*) FROM detection_events GROUP BY camera_id;",
        "dialect": "postgres"
      },
      {
        "title": "Average Time Between Maintenance Tasks",
        "sql": "SELECT camera_id, AVG(EXTRACT(EPOCH FROM (task_date - LAG(task_date) OVER (PARTITION BY camera_id ORDER BY task_date)))) AS avg_time_between FROM maintenance_tasks GROUP BY camera_id;",
        "dialect": "postgres"
      },
      {
        "title": "Detect Changes Over Time",
        "sql": "SELECT changed_at::date AS change_date, COUNT(*) FROM settings_changes GROUP BY change_date ORDER BY change_date;",
        "dialect": "postgres"
      },
      {
        "title": "Latest Firmware Updates by Camera",
        "sql": "SELECT camera_id, MAX(updated_at) FROM firmware_updates GROUP BY camera_id;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Security Analyst",
        "body": "A security analyst can utilize this dataset to monitor camera performance and user engagement. By analyzing detection events and settings changes, they can identify areas needing further attention or improvements in the surveillance system."
      },
      {
        "title": "System Administrator",
        "body": "System administrators can use this dataset to track maintenance tasks and firmware updates across the camera network. This helps ensure that all cameras are running the latest software, enhancing the reliability and security of the surveillance system."
      },
      {
        "title": "Data Scientist",
        "body": "Data scientists can explore patterns in detection events and camera usage over time. By analyzing temporal data, they can forecast when cameras are likely to require maintenance or when to expect increased motion detection events."
      },
      {
        "title": "IoT Developer",
        "body": "IoT developers can use this dataset for building applications that integrate with camera systems. They can run queries to optimize user experience by understanding how users interact with the cameras and the settings they frequently change."
      }
    ]
  },
  "counts": {
    "users": 100,
    "cameras": 50,
    "detection_events": 500,
    "firmware_updates": 50,
    "maintenance_tasks": 150,
    "settings_changes": 200
  },
  "stats": {
    "users": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "full_name": {
          "nulls": 10,
          "distinct": 90,
          "min": "Alice Bennett",
          "max": "Zoe Kaya"
        },
        "email": {
          "nulls": 20,
          "distinct": 80
        },
        "created_at": {
          "nulls": 0,
          "distinct": 100,
          "min": "2023-01-04 21:39:35",
          "max": "2023-12-31 09:32:30"
        }
      }
    },
    "cameras": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "location": {
          "nulls": 4,
          "distinct": 41
        },
        "user_id": {
          "nulls": 0,
          "distinct": 41,
          "min": 1,
          "max": 100
        },
        "install_date": {
          "nulls": 4,
          "distinct": 46,
          "min": "2022-01-09",
          "max": "2023-11-21"
        }
      }
    },
    "detection_events": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "camera_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "user_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "detected_at": {
          "nulls": 0,
          "distinct": 500,
          "min": "2023-01-01 18:21:09",
          "max": "2023-12-30 15:24:15"
        }
      }
    },
    "settings_changes": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "camera_id": {
          "nulls": 0,
          "distinct": 49,
          "min": 1,
          "max": 50
        },
        "changed_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2023-01-03 01:16:58",
          "max": "2023-12-30 14:17:56"
        },
        "change_description": {
          "nulls": 20,
          "distinct": 180
        }
      }
    },
    "maintenance_tasks": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "camera_id": {
          "nulls": 0,
          "distinct": 45,
          "min": 2,
          "max": 50
        },
        "task_date": {
          "nulls": 0,
          "distinct": 150,
          "min": "2023-01-02 07:52:21",
          "max": "2023-12-30 20:35:43"
        },
        "task_description": {
          "nulls": 17,
          "distinct": 133
        }
      }
    },
    "firmware_updates": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "camera_id": {
          "nulls": 0,
          "distinct": 32,
          "min": 1,
          "max": 49
        },
        "updated_at": {
          "nulls": 0,
          "distinct": 50,
          "min": "2023-01-09 10:06:00",
          "max": "2023-12-31 07:50:18"
        },
        "version": {
          "nulls": 6,
          "distinct": 37
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/nvr-camera-system/v2/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/users.csv",
      "bytes": 5435,
      "sha256": "077ae23c1a9fb0d4c3f41d209789ec94538d04b634a090d1a7b56d0de26edee8",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/cameras.csv",
      "format": "csv",
      "table": "cameras",
      "key": "datasets/nvr-camera-system/v2/csv/cameras.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/cameras.csv",
      "bytes": 1599,
      "sha256": "9340eaaa0dd7fac1a99369abacc147250502fc4e29500be31c4bd160c14f8331",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/detection_events.csv",
      "format": "csv",
      "table": "detection_events",
      "key": "datasets/nvr-camera-system/v2/csv/detection_events.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/detection_events.csv",
      "bytes": 15315,
      "sha256": "4f81547617773deb4929c1552d43f9bd871432030f34846629ad1083e316da54",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/firmware_updates.csv",
      "format": "csv",
      "table": "firmware_updates",
      "key": "datasets/nvr-camera-system/v2/csv/firmware_updates.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/firmware_updates.csv",
      "bytes": 1712,
      "sha256": "346a1ea1897cf70e244fce1f460bf034ff2527a27c7d36b0d37a31f33a2f03e2",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/maintenance_tasks.csv",
      "format": "csv",
      "table": "maintenance_tasks",
      "key": "datasets/nvr-camera-system/v2/csv/maintenance_tasks.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/maintenance_tasks.csv",
      "bytes": 11647,
      "sha256": "cff2c1fc495fdbbeb0f1b082fe5bc0f17e748456f9b762eb69671726e34019d9",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/settings_changes.csv",
      "format": "csv",
      "table": "settings_changes",
      "key": "datasets/nvr-camera-system/v2/csv/settings_changes.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/csv/settings_changes.csv",
      "bytes": 15800,
      "sha256": "6de5331bf77912b6e8c22e330bfce549175113a8390a167114e47869dab6bd02",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "nvr-camera-system.json",
      "format": "json",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/nvr-camera-system.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/nvr-camera-system.json",
      "bytes": 145783,
      "sha256": "c96e1d77be6efc941df62e4c23e88cb4dd7f298b47396b7aa14d3bb80c6f6a41",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/sql/postgres.sql",
      "bytes": 67699,
      "sha256": "fa95e14c8d2038bf8dce42deba77e4b81832160b78b3a688009fcc6c5734bc85",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/sql/mysql.sql",
      "bytes": 66973,
      "sha256": "fd4f06c925814aa7019797be5c249ea5c60109f214175ba31e6c49980bed0dff",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/sql/mssql.sql",
      "bytes": 69043,
      "sha256": "c852f9e88972c9517a40854f34d93ad9e38e45d035b1ab09cc8d22bdaae66757",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/sql/sqlite.sql",
      "bytes": 66655,
      "sha256": "50c0cda5bf6dc888a51beaa76a01c53ffac1bf3f8001294580c5202dca48e0b0",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/prisma/seed.ts",
      "bytes": 128364,
      "sha256": "726d9f24d9d6c8635728a377558ab7bc89f3187a56c2a43d29f28fcba14dbdc1",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/nvr-camera-system/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/nvr-camera-system/v2/django/fixtures.json",
      "bytes": 194584,
      "sha256": "bed50d26978f3a70b4b5b5cf5680354eb623173a83c347e773d9df941930b189",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767188303,
  "updatedAt": 1788785129332
}
