5 ms·
Journal is a temporary file created when writing into database, which you can turn off. http://www.sqlite.org/pragma.html#pragma_journal_mode http://www.sqlite
by dchest 14y ago
Journal is a temporary file created when writing into database, which you can turn off.
http://www.sqlite.org/pragma.html#pragma_journal_mode http://www.sqlite.org/pragma.html#pragma_journal_mode
WAL mode is a different beast specifically not intended to be a replacement for application format database, and it's not used by default.
So, no, SQLite is a single-file database. It provides more options than that, but the statement is true.
- rogerbinns 14y agoYou can't turn off the journal unless you are happy to lose data in which case don't bother with a database. See section 1.3 of http://www.sqlite.org/howtocorrupt.html http://www.sqlite.org/howtocorrupt.html
- dchest 14y agoThere are many more reasons to use single-file databases other than safety of file write operations. TextEdit in OS X also creates a temporary file when it saves a document, and then atomically renames it to the original filename; would you claim that RTF document consists of two files in this case?
- rogerbinns 14y agoNot even a close analogy as the text file is always valid. More accurate would be changes being done by modifying blocks of the original file as well as appends on the end so that it is not valid by itself, and storing enough information to make it valid/undo in a second file.