SQLite

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m (added cat)
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{FormatInfo
 
{{FormatInfo
|subcat=Database
+
|subcat=Databases
|extensions={{ext|db}}
+
|extensions={{ext|db}}, {{ext|sqlite}}, {{ext|db-wal}}, {{ext|sqlite-wal}}, {{ext|db-shm}}, {{ext|sqlite-shm}}
|mimetypes=
+
|mimetypes={{mimetype|application/vnd.sqlite3}}, {{mimetype|application/x-sqlite3}}
{{mimetype|application/x-sqlite3}}
+
|pronom={{PRONOM|fmt/729}}, {{PRONOM|fmt/1135}}
 
}}
 
}}
=Introduction=
+
'''SQLite''' is a self-contained, serverless, zero-configuration, transactional [[SQL]] database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private.
SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private.
+
 
=Resources=
+
==Write-Ahead Logging==
 +
Some versions of SQLite use write-ahead logging to store new changes to the database before they are written to the main database file, allowing a rollback of the current set of changes before they are committed. Database access uses both files to get the latest changed version even if part of it is still in the "WAL" file. This file is a separate file from the main database, using '''-wal''' at the end of the file extension so that it becomes '''.db-wal''' or '''.sqlite-wal'''. Also, a shared-memory file is often used for a hash-table index of the write-ahead log, with a '''.db-shm''' or '''.sqlite-shm''' extension.
 +
 
 +
==Temporary Files==
 +
 
 +
SQLite creates temporary files that, by default, begin with the prefix '''etilqs_''' and have no file extension. The backstory:
 +
 
 +
<pre>
 +
** 2006-10-31:  The default prefix used to be "sqlite_".  But then
 +
** Mcafee started using SQLite in their anti-virus product and it
 +
** started putting files with the "sqlite" name in the c:/temp folder.
 +
** This annoyed many windows users.  Those users would then do a
 +
** Google search for "sqlite", find the telephone numbers of the
 +
** developers and call to wake them up at night and complain.
 +
** For this reason, the default name prefix is changed to be "sqlite"
 +
** spelled backwards.  So the temp files are still identified, but
 +
** anybody smart enough to figure out the code is also likely smart
 +
** enough to know that calling the developer will not help get rid
 +
** of the file.
 +
</pre>
 +
 
 +
==Resources==
 
* [http://www.sqlite.org/fileformat.html SQLite.org: The SQLite Database File Format]
 
* [http://www.sqlite.org/fileformat.html SQLite.org: The SQLite Database File Format]
 +
* [http://www.sqlite.org/draft/wal.html Write-Ahead Logging]
 +
* [https://www.sqlite.org/howtocorrupt.html How To Corrupt An SQLite Database File]
 +
* [https://github.com/kripken/sql.js sql.js: Port of SQLite to JavaScript]
  
 
[[category:File formats with extension .db]]
 
[[category:File formats with extension .db]]
 
[[category:SQL]]
 
[[category:SQL]]
 +
[[Category:SQLite based file formats| ]]
 +
[[Category:File formats with too many extensions]]

Revision as of 00:49, 20 November 2021

File Format
Name SQLite
Ontology
Extension(s) .db, .sqlite, .db-wal, .sqlite-wal, .db-shm, .sqlite-shm
MIME Type(s) application/vnd.sqlite3, application/x-sqlite3
PRONOM fmt/729, fmt/1135

SQLite is a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private.

Write-Ahead Logging

Some versions of SQLite use write-ahead logging to store new changes to the database before they are written to the main database file, allowing a rollback of the current set of changes before they are committed. Database access uses both files to get the latest changed version even if part of it is still in the "WAL" file. This file is a separate file from the main database, using -wal at the end of the file extension so that it becomes .db-wal or .sqlite-wal. Also, a shared-memory file is often used for a hash-table index of the write-ahead log, with a .db-shm or .sqlite-shm extension.

Temporary Files

SQLite creates temporary files that, by default, begin with the prefix etilqs_ and have no file extension. The backstory:

** 2006-10-31:  The default prefix used to be "sqlite_".  But then
** Mcafee started using SQLite in their anti-virus product and it
** started putting files with the "sqlite" name in the c:/temp folder.
** This annoyed many windows users.  Those users would then do a 
** Google search for "sqlite", find the telephone numbers of the
** developers and call to wake them up at night and complain.
** For this reason, the default name prefix is changed to be "sqlite" 
** spelled backwards.  So the temp files are still identified, but
** anybody smart enough to figure out the code is also likely smart
** enough to know that calling the developer will not help get rid
** of the file.

Resources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox