SQLite is a local database which is completely contained within one file on the filesystem. It is used in many projects and libraries, including iOS and Android. This guide describes how to visually inspect a SQLite database and write queries against it.
You do not need to install anything special to start using SQLite in Arctype. In the Arctype Client you can create new SQLite databases, write queries against them, and visualize data. However you may also want to install SQLite directly on your system. Below are instructions for doing so in macOS, Windows, and Linux.
Install SQLite on macOS
We recommend having the Brew Package Manager on your Mac. Then you can run.
brew install sqlite3
Install SQLite on Windows
You can use a package manager like Scoop and run a command like
scoop install sqlite3.
Install SQLite on Linux
You can use a package manager and specify
sqlite. For example you can run the following commands on different operatings systems.
Ubuntu and Debian Install
sudo apt-get install sqlite3
Fedora and RedHat Install
sudo yum install sqlite3
With SQLite installed on your machine, you can run the following from the command line.
sqlite3 my-database.db .open my-database.db
A file named
my-database.db will be created in the directory you ran the command. For example if you ran the command in the Downloads folder, you would see the .db file in
~/Downloads. NOTE If you do not run the
.open command once inside the sqlite prompt the file that contains the database will not be created on disk.
This command prompt will also be opened. You can run the sqlite command
.tables to list the tables. In this case it is a new databse so you will see no tables.
For this guide, we’ll be using Arctype, where you can simply click
Add a new data source or
Add connection and choose
SQLite to begin:
Next, enter find the directory on the filesystem where the .db file is stored. You can also create a new SQLite database in Arctype. In this case, our file is in the
Once you’re connected, you can easily interact with your SQLite data, for example by inserting a row.