{
  "format": "dataset-manifest/1",
  "slug": "rental-management",
  "version": 2,
  "seed": "rental-management:1",
  "spec": {
    "format": "dataset/1",
    "slug": "rental-management",
    "name": "Rental Management",
    "tagline": "Landlords, properties, tenancies, rent payments, and maintenance requests for rental management.",
    "description": "Rental managers oversee various aspects of real estate, including landlords, properties, rental units, and tenant relationships. This dataset simulates a rental management system, encompassing landlords, properties, units, tenancies, rent payments, and maintenance requests. Each table is interlinked, allowing for comprehensive data management and analysis. The landlords table provides information about property owners, while the properties table details the individual properties available for rent. The units table breaks down properties into specific rental units. The tenancies table manages the relationships between tenants and their respective units, including start and end dates. Rent payments track financial transactions associated with each tenancy, and maintenance requests provide insight into property upkeep. This synthetic dataset offers a realistic structure for developers to practice on, enabling them to build applications or perform analyses related to property management.",
    "domain": "real-estate",
    "shape": "transactional",
    "useCases": [
      "orm-seeding",
      "test-fixtures"
    ],
    "keywords": [
      "rental",
      "management",
      "landlords",
      "properties",
      "tenants",
      "payments",
      "maintenance",
      "real-estate"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "landlords": {
        "description": "Each row represents a landlord who owns one or more properties. This table links to properties via landlord_id.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the landlord."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the landlord."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the landlord."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact number of the landlord.",
            "nullable": true
          }
        }
      },
      "properties": {
        "description": "Each row represents a property owned by a landlord, linking to landlords via landlord_id.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the property."
          },
          "landlord_id": {
            "kind": "fk",
            "ref": "landlords.id",
            "description": "References the landlord who owns the property."
          },
          "address": {
            "kind": "sentence",
            "description": "Full address of the property.",
            "nullable": true,
            "when": {
              "column": "type",
              "in": [
                "apartment",
                "house",
                "condo"
              ]
            }
          },
          "type": {
            "kind": "enum",
            "values": [
              "apartment",
              "house",
              "condo"
            ],
            "description": "Type of property.",
            "weights": [
              6,
              2,
              1
            ]
          }
        }
      },
      "units": {
        "description": "Each row represents a rental unit within a property, linking to properties via property_id.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the rental unit."
          },
          "property_id": {
            "kind": "fk",
            "ref": "properties.id",
            "description": "References the property which contains this unit."
          },
          "unit_number": {
            "kind": "sentence",
            "description": "Unit number of the rental unit.",
            "nullable": true
          },
          "bedrooms": {
            "kind": "int",
            "min": 1,
            "max": 5,
            "description": "Number of bedrooms in the unit."
          }
        }
      },
      "tenancies": {
        "description": "Each row represents a tenancy agreement for a unit, linking to units via unit_id.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the tenancy."
          },
          "unit_id": {
            "kind": "fk",
            "ref": "units.id",
            "description": "References the unit that is rented."
          },
          "tenant_name": {
            "kind": "fullName",
            "description": "Name of the tenant in the tenancy.",
            "nullable": true
          },
          "start_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Start date of the tenancy.",
            "trend": "growing"
          },
          "end_date": {
            "kind": "date",
            "after": "start_date",
            "withinDays": 365,
            "description": "End date of the tenancy, must be after the start date."
          }
        }
      },
      "rent_payments": {
        "description": "Each row represents a rent payment for a tenancy, linking to tenancies via tenancy_id.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the rent payment."
          },
          "tenancy_id": {
            "kind": "fk",
            "ref": "tenancies.id",
            "description": "References the tenancy for which the payment is made."
          },
          "amount": {
            "kind": "decimal",
            "min": 500,
            "max": 3000,
            "scale": 2,
            "description": "Amount paid for the rent.",
            "distribution": "long-tail"
          },
          "payment_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the rent payment was made.",
            "trend": "seasonal"
          }
        }
      },
      "maintenance_requests": {
        "description": "Each row represents a maintenance request for a unit, linking to units via unit_id.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the maintenance request."
          },
          "unit_id": {
            "kind": "fk",
            "ref": "units.id",
            "description": "References the unit needing maintenance."
          },
          "request_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the maintenance request was made.",
            "trend": "seasonal"
          },
          "description": {
            "kind": "sentence",
            "description": "Description of the maintenance issue.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "How many properties does each landlord own?",
      "What is the average rent payment per unit type?",
      "Which units have the most maintenance requests?",
      "What is the average tenancy duration for each unit?",
      "When do most maintenance requests occur during the year?"
    ],
    "suggestedQueries": [
      {
        "title": "List all landlords and their properties",
        "sql": "SELECT landlords.full_name, properties.address FROM landlords JOIN properties ON landlords.id = properties.landlord_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count the number of units per property type",
        "sql": "SELECT properties.type, COUNT(units.id) FROM properties LEFT JOIN units ON properties.id = units.property_id GROUP BY properties.type;",
        "dialect": "postgres"
      },
      {
        "title": "Calculate total rent payments per tenant",
        "sql": "SELECT tenancies.tenant_name, SUM(rent_payments.amount) FROM tenancies JOIN rent_payments ON tenancies.id = rent_payments.tenancy_id GROUP BY tenancies.tenant_name;",
        "dialect": "postgres"
      },
      {
        "title": "Find maintenance requests by month",
        "sql": "SELECT DATE_TRUNC('month', maintenance_requests.request_date) AS month, COUNT(*) FROM maintenance_requests GROUP BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Property Management Software Development",
        "body": "Developers looking to build property management software can use this dataset to simulate real-life scenarios. They can create features for tracking landlords, properties, tenancies, and maintenance requests while ensuring the application meets the needs of rental managers."
      },
      {
        "title": "Testing Rental Management Applications",
        "body": "Quality assurance teams can utilize this dataset to test rental management applications. By simulating various data scenarios, they can ensure that the application handles different cases, such as managing multiple landlords and tracking payments accurately."
      },
      {
        "title": "Database Performance Optimization",
        "body": "Database administrators can leverage this dataset to analyze query performance and optimize database structures. By running complex queries against the dataset, they can identify bottlenecks and improve the performance of rental management systems."
      },
      {
        "title": "Educational Purposes for Real Estate Courses",
        "body": "Instructors can use this dataset for teaching purposes in real estate management courses. Students can learn how to analyze rental data, understand tenancy agreements, and explore property management concepts through practical exercises."
      }
    ]
  },
  "counts": {
    "landlords": 50,
    "properties": 100,
    "units": 200,
    "maintenance_requests": 100,
    "tenancies": 150,
    "rent_payments": 300
  },
  "stats": {
    "landlords": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "full_name": {
          "nulls": 0,
          "distinct": 50,
          "min": "Amir Becker",
          "max": "Zara Silva"
        },
        "email": {
          "nulls": 0,
          "distinct": 50
        },
        "phone": {
          "nulls": 3,
          "distinct": 47
        }
      }
    },
    "properties": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "landlord_id": {
          "nulls": 0,
          "distinct": 43,
          "min": 1,
          "max": 50
        },
        "address": {
          "nulls": 0,
          "distinct": 100
        },
        "type": {
          "nulls": 0,
          "distinct": 3,
          "min": "apartment",
          "max": "house"
        }
      }
    },
    "units": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "property_id": {
          "nulls": 0,
          "distinct": 82,
          "min": 1,
          "max": 100
        },
        "unit_number": {
          "nulls": 24,
          "distinct": 176
        },
        "bedrooms": {
          "nulls": 0,
          "distinct": 5,
          "min": 1,
          "max": 5
        }
      }
    },
    "tenancies": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "unit_id": {
          "nulls": 0,
          "distinct": 109,
          "min": 1,
          "max": 199
        },
        "tenant_name": {
          "nulls": 16,
          "distinct": 133,
          "min": "Alice Jansen",
          "max": "Zoe Wright"
        },
        "start_date": {
          "nulls": 0,
          "distinct": 141,
          "min": "2020-01-03",
          "max": "2023-12-26"
        },
        "end_date": {
          "nulls": 0,
          "distinct": 139,
          "min": "2020-02-28",
          "max": "2024-11-14"
        }
      }
    },
    "rent_payments": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "tenancy_id": {
          "nulls": 0,
          "distinct": 128,
          "min": 1,
          "max": 150
        },
        "amount": {
          "nulls": 0,
          "distinct": 299,
          "min": 500.01,
          "max": 2996.15
        },
        "payment_date": {
          "nulls": 0,
          "distinct": 260,
          "min": "2020-01-14",
          "max": "2023-12-16"
        }
      }
    },
    "maintenance_requests": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "unit_id": {
          "nulls": 0,
          "distinct": 80,
          "min": 3,
          "max": 199
        },
        "request_date": {
          "nulls": 0,
          "distinct": 97,
          "min": "2020-01-05",
          "max": "2023-12-20"
        },
        "description": {
          "nulls": 12,
          "distinct": 88
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/landlords.csv",
      "format": "csv",
      "table": "landlords",
      "key": "datasets/rental-management/v2/csv/landlords.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/landlords.csv",
      "bytes": 2754,
      "sha256": "6c2b0eac4f0f4c2f48a1a54d5e5dd11e3925b313b51b129ca5f6528fda651f0e",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/properties.csv",
      "format": "csv",
      "table": "properties",
      "key": "datasets/rental-management/v2/csv/properties.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/properties.csv",
      "bytes": 7158,
      "sha256": "57a5246367b039c7e897d3639bb5d173d0aff47e3588010ba7156da235bd496e",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/units.csv",
      "format": "csv",
      "table": "units",
      "key": "datasets/rental-management/v2/csv/units.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/units.csv",
      "bytes": 11701,
      "sha256": "7c3aa0250d791fb136ee52882f198d123f54879d2479e45a2a9a395d8f174e6f",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/maintenance_requests.csv",
      "format": "csv",
      "table": "maintenance_requests",
      "key": "datasets/rental-management/v2/csv/maintenance_requests.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/maintenance_requests.csv",
      "bytes": 6862,
      "sha256": "4d355b2ce8901cc9b475e9bc0c012a0ce7adffb6783f3e974cf7a1debbc8e541",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/tenancies.csv",
      "format": "csv",
      "table": "tenancies",
      "key": "datasets/rental-management/v2/csv/tenancies.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/tenancies.csv",
      "bytes": 6174,
      "sha256": "d69b81ca0a73c10350ef184e9f192d87ebc4fa962b9bab662461d1d968eb6efa",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/rent_payments.csv",
      "format": "csv",
      "table": "rent_payments",
      "key": "datasets/rental-management/v2/csv/rent_payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/csv/rent_payments.csv",
      "bytes": 7983,
      "sha256": "4734dca9250b81fbaf3976a7afa18fb7a18ee1d79ab915aec8bbe435ab996f7e",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "rental-management.json",
      "format": "json",
      "table": null,
      "key": "datasets/rental-management/v2/rental-management.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/rental-management.json",
      "bytes": 124372,
      "sha256": "34fc76891a46c49c902ebaaaa4bba2bb06bfbc3cd9e1092d18ee0ef751e78ab7",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/rental-management/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/sql/postgres.sql",
      "bytes": 56880,
      "sha256": "1fa58d4ef0dc8ede9e7493b0e5f5987f3fa66c12e1560be105e6ad3bdd482c17",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/rental-management/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/sql/mysql.sql",
      "bytes": 56181,
      "sha256": "3e4b349087c512b9ea1c3230ec1da84b78b5f47042dce241eddf4da6d46af01d",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/rental-management/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/sql/mssql.sql",
      "bytes": 58060,
      "sha256": "902210d44c5f50d15fa639fb969370b99cc176dba1b0ab24bb22b5c867c22d82",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/rental-management/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/sql/sqlite.sql",
      "bytes": 55945,
      "sha256": "e6eac2a936ecb6f5c7cfe0e0b9b1fa239be3de11d137c7953f02fa5c1cb552f4",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/rental-management/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/prisma/seed.ts",
      "bytes": 99599,
      "sha256": "371472f297135aad92398392ee480c325fbc08ffde9249cbc9828d1347eed3b6",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/rental-management/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/rental-management/v2/django/fixtures.json",
      "bytes": 163787,
      "sha256": "96fea4df5cf922a76f7eba545deb4a211aab6ca05d3a228c346276b07e0d8ef5",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766895047,
  "updatedAt": 1788785784206
}
