Addons are one of Mozilla Firefox’s interesting feature. One of interesting addons would be SQLite Manager which can be used for managing SQLite database.

In this article we will discuss about SQLite Manager on Mozilla Firefox. For this purpose I use:

  1. Slackware64 14.0
  2. Mozilla Firefox 20.0

However, unless you are not using Mozilla Firefox and not using SQLite, the Operating System should give no problem.

Prerequisite

  1. SQLite, latest version is recommended
  2. Mozilla Firefox

If you have not installed SQLite yet, please read related article first. You can read specific instruction on how to install SQLite for your OS (Linux, Windows, or Mac OS X).

Installation

There are two ways to install add-ons (Well, you should have know it) and both has same result.

By Firefox Menu

  1. Open Firefox
  2. Click Tools -> Add ons
  3. on bar Search add ons, type in sqlite manager
  4. Click on Install.
  5. Wait for download process and installation finished.
  6. Restart firefox

By Firefox Add-Ons site

  1. Go to https://addons.mozilla.org
  2. on search bar, type in sqlite manager and click the most matching one
  3. Click on Add to Firefox.
  4. Wait for download process and installation finished.
  5. Restart firefox

Both way you will have SQLite Manager installed. The add-on itself can be accessed as Tools -> SQLite Manager.

SQLiteMan

Now, let’s see how we can do task in previous article using SQLite Manager.

Create a New SQLite Database

To create a new database with filename xathrya.db, click on Database -> New database which give use following:

SQLiteMan1

And save the file in your preferred location, for example your home folder. Note that any database name will be appended with .sqlite

Create Table

To create a table, you can use Table -> New Table which will give following result:

SQLiteMan2

Now let’s see the result:

SQLiteMan3

Insert Record

Let’s insert 5 records there. For example we want to have records which are equivalent to this:

Unfortunately, we have to insert it one by one by click button Add. For example we will insert record with id=101.

SQLiteMan4

Verify Record

Well, when you see tab Browse & Search you can see the result immediately.

SQLiteMan5

Delete a Record

To delete a record, click on the record you want to delete then click Delete button on Browse & Search tab.

You will be asked for confirmation, click on Yes if you wish to delete the record

Update a Record

To update a record, click on the record you want to update then click Edit button on Browse & Search tab.

SQLiteMan6

Exit

Just close the window.

Reopen Database

By default, SQLite manager will try to open last database you open. If you want to open other database, click Database -> Connect Database and find the file you want to open (for this article’s example would be xathrya.db.sqlite)

Execute SQL

A fancy feature of SQLite Manager has (well, it should has, fortunately) is Execute SQL. We can execute SQL command directly. To do so, click on tab Execute SQL. There would be two areas: one is textbox for inserting command, and other to displaying the result.

For example, we want to list the record which have id greater than 102. Enter the command “select * from projects where id>102” and click Run SQL.

SQLiteMan7

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">