Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is SQLite database stored on disk?

Tags:

sqlite

Where is the SQLite database stored i.e. directory path on windows 7 when created ?

like image 792
slao Avatar asked Feb 22 '11 05:02

slao


People also ask

Where is SQLite DB stored?

The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.

Is SQLite stored locally?

It's local to the phone. If you need it accessed else where you need to use a web server and upload it to there.

Is SQLite stored in memory?

SQLite in-memory databases are databases stored entirely in memory, not on disk. Use the special data source filename :memory: to create an in-memory database. When the connection is closed, the database is deleted.

Is SQLite a disk?

An SQLite database is normally stored in a single ordinary disk file. However, in certain circumstances, the database might be stored in memory. The most common way to force an SQLite database to exist purely in memory is to open the database using the special filename ":memory:".


2 Answers

A SQLite database is a regular file. It is created in your script current directory.

like image 86
mlemos Avatar answered Oct 21 '22 08:10

mlemos


.databases

If you run this command inside SQLite

.databases 

it lists the path of all currently connected databases. Sample output:

seq  name             file                                                       ---  ---------------  ---------------------------------------------------------- 0    main             /home/me/a.db