{
  "format": "dataset-manifest/1",
  "slug": "table-reservations",
  "version": 1,
  "seed": "table-reservations:1",
  "spec": {
    "format": "dataset/1",
    "slug": "table-reservations",
    "name": "Table Reservations",
    "tagline": "Reservations data including guests, tables, services, bookings, and no-show records for a restaurant.",
    "description": "Restaurants manage reservations to optimize their seating and service offerings. This dataset models the intricacies of table reservations, detailing guests, tables, services, and bookings. The 'guests' table holds information about individuals who make reservations, while the 'tables' table captures the unique characteristics of each table, including its capacity. The 'services' table defines the types of dining experiences offered, such as lunch or dinner. Finally, the 'bookings' table links the guests and tables, indicating the party size and any no-show statuses. The relational nature of these tables allows users to explore various aspects of restaurant operations, such as understanding peak times, managing capacity effectively, and analyzing guest behavior. This synthetic dataset is ideal for practicing SQL queries, testing API endpoints, or simulating restaurant management scenarios.",
    "domain": "restaurants",
    "shape": "transactional",
    "useCases": [
      "api-mocking",
      "test-fixtures"
    ],
    "keywords": [
      "reservations",
      "restaurants",
      "guests",
      "tables",
      "services",
      "bookings",
      "no-shows"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "guests": {
        "description": "Each row represents a unique guest making a reservation, with information linking to their bookings.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each guest."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the guest."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address for the guest."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number for the guest."
          }
        }
      },
      "tables": {
        "description": "Details of each table available in the restaurant, including its capacity for bookings.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each table."
          },
          "capacity": {
            "kind": "int",
            "min": 2,
            "max": 10,
            "description": "Maximum number of guests the table can accommodate."
          },
          "location": {
            "kind": "words",
            "description": "Location description of the table within the restaurant."
          }
        }
      },
      "services": {
        "description": "Different types of dining services offered by the restaurant, linking to bookings.",
        "rows": 3,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each service type."
          },
          "service_type": {
            "kind": "enum",
            "values": [
              "lunch",
              "dinner"
            ],
            "description": "Type of service provided."
          }
        }
      },
      "bookings": {
        "description": "Records of reservations made by guests, linking to tables and services.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each booking."
          },
          "guest_id": {
            "kind": "fk",
            "ref": "guests.id",
            "description": "Reference to the guest making the booking."
          },
          "table_id": {
            "kind": "fk",
            "ref": "tables.id",
            "description": "Reference to the table being booked."
          },
          "service_id": {
            "kind": "fk",
            "ref": "services.id",
            "description": "Reference to the service type for the booking."
          },
          "party_size": {
            "kind": "int",
            "min": 1,
            "max": 10,
            "description": "Number of guests in the booking."
          },
          "no_show": {
            "kind": "bool",
            "description": "Indicates if the guest did not show up for the reservation."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What is the average party size for reservations?",
      "How many guests are no-shows on average?",
      "Which table has the highest booking rate?",
      "What service type (lunch or dinner) is more popular among guests?",
      "How does the capacity of tables affect the number of reservations made?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Bookings with Guests",
        "sql": "SELECT b.id, g.full_name FROM bookings b JOIN guests g ON b.guest_id = g.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Reservations by Service Type",
        "sql": "SELECT s.service_type, COUNT(b.id) FROM bookings b JOIN services s ON b.service_id = s.id GROUP BY s.service_type;",
        "dialect": "postgres"
      },
      {
        "title": "Average Party Size by Table",
        "sql": "SELECT t.id, AVG(b.party_size) FROM bookings b JOIN tables t ON b.table_id = t.id GROUP BY t.id;",
        "dialect": "postgres"
      },
      {
        "title": "No-Show Rate by Service Type",
        "sql": "SELECT s.service_type, AVG(b.no_show::int) FROM bookings b JOIN services s ON b.service_id = s.id GROUP BY s.service_type;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "API Development for Reservation System",
        "body": "Developers can utilize this dataset to mock an API for a restaurant reservation system. They can create endpoints that return guest details, table availability, and booking history, all of which can be tested against realistic data."
      },
      {
        "title": "Testing Database Integrations",
        "body": "Database engineers can use this synthetic dataset to test integrations with their restaurant management systems. By populating databases with guest, table, and booking information, they can simulate real-world scenarios and validate their application logic."
      },
      {
        "title": "Analyzing Guest Behavior",
        "body": "Data analysts can leverage this dataset to analyze guest behavior patterns, such as peak reservation times, popular service types, and the impact of table capacity on bookings. Insights drawn from this data can help improve restaurant operations."
      }
    ]
  },
  "counts": {
    "guests": 200,
    "services": 3,
    "tables": 50,
    "bookings": 250
  },
  "stats": {
    "guests": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 194,
          "min": "Alice Castro",
          "max": "Zoe Demir"
        },
        "email": {
          "nulls": 0,
          "distinct": 198
        },
        "phone": {
          "nulls": 0,
          "distinct": 188
        }
      }
    },
    "tables": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "capacity": {
          "nulls": 0,
          "distinct": 9,
          "min": 2,
          "max": 10
        },
        "location": {
          "nulls": 0,
          "distinct": 50
        }
      }
    },
    "services": {
      "rows": 3,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 3,
          "min": 1,
          "max": 3
        },
        "service_type": {
          "nulls": 0,
          "distinct": 2,
          "min": "dinner",
          "max": "lunch"
        }
      }
    },
    "bookings": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "guest_id": {
          "nulls": 0,
          "distinct": 147,
          "min": 1,
          "max": 200
        },
        "table_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "service_id": {
          "nulls": 0,
          "distinct": 3,
          "min": 1,
          "max": 3
        },
        "party_size": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "no_show": {
          "nulls": 0,
          "distinct": 2,
          "min": "false",
          "max": "true"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/guests.csv",
      "format": "csv",
      "table": "guests",
      "key": "datasets/table-reservations/v1/csv/guests.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/csv/guests.csv",
      "bytes": 11362,
      "sha256": "f0c832d9bba53c5f3cc3f6bb00f3a319b3368ec23ec5ce217178ed7a50ba492b",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/services.csv",
      "format": "csv",
      "table": "services",
      "key": "datasets/table-reservations/v1/csv/services.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/csv/services.csv",
      "bytes": 45,
      "sha256": "ab37f9f8e24c61c0f44035e0c0c5a934eb7b68607993d6d3d06b12df8c7b2ba8",
      "rows": 3,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/tables.csv",
      "format": "csv",
      "table": "tables",
      "key": "datasets/table-reservations/v1/csv/tables.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/csv/tables.csv",
      "bytes": 1509,
      "sha256": "f44fe5067b126ffb42b41910da4c74a0808cfbcae404e3b5d85386c7990370da",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/bookings.csv",
      "format": "csv",
      "table": "bookings",
      "key": "datasets/table-reservations/v1/csv/bookings.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/csv/bookings.csv",
      "bytes": 5192,
      "sha256": "6b10f603962a9224b46ae5738f79d0c514177e5f8291db08a28ea02117886e0c",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "table-reservations.json",
      "format": "json",
      "table": null,
      "key": "datasets/table-reservations/v1/table-reservations.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/table-reservations.json",
      "bytes": 68317,
      "sha256": "bcb315180b5d666e7bd378134cb60a0156f6f36cddb77a1c68b8c693038a16bc",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/table-reservations/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/sql/postgres.sql",
      "bytes": 26398,
      "sha256": "773b60d31c408f2d065b4675569abb029452f700c463aff834231232264eac6a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/table-reservations/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/sql/mysql.sql",
      "bytes": 25068,
      "sha256": "39151741d6a6ae6e38ad5e3d3eb138a669a5b9e9a337e2361316dbd6745f82e7",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/table-reservations/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/sql/mssql.sql",
      "bytes": 25955,
      "sha256": "d3d7caa52f7eacaa893f46fb62e5f4e8a4ecac66418d14c02e23dc8b2b186da9",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/table-reservations/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/sql/sqlite.sql",
      "bytes": 24930,
      "sha256": "ca17136f3268b650cc3a526fc755877f55721a0ff8778fe6913490553fe6a393",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/table-reservations/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/prisma/seed.ts",
      "bytes": 51546,
      "sha256": "300b4c737cfb7eebc3094ec3e6bbb5ee74a7f8e30f00386f366e88b7e0721f95",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/table-reservations/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/table-reservations/v1/django/fixtures.json",
      "bytes": 87623,
      "sha256": "437e953c003b678c2d03908b1a91b43d15f318d8429d16f165ef32b21779fe90",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766543565,
  "updatedAt": 1788766543565
}
