Friday, July 15, 2011

SQLite - An introduction

I have introduced a powerful open source web server – nginx – in my last posts. Here I want to introduce an open source database. Now you may guess that I’m going to talk about MYSQL, but definitely not. MYSQL is also an open source database, but here I’m talking about a light weight database which can even used on mobile phones.

It is SQLite. It’s an embedded relational database management system which is developed by D. Richard Hipp. It’s completely written in C language and first released on August 2000. About two weeks ago, on 28th June 2011 they released its stable version. It has a size of 275KB only.

SQLite implements most of the SQL-92 standard for SQL. A standalone program called sqlite3 is provided that can be used to create a database, define tables within it, insert and change rows, run queries and manage a SQLite database file. This program is a single executable file on the host machine.

SQLite is a popular choice for local/client SQL storage within a web browser and within a rich internet application framework; most notably the leaders in this area (Google Gears, Adobe AIR, and Firefox) embed SQLite. SQLite full Unicode support is optional.

SQLite also has bindings for a large number of programming languages, including BASIC, C, C++, Clipper, Common Lisp, C#, Curl, D, Delphi, Haskell, Java, Lua, newLisp, Objective-C (on Mac OS X and iOS), OCaml, Perl, PHP, Pike, Python, REBOL, R, REALbasic, Ruby, Scheme, Smalltalk, Tcl and Visual Basic. There is also a COM (ActiveX) wrapper making SQLite accessible on Windows to scripted languages such as JScript and VBScript. This adds database capabilities to HTML Applications.

Due to its small size, SQLite is well suited to embedded systems, and is also included in :
  • Apple's iOS (where it is used for the SMS/MMS, Calendar, Call history and Contacts storage)
  • Symbian OS
  • Nokia's Maemo
  • Google's Android
  • RIM's BlackBerry
  • Linux Foundation's MeeGo
  • Palm's webOS.

However, it is also suitable for desktop operating systems; Apple adopted it as an option in Mac OS X's Core Data API from the original implementation in Mac OS X 10.4 onwards, and also for administration of videos and songs on the iPhone.

In my next post I will show you some example programs using python to access SQLite.



No comments:

Post a Comment

Comments with advertisement links will not be published. Thank you.