Sqlite – Does it matter what extension is used for SQLite database files


Are there advantages or disadvantages to the file extension used for SQLite databases?

It seems that SQLite itself does not require a naming convention, but there might be other reasons that a particular extension would be useful or problematic – for instance, certain tools, programming languages, installers, etc. Or end user considerations.

The most common ones appear to be .sqlite, .db, and .db3.

Best Solution

Pretty much down to personal choice. It may make sense to use an extension based on the database scheme you are storing; treat your database schema as a file format, with SQLite simply being an encoding used for that file format. So, you might use .bookmarks if it's storing bookmarks, or .index if it's being used as an index.

If you want to use a generic extension, I'd use .sqlite3 since that is most descriptive of what version of SQLite is needed to work with the database.