New interesting DataBase | SQLite

Standard

I’ve been searching for a database that is compact, robust and distributable without any issues. Some of my first choices were MS Access and  MySQL but the problem is that I had to install their core application and then create connections to them from the program I’m developing. So I search a little deeper and came across SQLite. It is a small, compact yet with “almost” all the feature a full SQL database would have. All in under 400kb. But above all it is FREE. As I did my search in Google, found that many (and I mean many) companies use it in one way or an other. From Google to probably the cellphone that you might be using right now.

The database in its self has been in existence since 2000. Their latest release is 3.5.8. There are many GUI interfaces out there to manage SQLite and you can find them in their website as well.

below is what you would see when you start SQLite with test.db.

C:\sqlite>sqlite3 test.db SQLite version 3.5.8 Enter “.help” for instructions sqlite>

From here you start creating you tables and inserting data in to them.

create table test1 (id integer primary key, data text);
insert into test1 (data) values ('this is test one');

To retrieve the information in a readable manner you can include the following commands at the prompt.

.header on
.mode col

This will actually show the data in a more readable way. Now to retrieve the data you can do the following:

sqlite> select * from test1;

id          data
----------  ----------------
1           this is test one

As you can see it is a very interesting application. As I keep testing it I’ll post more information.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s