Skip to content
Search
Generic filters
Exact matches only

An Easy Way to Get Started with Databases on Your Own Computer

You can check out the installation details on the DB4S website here. You can download the latest versions for both Windows and macOS. It’s also available for Linux based distributions.

DB4S download link

If you have Homebrew on macOS, you can also install the latest release with this line:

brew cask install db-browser-for-sqlite

Once you’ve gotten DB4S installed on your machine, open the application and you’re ready to begin!

When you open DB4S, on the top left you see a button labeled “New Database”. Click on it, type out a name for your database, and hit “Save” to your desired folder.

Sample SQLite database creation

That’s it! You’ve created your first SQL database. You should now see this:

Empty SQLite database

Now let’s create our first table. To do so, we’re going to import a CSV file with metadata for pieces featured on Medium’s popular page. I got the data in an earlier Python project that you can check out here.

The CSV looks like this:

CSV file of Medium popular page metadata

To create a table with this file, on DB4S, you do:

File > Import > Table from CSV file...
Importing a CSV to create a table

After that, select your desired CSV file and hit “Open”.

Importing a CSV to create a table

This will prompt another window for a couple of customization options. Change the name to something that’s easy to remember. If the column headers are already in the first line of your CSV file, tick the box to make sure DB4S recognizes that. It will shift the first row to become the column names. Then hit “Ok”.

Importing a CSV to create a table

And boom! You’ve created your first table.

Exporting the database file to CSV is just as easy. All you have to do is right-click on the table and click “Export as CSV file”.

Exporting a table to CSV

Or to bulk export more than one table, do this:

File > Export > Table(s) as CSV file...

Now let’s take a look at our table on DB4S. Right-click the table and select “Browse Table”.

Viewing a table in DB4S

You will now see the table in a classic spreadsheet-like format.

Viewing a table in DB4S

If you want to add a new row, just click “New Record”, and DB4S will create a new row (already with a primary key) for you to fill in with values, just like you would on Excel. In this case, we may want to do so every time a new piece is added to Medium’s popular page. DB4S will even suggest a row value based on the first letters you type in if the value already exists in the database.

Adding a record in DB4S

To delete a row, you just need to select a row (click on a primary key on the leftmost column) and then click “Delete Record”.

Deleting a record in DB4S

Once you’re done with all your changes, click “Write Changes” to save all your modifications and update the table in your database.

Saving changes to edited tables in DB4S