{
  "format": "dataset-manifest/1",
  "slug": "payroll-management-system",
  "version": 1,
  "seed": "payroll-management-system:1",
  "spec": {
    "format": "dataset/1",
    "slug": "payroll-management-system",
    "name": "Employee Payroll Insights",
    "tagline": "Employee work patterns, payroll records, performance reviews, and training sessions from various departments.",
    "description": "Managing a workforce requires meticulous attention to compensation, performance, and resource allocation. Companies track employee hours, overtime, and leaves while evaluating performance and project contributions to ensure fair and accurate payroll processing. This dataset revolves around employee work patterns, remuneration adjustments, training involvement, and departmental structures. The five tables included—employees, departments, payroll_records, performance_reviews, and training_sessions—interconnect to provide a comprehensive view of payroll management. Each table models a different aspect of employee management, allowing you to analyze how work hours relate to performance reviews and compensation adjustments. Additionally, overtime occurrences are less frequent, and performance reviews tend to cluster around annual cycles, reflecting peaks of activity during appraisal periods. This dataset is synthetic, designed to help developers practice SQL skills and ORM seeding effectively.",
    "domain": "hr",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "employee",
      "payroll",
      "performance",
      "overtime",
      "training",
      "HR"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "employees": {
        "description": "This table holds the employee details, including their department and role. Each employee is linked to their respective department through a foreign key.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each employee."
          },
          "first_name": {
            "kind": "firstName",
            "description": "The employee's first name.",
            "nullable": true
          },
          "last_name": {
            "kind": "lastName",
            "description": "The employee's last name.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "Employee's email address.",
            "nullable": true
          },
          "department_id": {
            "kind": "fk",
            "ref": "departments.id",
            "description": "Reference to the department the employee belongs to."
          },
          "role": {
            "kind": "words",
            "description": "The job title or role of the employee."
          }
        }
      },
      "departments": {
        "description": "This table lists all departments within the organization. Each department can have multiple employees linked to it.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each department."
          },
          "name": {
            "kind": "words",
            "description": "Name of the department."
          },
          "manager": {
            "kind": "firstName",
            "description": "First name of the department manager.",
            "nullable": true
          },
          "budget": {
            "kind": "decimal",
            "min": 50000,
            "max": 500000,
            "description": "Annual budget allocated to the department.",
            "nullable": true
          }
        }
      },
      "payroll_records": {
        "description": "This table captures the payroll details for each employee, including base salary and overtime pay. It links to the employee table through a foreign key.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each payroll record."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "Reference to the employee's record."
          },
          "base_salary": {
            "kind": "decimal",
            "min": 30000,
            "max": 150000,
            "description": "Base salary of the employee."
          },
          "overtime_hours": {
            "kind": "int",
            "min": 0,
            "max": 20,
            "description": "Total overtime hours worked in the pay period.",
            "nullable": true
          },
          "overtime_pay": {
            "kind": "decimal",
            "min": 0,
            "max": 5000,
            "description": "Total pay for overtime hours worked.",
            "nullable": true
          },
          "pay_period": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The period for which the payroll is calculated.",
            "trend": "growing"
          }
        }
      },
      "performance_reviews": {
        "description": "This table stores performance review records for employees, including scores and feedback. It connects to the employee table via foreign key.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each performance review."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "Reference to the employee being reviewed."
          },
          "review_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date of the performance review.",
            "trend": "seasonal"
          },
          "score": {
            "kind": "int",
            "min": 1,
            "max": 5,
            "description": "Performance score given during the review."
          },
          "feedback": {
            "kind": "sentence",
            "description": "Written feedback provided during the performance review.",
            "nullable": true
          }
        }
      },
      "training_sessions": {
        "description": "This table captures details about training sessions attended by employees, linking back to the employees table.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each training session."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "Reference to the employee attending the training."
          },
          "session_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date of the training session."
          },
          "training_topic": {
            "kind": "words",
            "description": "Topic covered in the training session.",
            "nullable": true
          },
          "duration_hours": {
            "kind": "int",
            "min": 1,
            "max": 8,
            "description": "Duration of the training session in hours.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "monetary"
    ],
    "analysisQuestions": [
      "How does overtime impact overall employee compensation?",
      "What is the average performance score by department?",
      "Which training sessions have the highest attendance?",
      "How do salary adjustments correlate with performance review scores?",
      "What are the trends in employee turnover within departments?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Employees and Payroll Records",
        "sql": "SELECT e.first_name, e.last_name, p.base_salary FROM employees e JOIN payroll_records p ON e.id = p.employee_id;",
        "dialect": "postgres"
      },
      {
        "title": "Average Salary by Department",
        "sql": "SELECT d.name, AVG(p.base_salary) AS average_salary FROM departments d JOIN employees e ON d.id = e.department_id JOIN payroll_records p ON e.id = p.employee_id GROUP BY d.name;",
        "dialect": "postgres"
      },
      {
        "title": "Performance Review Scores Distribution",
        "sql": "SELECT score, COUNT(*) FROM performance_reviews GROUP BY score ORDER BY score;",
        "dialect": "postgres"
      },
      {
        "title": "Total Overtime Pay by Employee",
        "sql": "SELECT e.first_name, e.last_name, SUM(p.overtime_pay) AS total_overtime FROM employees e JOIN payroll_records p ON e.id = p.employee_id GROUP BY e.id;",
        "dialect": "postgres"
      },
      {
        "title": "Training Session Attendance Over Time",
        "sql": "SELECT session_date, COUNT(*) FROM training_sessions GROUP BY session_date ORDER BY session_date;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "HR Analytics Dashboard",
        "body": "An HR analyst can utilize this dataset to build an analytics dashboard that visualizes key metrics such as employee salaries, performance scores, and training attendance over time. This can help in identifying trends and making informed decisions about workforce management."
      },
      {
        "title": "Compensation Benchmarking",
        "body": "Compensation specialists can leverage this dataset to benchmark employee salaries against industry standards by analyzing the distribution of base salaries and overtime pay across various departments and roles."
      },
      {
        "title": "Performance Review Improvement",
        "body": "Team leaders can use this dataset to evaluate the effectiveness of performance reviews by correlating review scores with subsequent salary adjustments and training participation, aiming to enhance employee development strategies."
      },
      {
        "title": "Training Program Effectiveness",
        "body": "Training program coordinators can analyze attendance and feedback from training sessions to assess the effectiveness of different training topics. This can guide future training initiatives and improve employee skill development."
      }
    ]
  },
  "counts": {
    "departments": 10,
    "employees": 200,
    "payroll_records": 200,
    "performance_reviews": 200,
    "training_sessions": 100
  },
  "stats": {
    "employees": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "first_name": {
          "nulls": 27,
          "distinct": 74,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 17,
          "distinct": 70,
          "min": "Adams",
          "max": "Zhang"
        },
        "email": {
          "nulls": 23,
          "distinct": 177
        },
        "department_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "role": {
          "nulls": 0,
          "distinct": 200
        }
      }
    },
    "departments": {
      "rows": 10,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "name": {
          "nulls": 0,
          "distinct": 9
        },
        "manager": {
          "nulls": 0,
          "distinct": 10,
          "min": "Andre",
          "max": "Tomas"
        },
        "budget": {
          "nulls": 1,
          "distinct": 9,
          "min": 79207.85,
          "max": 405213.58
        }
      }
    },
    "payroll_records": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 126,
          "min": 1,
          "max": 200
        },
        "base_salary": {
          "nulls": 0,
          "distinct": 200,
          "min": 30405.77,
          "max": 148522.68
        },
        "overtime_hours": {
          "nulls": 21,
          "distinct": 21,
          "min": 0,
          "max": 20
        },
        "overtime_pay": {
          "nulls": 16,
          "distinct": 184,
          "min": 17.47,
          "max": 4933.87
        },
        "pay_period": {
          "nulls": 0,
          "distinct": 154,
          "min": "2023-01-01",
          "max": "2023-12-30"
        }
      }
    },
    "performance_reviews": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 130,
          "min": 1,
          "max": 200
        },
        "review_date": {
          "nulls": 0,
          "distinct": 149,
          "min": "2023-01-01",
          "max": "2023-12-29"
        },
        "score": {
          "nulls": 0,
          "distinct": 5,
          "min": 1,
          "max": 5
        },
        "feedback": {
          "nulls": 26,
          "distinct": 174
        }
      }
    },
    "training_sessions": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 82,
          "min": 2,
          "max": 200
        },
        "session_date": {
          "nulls": 0,
          "distinct": 85,
          "min": "2023-01-04",
          "max": "2023-12-27"
        },
        "training_topic": {
          "nulls": 7,
          "distinct": 93
        },
        "duration_hours": {
          "nulls": 6,
          "distinct": 8,
          "min": 1,
          "max": 8
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/departments.csv",
      "format": "csv",
      "table": "departments",
      "key": "datasets/payroll-management-system/v1/csv/departments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/csv/departments.csv",
      "bytes": 430,
      "sha256": "f1aa502dac211f14997752e461d6dc3529edc422ff806345c8359845e99e3b4a",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/employees.csv",
      "format": "csv",
      "table": "employees",
      "key": "datasets/payroll-management-system/v1/csv/employees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/csv/employees.csv",
      "bytes": 13486,
      "sha256": "ebb927a051671c1ac47379014451b96f713ff901effcee5e3d73529e68966318",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payroll_records.csv",
      "format": "csv",
      "table": "payroll_records",
      "key": "datasets/payroll-management-system/v1/csv/payroll_records.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/csv/payroll_records.csv",
      "bytes": 7646,
      "sha256": "51476efec95f50878c84a4e57f9c7036909dff4e7bfa86dd897536b918031fd2",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/performance_reviews.csv",
      "format": "csv",
      "table": "performance_reviews",
      "key": "datasets/payroll-management-system/v1/csv/performance_reviews.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/csv/performance_reviews.csv",
      "bytes": 14060,
      "sha256": "e7b3ad072a218c47337c22f43eb20d7a966f24cb3768d44a7396365d3c90be78",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/training_sessions.csv",
      "format": "csv",
      "table": "training_sessions",
      "key": "datasets/payroll-management-system/v1/csv/training_sessions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/csv/training_sessions.csv",
      "bytes": 4574,
      "sha256": "a0739d72598b93277302bc317c6c4b4ebf20bea0a0750310d60d80adb2e418ca",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "payroll-management-system.json",
      "format": "json",
      "table": null,
      "key": "datasets/payroll-management-system/v1/payroll-management-system.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/payroll-management-system.json",
      "bytes": 128210,
      "sha256": "479aa5666ab123a1eaedc3ab3940ca8ef08e9ae8fa14c25ae698f7a23d1b1051",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/payroll-management-system/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/sql/postgres.sql",
      "bytes": 54039,
      "sha256": "b59122457db7a7d9b090d8ed501a554da8962d575171daa7366d9bb14804759e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/payroll-management-system/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/sql/mysql.sql",
      "bytes": 53418,
      "sha256": "eaf37b6e34148e95f16c64d72615c0f8942a7c59d4a73cc9ccab5da1ac89c9b0",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/payroll-management-system/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/sql/mssql.sql",
      "bytes": 55321,
      "sha256": "83bd4aa64efb019cf4c7a78244a32d4b88f20e9c2d0a2a79f0c1ed56b5bfe52f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/payroll-management-system/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/sql/sqlite.sql",
      "bytes": 53176,
      "sha256": "fa4aa6d8c6dbca10d2fc106f705769d04c90650ada84ea4e4e9555b23747030d",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/payroll-management-system/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/prisma/seed.ts",
      "bytes": 101307,
      "sha256": "72b16d409d6ab0971922868143484a57dee31fee96e584b71e12dec54a0f3cda",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/payroll-management-system/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/payroll-management-system/v1/django/fixtures.json",
      "bytes": 162288,
      "sha256": "e23e0c084e2968a7eef396832c17decbe9232272045150712a45b686bb48550d",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768816607,
  "updatedAt": 1788768816607
}
