Does sqlite memory mode maintain local persistence?

I did not know what is the meaning of a memory database, the dose of sqlite is a memory database? in this mode, does the save data support the local file?

+4
source share
2 answers

The in-memory database supports all operations and database access syntax, but is not actually saved; these are just data structures in memory. This makes it fast and great for developer experiments and (relatively small amounts) of temporary data, but it doesn’t go anywhere where you want the data to be saved (they save data that really cost, but reason number 1 for using the database) or where the total data set is larger than you can conveniently fit into your existing physical memory.

SQLite databases are created in conjunction with a specific file or pseudo file :memory: which is used when you want to retrieve a database in memory. You cannot change the location of the database during its opening, and the database in memory will be deleted when you close its connection; the only way to save this is to use queries to pull data from it and write it to another location (for example, a database on disk or some kind of dump file).

+8
source

SQLite only supports databases for storing data - this is one option. This is useful when persistence is not important, but the ability to quickly execute SQL queries regarding relational data.

Detailed description of in-memory databases: https://www.sqlite.org/inmemorydb.html

0
source

All Articles