{
  "format": "dataset-manifest/1",
  "slug": "concurrency-control-system",
  "version": 1,
  "seed": "concurrency-control-system:1",
  "spec": {
    "format": "dataset/1",
    "slug": "concurrency-control-system",
    "name": "Real Estate Concurrency Metrics",
    "tagline": "Metrics on real estate transactions, including properties, locks, isolation levels, deadlocks, and transaction data.",
    "description": "Real estate agents juggle multiple transactions daily, ensuring properties are bought, sold, and leased smoothly. This business thrives on efficiency, as agents must navigate various resources accessed concurrently to close deals. Transactions represent unique sales or lease agreements, while properties detail the characteristics of each listing, such as location, price, and amenities. Locks regulate access to the data during these transactions, and isolation levels define how operations are isolated from one another, allowing for optimal performance and integrity in a busy marketplace. Deadlocks highlight situations where two or more transactions are unable to proceed, showcasing potential bottlenecks that can disrupt the flow of business.\n\nIn this dataset, each row in the properties table corresponds to a distinct property available in the market. Transactions capture the ongoing exchanges associated with these properties, indicating the nature of each deal. Locks provide insight into how many transactions are being processed simultaneously, while isolation_levels reveal the data management strategies employed to prevent conflicts. Deadlocks table records instances where transactions encounter failures due to resource contention, providing vital information on system performance under load. \n\nThis data allows developers to practice data queries and analytics, helping them answer essential questions: How do peak transaction times influence lock utilization? What isolation levels are common during high-volume periods? When do deadlocks occur, and how can they be mitigated? Exploring these metrics offers a comprehensive understanding of the challenges faced in managing concurrent operations in real estate, making it an excellent resource for honing your skills in data analysis and problem-solving. Remember, the data is synthetic, crafted to simulate real-world scenarios while providing you with the opportunity to sharpen your technical capabilities.",
    "domain": "real-estate",
    "shape": "hierarchical",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "real estate",
      "concurrency",
      "transactions",
      "locks",
      "isolation levels",
      "deadlocks",
      "metrics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "properties": {
        "description": "This table lists all the properties available in the real estate market, including details such as location and value.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each property."
          },
          "address": {
            "kind": "fullName",
            "description": "The full address of the property."
          },
          "value": {
            "kind": "decimal",
            "min": 50000,
            "max": 2000000,
            "scale": 2,
            "description": "Market value of the property.",
            "nullable": true,
            "when": {
              "column": "type",
              "in": [
                "residential",
                "commercial"
              ]
            }
          },
          "type": {
            "kind": "enum",
            "values": [
              "residential",
              "commercial",
              "industrial"
            ],
            "description": "Type of property."
          }
        }
      },
      "transactions": {
        "description": "This table records the details of transactions occurring for the properties, linking them to specific properties.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "property_id": {
            "kind": "fk",
            "ref": "properties.id",
            "description": "References the property involved in the transaction."
          },
          "timestamp": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date and time when the transaction occurred.",
            "dayProfile": "business"
          },
          "amount": {
            "kind": "decimal",
            "min": 50000,
            "max": 2000000,
            "scale": 2,
            "description": "Transaction amount."
          }
        },
        "via": "property_id"
      },
      "locks": {
        "description": "This table tracks the locks applied during transactions, detailing their types and durations.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each lock."
          },
          "transaction_id": {
            "kind": "fk",
            "ref": "transactions.id",
            "description": "References the transaction associated with the lock."
          },
          "lock_type": {
            "kind": "enum",
            "values": [
              "shared",
              "exclusive"
            ],
            "description": "Type of lock applied."
          },
          "duration": {
            "kind": "int",
            "min": 1,
            "max": 600,
            "description": "Duration of the lock in seconds.",
            "nullable": true,
            "when": {
              "column": "lock_type",
              "in": [
                "exclusive"
              ]
            }
          }
        },
        "via": "transaction_id"
      },
      "isolation_levels": {
        "description": "This table contains information about the isolation levels used during transactions.",
        "rows": 80,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each isolation level."
          },
          "level": {
            "kind": "enum",
            "values": [
              "read_uncommitted",
              "read_committed",
              "repeatable_read",
              "serializable"
            ],
            "description": "Isolation level applied to transactions."
          },
          "description": {
            "kind": "sentence",
            "description": "Brief description of the isolation level.",
            "nullable": true,
            "when": {
              "column": "level",
              "in": [
                "read_committed",
                "serializable"
              ]
            }
          }
        }
      },
      "deadlocks": {
        "description": "This table records instances of deadlocks occurring in transactions, offering insights into concurrency issues.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each deadlock incident."
          },
          "transaction_id": {
            "kind": "fk",
            "ref": "transactions.id",
            "description": "References the transaction that was involved in the deadlock."
          },
          "timestamp": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date and time when the deadlock occurred."
          }
        },
        "via": "transaction_id"
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "categorical",
      "nullable",
      "high-cardinality"
    ],
    "analysisQuestions": [
      "What are the peak times for property transactions and how do they affect lock durations?",
      "How often do deadlocks occur during transactions, and what patterns can be observed?",
      "Which isolation levels lead to the most successful transactions without deadlocks?",
      "What types of locks are most commonly used, and how do they correlate with transaction amounts?",
      "How does the duration of locks impact the overall efficiency of property transactions?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Transactions and Properties",
        "sql": "SELECT t.id, p.address, t.amount FROM transactions t JOIN properties p ON t.property_id = p.id;",
        "dialect": "postgres"
      },
      {
        "title": "Aggregate Transactions by Lock Type",
        "sql": "SELECT l.lock_type, COUNT(*) as transaction_count FROM locks l JOIN transactions t ON l.transaction_id = t.id GROUP BY l.lock_type;",
        "dialect": "postgres"
      },
      {
        "title": "Deadlock Frequency Analysis",
        "sql": "SELECT COUNT(*) as deadlock_count, DATE(timestamp) as date FROM deadlocks GROUP BY DATE(timestamp);",
        "dialect": "postgres"
      },
      {
        "title": "Transaction Amount by Isolation Level",
        "sql": "SELECT i.level, AVG(t.amount) as average_amount FROM isolation_levels i JOIN transactions t ON i.id = t.id GROUP BY i.level;",
        "dialect": "postgres"
      },
      {
        "title": "Lock Duration Impact on Deadlocks",
        "sql": "SELECT l.duration, COUNT(d.id) as deadlock_count FROM locks l LEFT JOIN deadlocks d ON l.transaction_id = d.transaction_id GROUP BY l.duration;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Real Estate Analysts",
        "body": "Real estate analysts can utilize this dataset to evaluate transaction efficiency under different concurrency conditions. By analyzing the impact of lock durations and isolation levels on transaction success, they can develop strategies to minimize deadlocks and optimize transaction processing times."
      },
      {
        "title": "Database Administrators",
        "body": "Database administrators can use the concurrency metrics to monitor and improve the performance of real estate transaction systems. By identifying peak transaction times and analyzing deadlock occurrences, they can implement better locking strategies and isolation levels to enhance system reliability."
      },
      {
        "title": "Educators in Database Management",
        "body": "Educators teaching database management can leverage this dataset in their curriculum, providing students with hands-on experience in analyzing and querying real-world concurrency scenarios. The structured tables allow for practical exercises in SQL and concurrency theory."
      },
      {
        "title": "Software Developers",
        "body": "Software developers working on real estate applications can use this dataset to test their systems under simulated concurrency scenarios. By integrating these metrics into their applications, they can better understand how to handle simultaneous transactions and improve user experience."
      }
    ]
  },
  "counts": {
    "isolation_levels": 80,
    "properties": 100,
    "transactions": 300,
    "deadlocks": 50,
    "locks": 150
  },
  "stats": {
    "properties": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "address": {
          "nulls": 0,
          "distinct": 98,
          "min": "Ana Dubois",
          "max": "Zoe Pereira"
        },
        "value": {
          "nulls": 38,
          "distinct": 62,
          "min": 106536.81,
          "max": 1990522.58
        },
        "type": {
          "nulls": 0,
          "distinct": 3,
          "min": "commercial",
          "max": "residential"
        }
      }
    },
    "transactions": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "property_id": {
          "nulls": 0,
          "distinct": 99,
          "min": 1,
          "max": 100
        },
        "timestamp": {
          "nulls": 0,
          "distinct": 300,
          "min": "2023-01-02 13:20:19",
          "max": "2023-12-31 20:11:41"
        },
        "amount": {
          "nulls": 0,
          "distinct": 300,
          "min": 54893.1,
          "max": 1987553.96
        }
      }
    },
    "locks": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "transaction_id": {
          "nulls": 0,
          "distinct": 110,
          "min": 2,
          "max": 299
        },
        "lock_type": {
          "nulls": 0,
          "distinct": 2,
          "min": "exclusive",
          "max": "shared"
        },
        "duration": {
          "nulls": 80,
          "distinct": 64,
          "min": 13,
          "max": 592
        }
      }
    },
    "isolation_levels": {
      "rows": 80,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 80,
          "min": 1,
          "max": 80
        },
        "level": {
          "nulls": 0,
          "distinct": 4,
          "min": "read_committed",
          "max": "serializable"
        },
        "description": {
          "nulls": 37,
          "distinct": 43
        }
      }
    },
    "deadlocks": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "transaction_id": {
          "nulls": 0,
          "distinct": 48,
          "min": 1,
          "max": 298
        },
        "timestamp": {
          "nulls": 0,
          "distinct": 50,
          "min": "2023-01-31 13:50:31",
          "max": "2023-12-29 16:06:41"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/isolation_levels.csv",
      "format": "csv",
      "table": "isolation_levels",
      "key": "datasets/concurrency-control-system/v1/csv/isolation_levels.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/csv/isolation_levels.csv",
      "bytes": 4059,
      "sha256": "7a79a1f6b9d77f4b0eb35e33cb577dc9e057773f1bc5843714eaefc13b784f2e",
      "rows": 80,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/properties.csv",
      "format": "csv",
      "table": "properties",
      "key": "datasets/concurrency-control-system/v1/csv/properties.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/csv/properties.csv",
      "bytes": 3449,
      "sha256": "ac0f0b09b22f5cbdb8f3d0ba62df7aa11fc2e2edf5479431ddb0b3b3ba48ce9e",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/concurrency-control-system/v1/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/csv/transactions.csv",
      "bytes": 11447,
      "sha256": "dec993cf96c0a55eb56d6b1a1fcee33b66640a6a2dfb9fba5f4e7580b348587c",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/deadlocks.csv",
      "format": "csv",
      "table": "deadlocks",
      "key": "datasets/concurrency-control-system/v1/csv/deadlocks.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/csv/deadlocks.csv",
      "bytes": 1396,
      "sha256": "7d0d703cc4872b34ca1b20532cc03ac7011a55f8707800501aacd8dd6ffb8d25",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/locks.csv",
      "format": "csv",
      "table": "locks",
      "key": "datasets/concurrency-control-system/v1/csv/locks.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/csv/locks.csv",
      "bytes": 2836,
      "sha256": "85c73990604b31d1ad9af94561a42a4ef7ef6fbea759f696718fabd4a98311e5",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "concurrency-control-system.json",
      "format": "json",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/concurrency-control-system.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/concurrency-control-system.json",
      "bytes": 79172,
      "sha256": "7b656581abddd04918f1890bed4fb18cde078a193a4e35768ce337e1ce52403a",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/sql/postgres.sql",
      "bytes": 33830,
      "sha256": "be017603e2e885d61963a8a981a112cfdf95f5eb510539a99a5aa1a489d23606",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/sql/mysql.sql",
      "bytes": 33257,
      "sha256": "c22ec22ebac6fb7ba6ded615582276207124b0154caf0e6d617cc98c50a1a7ba",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/sql/mssql.sql",
      "bytes": 34424,
      "sha256": "1077029f310a36d9b8e7234e529787edc75a6fd12903b00146bda3e406dd4711",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/sql/sqlite.sql",
      "bytes": 33095,
      "sha256": "8b591056cfe8a7f4f55092bf82a805b9df495f21b26cfa4082a454f33a8cc855",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/prisma/seed.ts",
      "bytes": 66735,
      "sha256": "163b9a6041a51c6461abc4ac7958db0cc26c103aa70a86f380616ee46e7b9456",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/concurrency-control-system/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/concurrency-control-system/v1/django/fixtures.json",
      "bytes": 110053,
      "sha256": "c7ff025e5515fe54316d13ac2bc7edfe1a33a306ecc7b2cbe27a4751066c0eea",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766683840,
  "updatedAt": 1788766683840
}
