{
 "version": "2026.10.09",
 "schema": 1,
 "rules": [
  "Ids never change meaning. A work id is `w` + 7 base32 letters, a release `r`, a company `c`. An id that stops being used appears in `redirect`, with the id that absorbed it when two works were merged.",
  "Columns are only added, never renamed or removed, within a major schema version (this is schema 1).",
  "Every fact in work and release is backed by rows of `assertion` (evidence.jsonl): its source, tier, how it was joined to the dump and where to look again. Tiers: 0 an override, 1 the media itself, 2 the curated dump lists and MAME, 3 the press, 4 the web databases.",
  "Empty means unknown, never zero or \"none\". In JSON Lines the key is absent.",
  "No column holds prose: titles, names, identifiers, dates, numbers and short codes only.",
  "Dates are split into year, month, day; `date_basis` says whether the date is evidence about that release (`release`), the title's first date on the platform (`title`) or only the game's first date anywhere (`work`). MAME's uncertain years (\"19??\") are kept as written in `year`.",
  "A dump sold in several markets (\"(Japan, USA)\") belongs to a release per market: `dump_release` (in dumps.jsonl, `release_ids`) lists them all. When a publisher shipped identical bytes in several markets, no hash can tell them apart: a lookup returns every release the dump was sold as.",
  "A dump's `identity` is the SHA-1 + `size` of its canonical form, or set1 over its files for a dump of several (https://titlescreen.org/spec/canonical-form): container and file name never matter. `fp1` is a lookup key that returns candidates, not an identity (https://titlescreen.org/spec/fp1). `file_hash.status` says who has seen a hash: a list (`dat`), a scan that agreed with the list (`matched`), a scan of a copy no list has (`scan-only`).",
  "Lookups (the site's API, Phase 3): by `sha1` + `size`, `crc32` + `size` (a pre-check, not confirmed), `fp1`, or a list's whole-file hash; each answer carries its basis (`sha1`, `crc32`, `fp1`, `file`)."
 ],
 "tables": [
  {
   "table": "meta",
   "about": "the build's version, inputs and counts",
   "columns": [
    {
     "name": "key",
     "type": "TEXT",
     "about": "version, schema, built, libretro_commit, mame, mame_hash_commit, licence, ids_minted"
    },
    {
     "name": "value",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "platform",
   "about": "the consoles, handhelds and arcade the database covers",
   "columns": [
    {
     "name": "id",
     "type": "TEXT",
     "about": "Freeplay's system ids, extended (intv, o2, ps4, switch ...)"
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": "the platform's usual English name"
    },
    {
     "name": "manufacturer",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "generation",
     "type": "TEXT",
     "about": "'2'..'8' or 'arcade'"
    },
    {
     "name": "kind",
     "type": "TEXT",
     "about": "home, handheld, arcade, hybrid"
    },
    {
     "name": "addon_of",
     "type": "TEXT",
     "about": "the platform an add-on plugs into (32x, segacd, fds, jaguarcd)"
    },
    {
     "name": "launch_year",
     "type": "INTEGER",
     "about": "first launch anywhere"
    },
    {
     "name": "end_year",
     "type": "INTEGER",
     "about": "last commercial year; NULL while homebrew or new releases continue"
    },
    {
     "name": "media",
     "type": "TEXT",
     "about": "cartridge, cd, gd-rom, dvd, bd, umd, card, disk, arcade-set"
    },
    {
     "name": "title_only",
     "type": "INTEGER",
     "about": "1: no dump list exists, releases come from the web lists"
    }
   ]
  },
  {
   "table": "company",
   "about": "publishers and developers, every spelling the sources use folded into one row",
   "columns": [
    {
     "name": "id",
     "type": "TEXT",
     "about": "c + 7 base32"
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": "display name: the merge file's, else the spelling the sources use most"
    },
    {
     "name": "key",
     "type": "TEXT",
     "about": "the fold every spelling reduces to"
    },
    {
     "name": "aliases",
     "type": "TEXT",
     "about": "JSON list of every spelling the sources used"
    },
    {
     "name": "codes",
     "type": "TEXT",
     "about": "JSON: header code tables (licensee, maker codes)"
    },
    {
     "name": "wikidata",
     "type": "TEXT",
     "about": "Wikidata item, when the merge file names one"
    },
    {
     "name": "published",
     "type": "INTEGER",
     "about": "releases naming it as publisher"
    },
    {
     "name": "developed",
     "type": "INTEGER",
     "about": "releases naming it as developer"
    }
   ]
  },
  {
   "table": "genre",
   "about": "the controlled genre list (data/genre-map.yaml)",
   "columns": [
    {
     "name": "id",
     "type": "TEXT",
     "about": "a path: shooter, shooter/shmup"
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "parent",
     "type": "TEXT",
     "about": "the top-level genre of a sub-genre"
    }
   ]
  },
  {
   "table": "work",
   "about": "a game as a creative work, across every platform and market",
   "columns": [
    {
     "name": "id",
     "type": "TEXT",
     "about": "w + 7 base32"
    },
    {
     "name": "title",
     "type": "TEXT",
     "about": "the first English-market commercial release's title, else the first release's"
    },
    {
     "name": "sort_title",
     "type": "TEXT",
     "about": "the title without a leading article, for browsing"
    },
    {
     "name": "first_year",
     "type": "INTEGER",
     "about": "the earliest dated commercial release, on any platform"
    },
    {
     "name": "first_month",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "first_day",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "first_platform_id",
     "type": "TEXT",
     "about": "NULL when several platforms share the earliest date, or none is dated"
    },
    {
     "name": "first_platform_status",
     "type": "TEXT",
     "about": "single, simultaneous, unknown"
    },
    {
     "name": "first_platforms",
     "type": "TEXT",
     "about": "the platforms of the earliest date, comma-separated"
    },
    {
     "name": "developer_id",
     "type": "TEXT",
     "about": "the original developer, when the first platform's releases agree"
    },
    {
     "name": "genre_id",
     "type": "TEXT",
     "about": "the genre most of its commercial releases have"
    },
    {
     "name": "max_players",
     "type": "INTEGER",
     "about": "the maximum over its releases"
    },
    {
     "name": "franchise",
     "type": "TEXT",
     "about": "libretro's franchise name"
    },
    {
     "name": "kind",
     "type": "TEXT",
     "about": "game, compilation, add-on, non-game"
    },
    {
     "name": "releases",
     "type": "INTEGER",
     "about": "how many releases it has"
    },
    {
     "name": "platforms",
     "type": "TEXT",
     "about": "comma-separated platform ids"
    }
   ]
  },
  {
   "table": "release",
   "about": "a title on one platform in one market and class (commercial, prototype, demo ...)",
   "columns": [
    {
     "name": "id",
     "type": "TEXT",
     "about": "r + 7 base32"
    },
    {
     "name": "work_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "platform_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "region",
     "type": "TEXT",
     "about": "market: JP, US, EU, WORLD, DE, FR, KR ...; '' unknown"
    },
    {
     "name": "title",
     "type": "TEXT",
     "about": "as released in that market (native script for JP/KR/CN when known)"
    },
    {
     "name": "title_latin",
     "type": "TEXT",
     "about": "the dump lists' Latin spelling"
    },
    {
     "name": "year",
     "type": "TEXT",
     "about": "may be MAME's '19??'"
    },
    {
     "name": "month",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "day",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "date_basis",
     "type": "TEXT",
     "about": "release: evidence about this release; title: the title's first date on the platform; work: only the game's first date anywhere (Wikidata) was known"
    },
    {
     "name": "copyright_year",
     "type": "TEXT",
     "about": "from the media or the title screen (Phase 4, 5)"
    },
    {
     "name": "publisher_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "publisher_raw",
     "type": "TEXT",
     "about": "the winning source's spelling"
    },
    {
     "name": "developer_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "developer_raw",
     "type": "TEXT",
     "about": "the winning source's spelling"
    },
    {
     "name": "players_min",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "players_max",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "players_mode",
     "type": "TEXT",
     "about": "alternating, simultaneous, both (later)"
    },
    {
     "name": "multiplayer_hw",
     "type": "TEXT",
     "about": "multitap, link-cable, online (media stage)"
    },
    {
     "name": "genre_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "genre_raw",
     "type": "TEXT",
     "about": "the winning source's genre words"
    },
    {
     "name": "serial",
     "type": "TEXT",
     "about": "the publisher's catalogue numbers, ';'-joined"
    },
    {
     "name": "product_code",
     "type": "TEXT",
     "about": "the maker's code where it differs from the serial (media stage)"
    },
    {
     "name": "rating",
     "type": "TEXT",
     "about": "the age rating the media declares (media stage)"
    },
    {
     "name": "price",
     "type": "TEXT",
     "about": "launch price in that market (press stage)"
    },
    {
     "name": "price_currency",
     "type": "TEXT",
     "about": "ISO 4217"
    },
    {
     "name": "media",
     "type": "TEXT",
     "about": "the platform's media"
    },
    {
     "name": "licensed",
     "type": "TEXT",
     "about": "commercial, unlicensed, homebrew, prototype, demo, bios, add-on"
    },
    {
     "name": "titles_by_lang",
     "type": "TEXT",
     "about": "JSON {lang: [titles]} the release's own evidence carries"
    },
    {
     "name": "natural_key",
     "type": "TEXT",
     "about": "platform|title key|market|class, what the id was minted for"
    },
    {
     "name": "dumps",
     "type": "INTEGER",
     "about": "how many dumps it has"
    }
   ]
  },
  {
   "table": "dump",
   "about": "an identified copy: a No-Intro, Redump, MAME, FBNeo or MAME software-list entry, or a copy a scan read that no list has (source scan or community)",
   "columns": [
    {
     "name": "id",
     "type": "INTEGER",
     "about": "stable only within one archive; use key across archives"
    },
    {
     "name": "key",
     "type": "TEXT",
     "about": "platform/source/name, or arcade/mame/<set>"
    },
    {
     "name": "release_id",
     "type": "TEXT",
     "about": "the first of its releases (dump_release has all)"
    },
    {
     "name": "platform_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": "the DAT's own name, verbatim; for a scan, the name of the list dump its header's serial placed it beside"
    },
    {
     "name": "source",
     "type": "TEXT",
     "about": "no-intro, redump, mame, fbneo, mame-sl, scan, community"
    },
    {
     "name": "dat",
     "type": "TEXT",
     "about": "which DAT or list"
    },
    {
     "name": "region",
     "type": "TEXT",
     "about": "the DAT's own region field, verbatim (\"USA\", \"Japan, Europe\")"
    },
    {
     "name": "revision",
     "type": "TEXT",
     "about": "from the name's tags: Rev 1, v1.1"
    },
    {
     "name": "languages",
     "type": "TEXT",
     "about": "from the name's tags: En,Ja"
    },
    {
     "name": "serial",
     "type": "TEXT",
     "about": "';'-joined"
    },
    {
     "name": "set_name",
     "type": "TEXT",
     "about": "arcade and software lists: the set, which is its file's name"
    },
    {
     "name": "parent",
     "type": "TEXT",
     "about": "the parent set of a clone"
    },
    {
     "name": "header_title",
     "type": "TEXT",
     "about": "what the media says about itself (media stage)"
    },
    {
     "name": "header_version",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "mastered",
     "type": "TEXT",
     "about": "the mastering or build date the media carries (media stage)"
    },
    {
     "name": "identity",
     "type": "TEXT",
     "about": "sha1 of the canonical file, or set1 over its files (https://titlescreen.org/spec/canonical-form), lowercase; NULL when the list gives no sha1 for some file"
    },
    {
     "name": "identity_kind",
     "type": "TEXT",
     "about": "file, set"
    },
    {
     "name": "size",
     "type": "INTEGER",
     "about": "bytes of the identity: the file, or the sum of the set's files"
    },
    {
     "name": "fp1",
     "type": "TEXT",
     "about": "the disc fingerprint (https://titlescreen.org/spec/fp1) of the canonical image, once a scan has read one"
    },
    {
     "name": "round_trip",
     "type": "TEXT",
     "about": "discs: verified (a scan of a CHD reproduced the list's files), mismatch (a CHD's rebuilt tracks differ: pregap); not published yet (always NULL)"
    },
    {
     "name": "disc",
     "type": "INTEGER",
     "about": "which disc of a multi-disc game this dump is (1, 2, ...), from the list's name"
    },
    {
     "name": "discs",
     "type": "INTEGER",
     "about": "how many discs that game's set has; NULL for a single-disc dump"
    }
   ]
  },
  {
   "table": "listing",
   "about": "a row of a web list, for the platforms with no dump list (PS4, Xbox One, Switch): what a release of those platforms was built from",
   "columns": [
    {
     "name": "id",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "key",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "release_id",
     "type": "TEXT",
     "about": "the first of its releases (listing_release has all)"
    },
    {
     "name": "platform_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": "the list's title"
    },
    {
     "name": "source",
     "type": "TEXT",
     "about": "wikipedia"
    }
   ]
  },
  {
   "table": "listing_release",
   "about": "every release a listing belongs to (one per market it was dated in)",
   "columns": [
    {
     "name": "listing_id",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "release_id",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "dump_release",
   "about": "every release a dump belongs to: a \"(Japan, USA)\" dump is in the JP and the US release",
   "columns": [
    {
     "name": "dump_id",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "release_id",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "dump_file",
   "about": "a dump's files, as its DAT lists them (headerless where No-Intro takes checksums headerless)",
   "columns": [
    {
     "name": "dump_id",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "name",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "size",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "crc32",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "sha1",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "md5",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "file_hash",
   "about": "every hash known for a dump's files: from the lists, from scans of real copies, from submissions. One table answers every lookup: by sha1 + size, crc32 + size, fp1, or a list's whole-file hash",
   "columns": [
    {
     "name": "dump_id",
     "type": "INTEGER",
     "about": ""
    },
    {
     "name": "seq",
     "type": "INTEGER",
     "about": "the file's place in the dump in canonical order (track number); 0 for a set or fp row"
    },
    {
     "name": "role",
     "type": "TEXT",
     "about": "file, set, fp"
    },
    {
     "name": "form",
     "type": "TEXT",
     "about": "canon1, set1, fp1, file (a list's whole-file hash where it differs from canon1), xiso, decrypted, scrubbed (states of a disc image the lists do not hash)"
    },
    {
     "name": "size",
     "type": "INTEGER",
     "about": "bytes; the sum for a set; sectors (N) for an fp row"
    },
    {
     "name": "crc32",
     "type": "TEXT",
     "about": "lowercase hex"
    },
    {
     "name": "sha1",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "md5",
     "type": "TEXT",
     "about": "of the canonical file; equals the RetroAchievements hash for cartridges"
    },
    {
     "name": "sha256",
     "type": "TEXT",
     "about": "reserved, empty in version 1"
    },
    {
     "name": "fp1",
     "type": "TEXT",
     "about": "the fingerprint, when role = fp"
    },
    {
     "name": "source",
     "type": "TEXT",
     "about": "dat (a dump list), scan (a copy read by the project's tool), community"
    },
    {
     "name": "status",
     "type": "TEXT",
     "about": "dat (a list's value), scan-only (a value no list has, read from a copy); later: unverified (one submission), verified (two or more independent ones)"
    },
    {
     "name": "confirmations",
     "type": "INTEGER",
     "about": "independent observations that agree (0 until submissions are published)"
    },
    {
     "name": "first_seen",
     "type": "TEXT",
     "about": "ISO date: the build that first carried a list's value"
    },
    {
     "name": "last_seen",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "title_alt",
   "about": "a work's titles in other scripts (kana, kanji, hangul), with the sources that give them",
   "columns": [
    {
     "name": "work_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "release_id",
     "type": "TEXT",
     "about": "set when the title is the release's own (later)"
    },
    {
     "name": "title",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "lang",
     "type": "TEXT",
     "about": "ja, zh, ko; cjk when a source gave kanji with no language"
    },
    {
     "name": "sources",
     "type": "TEXT",
     "about": "comma-separated"
    }
   ]
  },
  {
   "table": "work_join",
   "about": "why releases are one work: every join the roll-up made (a spanning tree of each work), so a wrong merge can be traced to the one join that made it",
   "columns": [
    {
     "name": "release_a",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "release_b",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "reason",
     "type": "TEXT",
     "about": "title key, code <c>, translated subtitle, wikidata <Q>, title, developer and year"
    }
   ]
  },
  {
   "table": "work_link",
   "about": "the join keys third parties want: other databases' ids for a work",
   "columns": [
    {
     "name": "work_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "kind",
     "type": "TEXT",
     "about": "wikidata, launchbox, gametdb"
    },
    {
     "name": "value",
     "type": "TEXT",
     "about": ""
    }
   ]
  },
  {
   "table": "assertion",
   "about": "the evidence: one row per fact one source states about one dump or listing",
   "columns": [
    {
     "name": "subject_kind",
     "type": "TEXT",
     "about": "dump, listing"
    },
    {
     "name": "subject_id",
     "type": "INTEGER",
     "about": "dump.id or listing.id"
    },
    {
     "name": "field",
     "type": "TEXT",
     "about": "date, publisher, developer, genre, players_max, franchise, title_ja, wikidata ..."
    },
    {
     "name": "value",
     "type": "TEXT",
     "about": "normalised: company ids (';'-joined, in the string's order), a genre id, an ISO date"
    },
    {
     "name": "value_raw",
     "type": "TEXT",
     "about": "as the source wrote it"
    },
    {
     "name": "source",
     "type": "TEXT",
     "about": "libretro, mame, mame-sl, fbneo, gametdb, wikipedia, wikidata, launchbox, catver"
    },
    {
     "name": "tier",
     "type": "INTEGER",
     "about": "0 override, 1 media, 2 dump lists and MAME, 3 press, 4 web databases"
    },
    {
     "name": "how",
     "type": "TEXT",
     "about": "the join: crc, serial, code, set, self, row, name, main"
    },
    {
     "name": "scope",
     "type": "TEXT",
     "about": "release (this copy), market:<M> (a region's date), title (the title on the platform)"
    },
    {
     "name": "locator",
     "type": "TEXT",
     "about": "where to look again: a list entry, a Wikipedia page revision and row, an item id"
    },
    {
     "name": "observed",
     "type": "TEXT",
     "about": "when the build read it"
    },
    {
     "name": "confidence",
     "type": "REAL",
     "about": "1.0 for a checksum or serial join, lower for a name join"
    }
   ]
  },
  {
   "table": "redirect",
   "about": "ids no longer in use, with the id that absorbed them when two works merged",
   "columns": [
    {
     "name": "old_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "new_id",
     "type": "TEXT",
     "about": ""
    },
    {
     "name": "reason",
     "type": "TEXT",
     "about": "merged, retired"
    }
   ]
  }
 ]
}