{
  "slug": "sqlite-rowid",
  "term": "SQLite rowid",
  "aliases": [
    "SQLite ROWID"
  ],
  "definition": "A SQLite rowid is the unique signed 64-bit integer key used to identify a row in an ordinary rowid table.",
  "note": "An unaliased rowid is not a durable application identifier because VACUUM may change it. An ordinary id INTEGER PRIMARY KEY column aliases it and makes that value explicit data. WITHOUT ROWID tables and virtual tables are outside this definition. [identity-rowid]\n\nIn Hesela's two-row SQLite 3.45.1 fixture, VACUUM and a Python iterdump restore reassigned hidden IDs 2 and 3 to 1 and 2. Saved reference 2 selected gamma instead of beta despite intact declared data and a passing integrity_check. The explicit-key controls retained the mapping. [evidence] [receipt]\n\nVACUUM INTO and the Online Backup API preserved the hidden IDs in the measured fixture. The pinned transfer implementation distinguishes the INTO path; similar command names do not establish equal identity behavior for all schemas or versions. [identity-insert] [receipt]\n\nCheck the exact declaration: INT PRIMARY KEY and column-level INTEGER PRIMARY KEY DESC do not alias rowid, unlike INTEGER PRIMARY KEY or its table-level DESC form. In four additional controls, all schemas reported a primary key, but only the aliases populated an omitted id. The full rows survived Python dump restoration. [identity-create] [schema-controls]",
  "related": [
    "sqlite-autoincrement",
    "sqlite-online-backup",
    "backup-verification",
    "restore-test"
  ],
  "citations": [
    {
      "id": "identity-rowid",
      "title": "SQLite: Rowid tables and persistence of unaliased rowids",
      "url": "https://www.sqlite.org/rowidtable.html",
      "accessed": "2026-10-18"
    },
    {
      "id": "identity-insert",
      "title": "SQLite version-3.45.1 insert.c: xferOptimization rowid selection, lines 2933-2947",
      "url": "https://github.com/sqlite/sqlite/blob/version-3.45.1/src/insert.c#L2933-L2947",
      "accessed": "2026-10-18"
    },
    {
      "id": "evidence",
      "title": "Hesela: measured SQLite row identity across copying and history rollback",
      "url": "https://hesela.com/analyses/backup-verification-is-not-a-restore-test/#sqlite-row-identity",
      "accessed": "2026-10-18"
    },
    {
      "id": "receipt",
      "title": "Hesela: twelve designed SQLite identity cases, full observations and source hash",
      "url": "https://hesela.dev/research/sqlite-identity/results.json",
      "accessed": "2026-10-18"
    },
    {
      "id": "identity-create",
      "title": "SQLite CREATE TABLE: exact type and DESC exception",
      "url": "https://sqlite.org/lang_createtable.html#rowids_and_the_integer_primary_key",
      "accessed": "2026-10-18"
    },
    {
      "id": "schema-controls",
      "title": "Hesela: four measured primary-key spelling controls with complete rows and source hash",
      "url": "https://hesela.dev/research/sqlite-identity/schema-controls.json",
      "accessed": "2026-10-18"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-18"
}
