# # Run this TCL script to generate HTML for the index.html file. # set rcsid {$Id: index.tcl,v 1.41 2001/09/25 01:51:00 drh Exp $} puts { SQLite: An SQL Database Engine In A C Library

SQLite: An SQL Database Engine In A C Library

} puts "This page was last modified on [lrange $rcsid 3 4] GMT
" set vers [lindex $argv 0] puts "The latest SQLite version is $vers" puts " created on [exec cat last_change] GMT" puts {

} puts {

Introduction

SQLite is a C library that implements an SQL database engine. Programs that link with 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.

SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk.

Features

} puts {

Download

} puts {
Download SQLite
} puts "version $vers
" puts {Now!
} puts {

You can download a tarball containing all source code for SQLite } puts "version $vers" puts { (including the TCL scripts that generate the HTML files for this website) at sqlite.tar.gz.} puts "This is a [file size sqlite.tar.gz] byte download." set historical [lsort -dict [glob -nocomplain sqlite-*.tar.gz]] if {$historical!=""} { puts {The following historical versions of SQLite are also available:} foreach x $historical { puts "$x ([file size $x] bytes)" } } puts {

} puts {

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.

Known bugs:

Documentation

The following documentation is currently available:

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

} puts {

Click to subscribe to sqlite

Mailing List

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

} puts {

Building From Source

} puts {

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 

The Win2K version of SQLite was built using the MingW32 cross-compiler running under Linux. You have to give the configure script hints to make this work. Read the comments at the beginning of the file configure.in for additional information. The source code is general enough that it should be possible to compile SQLite using VC++, though the author has no desire or motivation to try.

} puts {

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$
} puts {

Related Sites

} puts {


More Open Source Software from Hwaci.

}