-1

I would like to know what the .sqlite file is for. When I use MySql or MongoDB, the database is on disk, its something I never see. The documentation tells me with SQLite, everything is contained in a single disk file. Does this mean this .sqlite file is the database itself (and that it is, like all my other regular files, stored on disk)?

3

The .sqlite file is the complete database. It's one of the big features of sqlite in that it's single-file with binary compatibility between platforms.

From the About SQLite page (emphasis added):

SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file.

For a description of the file format, see Database file format on the sqlite website.

1

Does this mean this .sqlite file is the database itself (and that it is, like all my other regular files, stored on disk)?

Exactly this.

One use case for this design is when you actually want "data files" that can be stored in arbitrary locations and whose content happens to be accessible to your code like an SQL database.

Not the answer you're looking for? Browse other questions tagged or ask your own question.