Recipe Difficulty: Hard
Python Version: 3.5
Operating System: Any
Earlier in this chapter, we developed a recipe to identify missing records from a database. In this recipe, we will leverage the output from that recipe and identify recoverable records and their offset within a database. This is accomplished by understanding some internals of SQLite databases and leveraging that understanding to our advantage.
With this technique, we will be able to quickly triage a database and identify recoverable messages.
When a row from a database is deleted, similar to a file, the entry is not necessarily overwritten. This entry can still persist for some time based on database activity and its allocation algorithms. Our chances for data recovery decrease...