sqlite3 with python: where is data stored before commit? sqlite3 with python: where is data stored before commit? sqlite sqlite

sqlite3 with python: where is data stored before commit?


SQLite copies unmodified pages of data in a temporary rollback journal file, and applies your changes to in memory copies of those same pages. When you make enough changes so that memory becomes a problem, changes are flushed out to the original database. The rollback journal is used to roll back incomplete transactions.

How different databases handle the rollback journal depends heavily on the database implementation. An ACID compliant database will have to store uncommitted transaction data somewhere, and a disk-backed journal is an obvious choice.

The SQLite documentation includes an exhaustive explanation on how exactly it implements transactions.