Call · Vadym Rekel735 753 383

Case study • application databases

The SQLite database and WAL file in messaging app analysis: why the DB file alone may not be enough

A methodological study of the difference between an SQLite database and its state with WAL data included. Message context, copy consistency and the limits of reconstruction.

Vadym Rekel · updated · 3 min read

Starting point: the state of a database is not always contained in a single file

SQLite can operate in WAL mode, in which committed changes remain in an additional file before being transferred to the main database. The official documentation warns that separating a database from its WAL may cause the loss of committed transactions or corruption of the database state. [1, section 4]

The implication for the examination of evidence concerns the completeness and consistency of the material. A file with a DB or SQLITE extension should not automatically be equated with the complete state of the application. It is equally important to establish which accompanying files were acquired and whether they come from the same context. A similar filename prefix alone is not enough to confirm this relationship.

Educational scenario: a message visible in only one copy

The hypothetical material consists of copy A, containing the main database file, and copy B, containing the database together with a WAL file. The tool shows an additional message record in B. The client asks whether the record was added after copy A was made. This interpretation is only one possible hypothesis; the difference may result from a different scope of material provided for reading.

The proposed examination should first clarify the provenance of both copies and the dates of the actions taken. Their contents, sizes, hashes and acquisition documentation should then be compared. Only after that can the record be assessed against the application’s data model. Without these findings, the number of messages shown on two screens in the program does not establish the history of events.

What does the WAL structure reveal, and what should not be inferred?

The format documentation describes the header, frames containing modified database pages and the conditions for their validity. Reading the current state requires taking the relevant frames and transaction commits into account. For this reason, a readable piece of text found by chance in a file is not automatically equivalent to an active record visible to the application. [2, sections 4.1 and 4.5]

The author’s proposed approach to documentation distinguishes three levels: the physical presence of bytes, reconstruction of the database structure and interpretation of user behaviour. Moving between these levels should be justified. A record present in the structure does not, on its own, identify the person who used the account or establish that person’s intent.

Why is a working copy analysed?

The MOBILedit documentation notes that opening databases in external tools can affect their state, including through WAL merging. It recommends working on a copy of the acquired data to preserve a reference point for verification. [3]

The proposed analysis workflow should maintain a separation between the material received and working copies. Every operation that changes the working state should be documented. The difference between the initial state and the readout result is then part of a controlled process rather than an undocumented event that is difficult to explain later.

How should you interpret the conclusion of such an examination?

A sound conclusion identifies the source of the record, the version of the material, the method used to read it and the level of certainty. If only the state of one copy is known, claims about the application's entire history must be avoided. If a discrepancy is found, confirmed causes and hypotheses that remain open should be identified. This is not a guide to recovering every deleted message.

For matters concerning recorded times, the article on message chronology is helpful, while the discussion of verifying a MOBILedit report can help when assessing an export. The example does not describe an actual client case or the results of an examination by the office.

Sources and literature

  1. SQLite. Write-Ahead Logging, section 4: The WAL File. Official documentation, unpaginated; accessed: 18.10.2026.
  2. SQLite. Database File Format, sections 4.1 and 4.5: WAL File Format; Reader Algorithm. Official documentation, unpaginated; accessed: 18.10.2026.
  3. Compelson. Files & Acquired data folder structure, section Impact of Changes in the Acquired Data Directory. Manufacturer’s documentation, unpaginated; accessed: 18.10.2026.

The links and cited passages were checked on 18 October 2026. Page numbers refer to the publication's pagination; online documentation without pagination is identified by section name. The examples are educational scenarios, not descriptions of clients' cases.