{
  "format": "dataset-manifest/1",
  "slug": "restaurant-management",
  "version": 1,
  "seed": "restaurant-management:1",
  "spec": {
    "format": "dataset/1",
    "slug": "restaurant-management",
    "name": "Dining Experience Management",
    "tagline": "Customer interactions, order histories, staff assignments, and promotions from a busy restaurant.",
    "description": "A busy restaurant coordinates the intricate details of service delivery, from placing orders to managing shifts. Staff members interact with customers to ensure a seamless dining experience, tracking everything from order histories to customer feedback. Promotions are tailored to attract diners, with some offers seeing particularly high engagement, while dedicated patrons return frequently, contributing significantly to the restaurant's revenue. This dataset captures those dynamics and provides insight into the various factors that influence dining experiences and operational efficiency.\n\nThe primary table, dining_experience, holds comprehensive records of customer interactions and service deliveries. Each row represents a unique dining event, detailing aspects such as the customer's identity, the specific orders placed, the assigned staff, and any promotions applied during their visit. This structured approach allows for various analyses, such as understanding customer preferences, evaluating staff performance, and assessing the effectiveness of different promotional strategies.\n\nQuestions that this data can help answer include: Which promotions yield the highest customer engagement? How do repeat visits correlate with revenue from particular customers? What patterns emerge around staff performance during peak hours? Analyzing these aspects can aid in improving service delivery and enhancing customer satisfaction. Practicing with this synthetic dataset will allow developers to hone their skills in querying relational data, performing joins, and deriving actionable insights from real-world scenarios in restaurant management.",
    "domain": "restaurants",
    "shape": "hierarchical",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "restaurant",
      "dining",
      "customer",
      "orders",
      "staff",
      "promotions",
      "management",
      "satisfaction"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "dining_experience": {
        "description": "Each row details a specific dining experience, linking customers, their orders, staff members, and promotional offers. This table allows for an in-depth analysis of customer satisfaction and operational efficiency.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each dining experience."
          },
          "customer_id": {
            "kind": "int",
            "min": 1,
            "max": 100,
            "description": "Identifier for the customer involved in the dining experience."
          },
          "order_id": {
            "kind": "int",
            "min": 1,
            "max": 200,
            "description": "Identifier for the order placed during the dining experience."
          },
          "staff_id": {
            "kind": "int",
            "min": 1,
            "max": 50,
            "description": "Identifier for the staff member serving the customer.",
            "nullable": true
          },
          "promotion_id": {
            "kind": "int",
            "min": 1,
            "max": 30,
            "description": "Identifier for any promotional offer applied during the dining experience.",
            "nullable": true
          },
          "satisfaction_rating": {
            "kind": "enum",
            "values": [
              "very dissatisfied",
              "dissatisfied",
              "neutral",
              "satisfied",
              "very satisfied"
            ],
            "description": "Customer's satisfaction level with the dining experience."
          },
          "visit_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date and time of the dining experience.",
            "nullable": true,
            "when": {
              "column": "satisfaction_rating",
              "in": [
                "very satisfied",
                "satisfied"
              ]
            },
            "dayProfile": "waking"
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average satisfaction rating for customers over the past year?",
      "Which promotional offers lead to the highest customer satisfaction?",
      "How do staff members impact customer satisfaction?",
      "What trends can be identified in customer visits over time?"
    ],
    "suggestedQueries": [
      {
        "title": "Basic customer satisfaction overview",
        "sql": "SELECT satisfaction_rating, COUNT(*) FROM dining_experience GROUP BY satisfaction_rating;",
        "dialect": "postgres"
      },
      {
        "title": "Average satisfaction rating by promotion",
        "sql": "SELECT promotion_id, AVG(CASE WHEN satisfaction_rating = 'very satisfied' THEN 1 WHEN satisfaction_rating = 'satisfied' THEN 0.5 ELSE 0 END) AS average_rating FROM dining_experience GROUP BY promotion_id;",
        "dialect": "postgres"
      },
      {
        "title": "Staff performance analysis",
        "sql": "SELECT staff_id, AVG(CASE WHEN satisfaction_rating = 'very satisfied' THEN 1 WHEN satisfaction_rating = 'satisfied' THEN 0.5 ELSE 0 END) AS staff_performance FROM dining_experience GROUP BY staff_id;",
        "dialect": "postgres"
      },
      {
        "title": "Trend analysis of visits",
        "sql": "SELECT DATE_TRUNC('month', visit_date) AS month, COUNT(*) FROM dining_experience GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Training new staff",
        "body": "Restaurant managers can use this dataset to train new staff on the importance of customer satisfaction and how their service directly impacts ratings. By analyzing past dining experiences, staff can learn from successes and areas needing improvement."
      },
      {
        "title": "Analyzing promotional effectiveness",
        "body": "Marketing teams can leverage this dataset to assess which promotions are most successful in enhancing customer satisfaction. By understanding customer feedback related to specific promotions, they can tailor future marketing strategies."
      },
      {
        "title": "Improving customer experience",
        "body": "Restaurant owners can utilize the data to identify trends in customer satisfaction and adjust service offerings or menu items accordingly. This can lead to enhanced dining experiences and repeat visits."
      }
    ]
  },
  "counts": {
    "dining_experience": 500
  },
  "stats": {
    "dining_experience": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "order_id": {
          "nulls": 0,
          "distinct": 188,
          "min": 1,
          "max": 200
        },
        "staff_id": {
          "nulls": 54,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "promotion_id": {
          "nulls": 64,
          "distinct": 30,
          "min": 1,
          "max": 30
        },
        "satisfaction_rating": {
          "nulls": 0,
          "distinct": 5,
          "min": "dissatisfied",
          "max": "very satisfied"
        },
        "visit_date": {
          "nulls": 294,
          "distinct": 206,
          "min": "2022-01-18 17:55:41",
          "max": "2023-12-16 22:07:25"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/dining_experience.csv",
      "format": "csv",
      "table": "dining_experience",
      "key": "datasets/restaurant-management/v1/csv/dining_experience.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/csv/dining_experience.csv",
      "bytes": 19072,
      "sha256": "e79461477bf067e65f31df04d2ab5cc8fe81683a0363fe8b6d9fafb52d8713b5",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "restaurant-management.json",
      "format": "json",
      "table": null,
      "key": "datasets/restaurant-management/v1/restaurant-management.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/restaurant-management.json",
      "bytes": 101086,
      "sha256": "9d8aedafc8117efb47963fda6bdcd3e2eccaea65147944b766b774427626c33b",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/restaurant-management/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/sql/postgres.sql",
      "bytes": 29173,
      "sha256": "2f5fdff0dcc1a08f874f2677c6616a2e4efde30fa1b89ac481321b7b714edc65",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/restaurant-management/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/sql/mysql.sql",
      "bytes": 29039,
      "sha256": "c71476ffc3f2b89586285ea82e2ab8f9b247aedc3ebc976dc8ddcff6d9c9cc15",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/restaurant-management/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/sql/mssql.sql",
      "bytes": 29826,
      "sha256": "370a3bc14a42abef3b04b83cbd1692ced7ee4e0fb8698e6a3813e2deba89f4af",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/restaurant-management/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/sql/sqlite.sql",
      "bytes": 29027,
      "sha256": "dfd8c9770aa0869c1181f023c8d8890d6b3b170522f2536c21708ae563681298",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/restaurant-management/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/prisma/seed.ts",
      "bytes": 78079,
      "sha256": "119bac9674210d1b7eb83f87eb169da39a7b2272e971342845fd686cfeb38620",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/restaurant-management/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/restaurant-management/v1/django/fixtures.json",
      "bytes": 127763,
      "sha256": "231b55c5c71a44736a97eb47500b1d40352a31a31f26a9f9e72a3d9fd84739c2",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767568538,
  "updatedAt": 1788767568538
}
