The only surest and seamless way to handle SQLite databases on computers is by means of DB Browser for SQLite. Db Browser For SQLite is an open-source tool which is completely free to use.
Db Browser for SQLite creates databases which are compatible with SQLite. The “.db” database extension created by this software is completely compatible with SQLite. You should never change the .db extension, use it as it is for all your SQLite database manipulations.
This tutorial illustrates everything you need to know about Db Browser For SQLite. I will show you how to create databases, how to create tables, how to delete records (rows) in a table and everything else you need to know in order to get going.
You might have heard of browser extensions which claim to manage SQLite databases, but trust me, none of those can beat the DB Browser for SQLite.
I have personally worked with Db Browser for SQLite on a JavaFX mega project. The overall performance of this software is commendable. Being a free software Db Browser for SQLite deserve praises.
Advantages of Using Db Browser For SQLite
There so many advantages of using Db Browser for SQLite, I will, however, provide a list of the main advantages.
- Db Browser For SQLite is Completely Free
- It’s a very Light Weight Software, ready to be handled by all types of machines
- It can be used, by both Developers and End Users. You don’t need to be a developer to use Db Browser for SQLite, everything concerning SQLite Management is done fully by this software.
- Everything is Done on a Graphical User Interface. No SQL code required in tables or records manipulations.
- Imports/Exports your databases and tables from/to CSV file
- Import and export databases from/to SQL dump files
- Import and export records as text
It’s almost impossible to finish all its advantages.
How to Create and Connect Database on Db Browser For SQLite
Creating a new database on the Db Browser for SQLite involves nothing more complex than just clicking File > New Database. Provide a relevant name for your database and boom, you are done.
To connect to an SQLite database, just click File > Open Database. Connecting to a database with SQLite Database for SQLite is the same as opening an existing database.
How to Create and Browser Tables on SQLite Database For SQLite
As soon as you finish creating a new database, a popup window will show, prompting you to create a new table, you can, however, create a new table by clicking Create Table from the left corner on the Software as shown in the screenshot below
A new Popup window will show, prompting you to fill fields (columns) to your table. To create a new field on your table, just click Add Field as shown in the screenshot below.
You can add as many fields as you wish. When you add a new field, please select relevant datatype for your field. For example, field firstName should be a text. SQLite supports at least 5 types of data types:
Click Ok to save your table.
The list of tables on your database can be viewed on the Database Structure section of Db Browser for SQLite as shown on the image below. To view fields on your table you can expand the table on the same section.
Rember to write changes every time you are done manipulating your database. To save or write changes, click on File > Writer Changes from the menu bar. Db SQLite does not save changes automatically.
From the screenshot above, we have two tables in our database, i.e. Admin and users. You can browse your tables and view records (rows) by click Browse Data. You’ll need to select the table you want to view its records.
You can select the table you want to view its records. On the other hand, you can add and delete records from a table. To add a new record (row) to your table, kindly click on Add Record button. To delete a certain record, kindly select the row you want to delete and click Delete Record button.
Every time you make changes to a table such as adding or deleting records or even modifying, you must click on File > Write Changes. Db Browser for SQLite does not save these data automatically, you will have to save them manually. This is important because it improves the software’s performance.
How to Modify or Drop a Table on DB Browser for SQLite
Sometimes you may make a mistake while naming your table or while adding fields to a table. Fortunately, Db Browser for SQLite provides an easier way to modify or drop your tables. Modifying your table lets you rename your table as well as renaming or adding new fields to already existing table.
To Modify or drop your table, right-click on your table on the database structure page, then select Modify Table or Delete Table as shown in the image below.
After everything is done, Write Changes to database from the File > Write Changes.