SQLite: An SQL Database Library Built Atop GDBM

This page was last modified on 2001/05/21 13:45:10 GMT
The latest SQLite version is created on 2001/07/23,14:33:04 GMT

Introduction

SQLite is an SQL database library (libsqlite.a) that uses GDBM as its underlying file storage mechanism. Programs that link the SQLite library can have SQL database access without running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library.

Features

Current Status

A change history is available online. There are currently no known memory leaks or debilitating bugs in the library. Gcov is used to verify test coverage. The test suite currently exercises all code except for a few areas which are unreachable or which are only reached when malloc() fails.

Known bugs:

Important Note: Serious bugs have been found in versions 1.0.22 on Unix and 1.0.26 on Windows. Users of these or earlier versions of SQLite should upgrade.

Documentation

The following documentation is currently available:

The SQLite source code is 35% comment. These comments are another important source of information.

Mailing List

A mailing list has been set up on eGroups for discussion of SQLite design issues or for asking questions about SQLite.


Click to subscribe to sqlite

This installation of Sqlite was made by the FreeBSD Port.

To build sqlite under Unix, just unwrap the tarball, create a separate build directory, run configure from the build directory and then type "make". For example:

$ tar xzf sqlite.tar.gz       Unpacks into directory named "sqlite" 
$ mkdir bld                   Create a separate build directory 
$ cd bld
$ ../sqlite/configure
$ make                        Builds "sqlite" and "libsqlite.a" 
$ make test                   Optional: run regression tests 

Instructions for building SQLite for WindowsNT are found here.

Command-line Usage Example

Download the source archive and compile the sqlite program as described above. Then type:

bash$ sqlite ~/newdb              Directory ~/newdb created automatically
sqlite> create table t1(
   ...>    a int,
   ...>    b varchar(20)
   ...>    c text
   ...> );                        End each SQL statement with a ';'
sqlite> insert into t1
   ...> values(1,'hi','y''all');
sqlite> select * from t1;
1|hello|world
sqlite> .mode columns             Special commands begin with '.'
sqlite> .header on                Type ".help" for a list of commands
sqlite> select * from t1;
a      b       c
------ ------- -------
1      hi      y'all
sqlite> .exit
base$

Related Sites


More Open Source Software from Hwaci.