ACID · Schema

AcidTransaction

Represents an ACID database transaction with its properties, status, and isolation level.

ACIDDatabaseTransactionsAtomicityConsistencyIsolationDurabilityDistributed Systems

Properties

Name Type Description
transactionId string Unique identifier for the transaction
status string Current status of the transaction
isolationLevel string SQL transaction isolation level
startTime string Timestamp when the transaction began
endTime string Timestamp when the transaction was committed or rolled back
durationMs integer Transaction duration in milliseconds
operations array List of database operations within this transaction
rollbackReason string Reason for rollback if the transaction was not committed
savepoints array Named savepoints defined within this transaction
View JSON Schema on GitHub

JSON Schema

acid-transaction-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acid/refs/heads/main/json-schema/acid-transaction-schema.json",
  "title": "AcidTransaction",
  "description": "Represents an ACID database transaction with its properties, status, and isolation level.",
  "type": "object",
  "properties": {
    "transactionId": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the transaction",
      "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    },
    "status": {
      "type": "string",
      "description": "Current status of the transaction",
      "enum": ["Active", "Committed", "Rolled Back", "Aborted", "Pending"],
      "example": "Committed"
    },
    "isolationLevel": {
      "type": "string",
      "description": "SQL transaction isolation level",
      "enum": ["Read Uncommitted", "Read Committed", "Repeatable Read", "Serializable"],
      "example": "Serializable"
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the transaction began",
      "example": "2026-04-19T10:00:00.000Z"
    },
    "endTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the transaction was committed or rolled back",
      "example": "2026-04-19T10:00:00.150Z"
    },
    "durationMs": {
      "type": "integer",
      "description": "Transaction duration in milliseconds",
      "example": 150
    },
    "operations": {
      "type": "array",
      "description": "List of database operations within this transaction",
      "items": {
        "$ref": "#/$defs/DatabaseOperation"
      }
    },
    "rollbackReason": {
      "type": "string",
      "description": "Reason for rollback if the transaction was not committed",
      "example": "Serialization failure: concurrent transaction updated the same row"
    },
    "savepoints": {
      "type": "array",
      "description": "Named savepoints defined within this transaction",
      "items": {
        "type": "string"
      },
      "example": ["sp1", "before_payment"]
    }
  },
  "required": ["transactionId", "status", "isolationLevel", "startTime"],
  "$defs": {
    "DatabaseOperation": {
      "type": "object",
      "description": "A single SQL operation within a transaction",
      "properties": {
        "operationId": {
          "type": "integer",
          "description": "Sequential identifier within the transaction",
          "example": 1
        },
        "type": {
          "type": "string",
          "description": "SQL operation type",
          "enum": ["SELECT", "INSERT", "UPDATE", "DELETE", "SAVEPOINT", "ROLLBACK TO SAVEPOINT"],
          "example": "UPDATE"
        },
        "table": {
          "type": "string",
          "description": "Database table affected by the operation",
          "example": "accounts"
        },
        "rowsAffected": {
          "type": "integer",
          "description": "Number of rows affected by the operation",
          "example": 1
        },
        "executionTimeMs": {
          "type": "number",
          "description": "Execution time of the operation in milliseconds",
          "example": 2.5
        }
      },
      "required": ["operationId", "type"]
    }
  }
}