poka.sh

Docs

DB

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

Database File (SQLite / Berkeley DB / OLE).

At a glance

Purpose An extension shared by unrelated database and cache files; Poka tells them apart by their content.
Extensions .db
Poka parser poka-db
Viewer poka-metadata-card-viewer
Depth tier Metadata card (see Depth tiers)
Breadth tier B5 Identification (see Breadth tiers)

How much Poka reads

B5 Identification. The format is recognised and a few properties are shown (name, size, version string). Nothing of the content is decoded.

Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-db/src/lib.rs (magic-number identification of SQLite 3, Berkeley DB, OLE compound file and Tekla gzip store), unit tests and tests/samples.rs over 6 corpus .db files (SQLite, Berkeley DB btree, Tekla); there is no OLE Thumbs.db sample, so that path is unit-tested only. Routing: poka-interfaces/web/src/content-signatures.json does not sniff .db, so a SQLite .db gets this header card and never reaches poka-sqlite. All four families are recognised with a few header facts; no content is decoded.

What Poka does not read

  • SQLite .db files show page size, page count, encoding and a page-1 object count only: no table names, columns or rows (poka-sqlite is not used for .db)
  • Berkeley DB shows access method, version, page size and byte order only; no keys or records
  • OLE compound files (Thumbs.db) list only the root directory names in the first directory sector (at most 4 at 512-byte sectors), with no thumbnails or file names
  • Tekla Structures stores are recognised by an observed marker and not decoded
  • Other .db families (for example Access, dBase or application caches) show as unrecognised leading bytes
  • SQLite schema object count is read from page 1 only

Background

In the sample archive this parser was built against, .db is the most-claimed extension, with 13,726 files, and they are not one format. Poka identifies four families by their signatures: SQLite 3 databases, Berkeley DB files (whose magic number also gives the access method), OLE compound files, and the gzip-compressed stores of a Tekla Structures model. The OLE case is usually Thumbs.db, the thumbnail cache Windows Explorer kept in each folder until Windows Vista moved the cache to a central location. It is worth flagging: it is created silently, gets copied into archives by accident, and keeps the names of files that were in the folder. Berkeley DB was written by Margo Seltzer and Keith Bostic of Sleepycat Software and is now Oracle's. The Tekla signature is an observed one: no documentation of that binary exists, so a gzip stream without the marker is reported as gzip rather than guessed at.

Versions

Version Identifier Poka Note
SQLite 3 SQLite format 3\0 at offset 0 Partly read Header facts on a metadata card (page size, page count, encoding and a page-1 object count). poka-sqlite's schema walk is not used: a .db file is never routed to it.
Berkeley DB magic at offset 12: 0x053162 btree, 0x061561 hash, 0x042253 queue Partly read Family, access method and page facts.
OLE compound file (Thumbs.db) D0 CF 11 E0 A1 B1 1A E1 Partly read Only the root directory names in the first directory sector are listed (at most four at 512-byte sectors); no thumbnails. The corpus has no Thumbs.db sample, so this path is unit-tested only.
Tekla Structures model store gzip; BC C0 CE DB at offset 20 once inflated Partly read Recognised and sized; the vendor binary is undocumented and not decoded.

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

Software that uses it

  • Trimble Tekla Structures

Sources