SQLite DB Browser, How to Install and Use it on Linux

SQLite DB Browser, How to Install and Use it on Linux

In this article, we’ll show you how to install and use SQLite DB Browser to load a database file, browse the data, and run SQL queries.

SQLite is is an open source self-contained, lightweight serverless relational database management system. It is a database, which is zero-configured, which means like other databases you do not need to configure it in your system.

Related: The 5 Best Free Replacements for MySQL Server

SQLite DB Browser is an open source visual tool used to create, design, and edit database files compatible with SQLite. The software provides controls and wizards to handle an array of database functions in a comfortable visual medium. It runs on Windows, Linux, Mac, and FreeBSD.

The most common database files that SQLite DB Browser users will come across are those with the file extension .db.

DB Browser for SQLite Features

DB Browser is for users and developers who want to create, search, and edit the SQLite databases. It’s main features includes:

  • Create and compact database files.
  • Create, define, modify and delete tables and indexes.
  • Browse, edit, add, and delete records.
  • Search records.
  • Import and export tables from/to CSV files.
  • Import and export databases from/to SQL dump files.
  • Issue SQL queries and inspect the results.
  • Examine a log of all SQL commands issued by the application.
  • Plot simple graphs based on table or query data.

Install SQLite DB Browser on Linux

Ubuntu / Linux Mint

In order to install SQLite DB Browser on Ubuntu or Linux Mint, there is a PPA containing the latest release. To add this PPA to your system and install SQLite DB Browser from it, just type in these commands in terminal:

sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser
sudo apt update
sudo apt install sqlitebrowser

Debian

Run the following command to install it on Debian.

sudo apt install sqlitebrowser

Fedora

SQLite DB Browser is included by default in Fedora. To install it just type:

sudo dnf install sqlitebrowser

Arch Linux

The package can be installed into Arch Linux by using the Pacman package manager.

sudo pacman -S sqlitebrowser

openSUSE

openSUSE users can install it by typing in the following command in the terminal:

sudo zypper install sqlitebrowser

How to Use SQLite DB Browser

The initial screen of DB Browser will look something like this:

SQLite DB Browser Initial Screen

Database management can be nicely done through the four tabs on top left.

  • Database Structure: Create, list and delete database tables.
  • Browse Data: Browse values in tables, add rows, and change values.
  • Edit Pragmas: Control various environmental variables and state flags within the SQLite environment.
  • Execute SQL: Use this tab to execute SQL commands.

Initially these will be quite empty as you haven’t created or opened a database yet.

Opening a Database

Opening a database file with SQLite DB Browser is as you would expect pretty straightforward.

In order to open a database file do the following:

  1. Click on the “Open Database” button in the toolbar.
  2. Navigate to where you have stored the database file on your local machine.
  3. Select it and click “Open“.
Opening a Database

In addition to, you can also drag a file directly into the user interface and it will open the file.

If you do not already have a copy of this database, you can download the SQLite sample database from here.

Related: How to Create a Database in MySQL with MySQL Workbench

Browse the Data

 You can browse your tables and view records by right clicking on a table name and choose the “Browse Table” option.

Browse the Data

As a result the table records are displayed.

SQLite DB Browser Showing Table Data

Running SQL Queries in SQLite DB Browser

Of course, the power of a database resides in its ability to find and extract records. With an SQL compatible database, we use the SQL language to do this.

DB Browser supports writing SQL queries directly under the “Execute SQL” tab. So let’s run a query to see how it works.

Type the query and click the blue arrow to execute your SQL command. The results are displayed in the lower pane.

SQLite DB Browser Execute SQL Query

Conclusion

SQLite DB Browser is a powerful tool for interacting with SQLite databases. It was made to be used by both developers and end users.

SQLite DB Browser was not made to be a shell for SQLite nor does it require to have knowledge of SQL. It’s simply a visual tool to help users work with SQLite databases.

For more information about it you can visit the project’s website.

Leave a Reply

Your email address will not be published.

Latest from Tutorials