2000-05-29 17:44:25 +00:00
|
|
|
#
|
|
|
|
# Run this TCL script to generate HTML for the index.html file.
|
|
|
|
#
|
2001-09-25 01:50:59 +00:00
|
|
|
set rcsid {$Id: index.tcl,v 1.41 2001/09/25 01:51:00 drh Exp $}
|
2000-05-29 17:44:25 +00:00
|
|
|
|
|
|
|
puts {<html>
|
2001-09-20 01:44:42 +00:00
|
|
|
<head><title>SQLite: An SQL Database Engine In A C Library</title></head>
|
2000-05-29 17:44:25 +00:00
|
|
|
<body bgcolor=white>
|
2001-09-20 01:44:42 +00:00
|
|
|
<h1 align=center>SQLite: An SQL Database Engine In A C Library</h1>
|
2000-05-29 17:44:25 +00:00
|
|
|
<p align=center>}
|
2000-06-02 13:27:59 +00:00
|
|
|
puts "This page was last modified on [lrange $rcsid 3 4] GMT<br>"
|
2000-08-17 10:22:34 +00:00
|
|
|
set vers [lindex $argv 0]
|
|
|
|
puts "The latest SQLite version is <b>$vers</b>"
|
|
|
|
puts " created on [exec cat last_change] GMT"
|
2000-05-29 17:44:25 +00:00
|
|
|
puts {</p>}
|
|
|
|
|
|
|
|
puts {<h2>Introduction</h2>
|
|
|
|
|
2001-09-16 00:13:26 +00:00
|
|
|
<p>SQLite is a C library that implements an SQL database engine.
|
|
|
|
Programs that link with the SQLite library can have SQL database
|
2000-08-18 09:58:51 +00:00
|
|
|
access without running a separate RDBMS process.
|
|
|
|
The distribution comes with a standalone command-line
|
|
|
|
access program (<a href="sqlite.html">sqlite</a>) that can
|
|
|
|
be used to administer an SQLite database and which serves as
|
|
|
|
an example of how to use the SQLite library.</p>
|
2000-06-08 19:38:36 +00:00
|
|
|
|
2001-09-20 01:44:42 +00:00
|
|
|
<p>SQLite is <b>not</b> a client library used to connect to a
|
|
|
|
big database server. SQLite <b>is</b> the server. The SQLite
|
|
|
|
library reads and writes directly to and from the database files
|
|
|
|
on disk.</p>
|
2000-08-02 12:26:28 +00:00
|
|
|
|
2000-06-08 19:38:36 +00:00
|
|
|
<h2>Features</h2>
|
|
|
|
|
|
|
|
<p><ul>
|
2001-09-16 00:13:26 +00:00
|
|
|
<li>Implements a large subset of SQL92.</li>
|
|
|
|
<li>A complete SQL database (with multiple tables and indices) is
|
|
|
|
stored in a single disk file.</li>
|
|
|
|
<li>Atomic commit and rollback protect data integrity.</li>
|
|
|
|
<li>Small memory footprint: about 12000 lines of C code.</li>
|
2001-09-25 01:50:59 +00:00
|
|
|
<li><a href="speed.html">Four times faster</a> than PostgreSQL.
|
|
|
|
Twice as fast as SQLite 1.0.</li>
|
2000-06-08 19:38:36 +00:00
|
|
|
<li>Very simple
|
2000-07-28 14:32:48 +00:00
|
|
|
<a href="c_interface.html">C/C++ interface</a> requires the use of only
|
|
|
|
three functions and one opaque structure.</li>
|
2001-09-16 00:13:26 +00:00
|
|
|
<li>A TCL interface to the library is included.</li>
|
|
|
|
<li>A TCL-based test suite provides near 100% code coverage.</li>
|
|
|
|
<li>Self-contained: no external dependencies.</li>
|
2001-09-20 01:44:42 +00:00
|
|
|
<li>Built and tested under Linux and Win2K.</li>
|
2001-09-20 12:32:53 +00:00
|
|
|
<li>Sources are uncopyrighted. Use for any purpose.</li>
|
2000-06-08 19:38:36 +00:00
|
|
|
</ul>
|
|
|
|
</p>
|
2001-09-20 01:44:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
puts {<h2>Download</h2>}
|
2000-06-08 19:38:36 +00:00
|
|
|
|
2001-09-20 01:44:42 +00:00
|
|
|
puts {<table align="right"hspace="10">
|
|
|
|
<tr><td align="center" bgcolor="#8ee5ee">
|
|
|
|
<table border="2"><tr><td align="center">
|
|
|
|
<a href="sqlite.tar.gz"><big><b>Download SQLite<br>}
|
|
|
|
puts "version $vers<br>"
|
|
|
|
puts {Now!
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr>
|
|
|
|
</table>}
|
|
|
|
|
|
|
|
|
|
|
|
puts {<p>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 <a href="sqlite.tar.gz">sqlite.tar.gz</a>.}
|
|
|
|
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 "<a href=\"$x\">$x</a> ([file size $x] bytes)"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
puts {</p>}
|
|
|
|
|
|
|
|
puts {<h2>Current Status</h2>
|
2000-06-08 19:38:36 +00:00
|
|
|
|
|
|
|
<p>A <a href="changes.html">change history</a> is available online.
|
2001-04-05 16:49:44 +00:00
|
|
|
There are currently no <em>known</em> memory leaks or debilitating bugs
|
2000-06-08 19:38:36 +00:00
|
|
|
in the library. <a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">Gcov</a>
|
2001-09-20 01:44:42 +00:00
|
|
|
is used to verify test coverage.</p>
|
2001-04-05 16:49:44 +00:00
|
|
|
|
|
|
|
<p>Known bugs:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><p>
|
|
|
|
The LIKE operator is suppose to ignore case.
|
|
|
|
But it only ignores case for 7-bit Latin characters.
|
|
|
|
The case of 8-bit iso8859 characters or UTF-8 characters is
|
|
|
|
signification. Hence, <b>'a' LIKE 'A'</b> returns
|
2001-05-21 13:45:10 +00:00
|
|
|
TRUE but <b>'æ' LIKE 'Æ'</b> returns FALSE.
|
2001-04-05 16:49:44 +00:00
|
|
|
</p></li>
|
|
|
|
</ul>
|
2000-06-08 19:38:36 +00:00
|
|
|
|
|
|
|
<h2>Documentation</h2>
|
2000-05-29 17:44:25 +00:00
|
|
|
|
2000-06-08 19:38:36 +00:00
|
|
|
<p>The following documentation is currently available:</p>
|
2000-05-29 17:44:25 +00:00
|
|
|
|
2000-06-08 19:38:36 +00:00
|
|
|
<p><ul>
|
|
|
|
<li>Information on the <a href="sqlite.html">sqlite</a>
|
|
|
|
command-line utility.</li>
|
2000-06-09 14:14:32 +00:00
|
|
|
<li>The <a href="lang.html">SQL Language</a> subset understood by SQLite.</li>
|
2000-06-08 19:38:36 +00:00
|
|
|
<li>The <a href="c_interface.html">C/C++ Interface</a>.</li>
|
2000-09-30 22:46:05 +00:00
|
|
|
<li>The <a href="tclsqlite.html">Tcl Interface</a>.</li>
|
2000-06-09 03:47:19 +00:00
|
|
|
<li>The <a href="arch.html">Architecture of the SQLite Library</a> describes
|
2000-06-09 14:14:32 +00:00
|
|
|
how the library is put together.</li>
|
2000-06-09 03:51:26 +00:00
|
|
|
<li>A description of the <a href="opcode.html">virtual machine</a> that
|
2000-06-09 14:14:32 +00:00
|
|
|
SQLite uses to access the database.</li>
|
2000-06-08 19:38:36 +00:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>The SQLite source code is 35% comment. These comments are
|
|
|
|
another important source of information. </p>
|
2000-05-29 17:44:25 +00:00
|
|
|
}
|
|
|
|
|
2000-05-29 18:50:16 +00:00
|
|
|
puts {
|
2001-09-20 01:44:42 +00:00
|
|
|
<table align="right">
|
|
|
|
<tr><td align="center">
|
|
|
|
<a href="http://www.yahoogroups.com/subscribe/sqlite">
|
|
|
|
<img src="http://www.egroups.com/img/ui/join.gif" border=0 /><br />
|
|
|
|
Click to subscribe to sqlite</a>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
2000-05-29 18:50:16 +00:00
|
|
|
<a name="mailinglist" />
|
|
|
|
<h2>Mailing List</h2>
|
2001-09-20 01:44:42 +00:00
|
|
|
<p>A mailing list has been set up on yahooGroups for discussion of
|
2000-05-29 17:44:25 +00:00
|
|
|
SQLite design issues or for asking questions about SQLite.</p>
|
2001-09-20 01:44:42 +00:00
|
|
|
}
|
2000-05-29 17:44:25 +00:00
|
|
|
|
2001-09-20 01:44:42 +00:00
|
|
|
puts {<h2>Building From Source</h2>}
|
2000-05-29 17:44:25 +00:00
|
|
|
|
2000-08-17 10:22:34 +00:00
|
|
|
puts {
|
2000-08-04 13:49:02 +00:00
|
|
|
<p>To build sqlite under Unix, just unwrap the tarball, create a separate
|
2000-06-02 13:27:59 +00:00
|
|
|
build directory, run configure from the build directory and then
|
|
|
|
type "make". For example:</p>
|
|
|
|
|
|
|
|
<blockquote><pre>
|
2000-06-08 19:38:36 +00:00
|
|
|
$ tar xzf sqlite.tar.gz <i> Unpacks into directory named "sqlite" </i>
|
|
|
|
$ mkdir bld <i> Create a separate build directory </i>
|
2000-06-02 13:27:59 +00:00
|
|
|
$ cd bld
|
|
|
|
$ ../sqlite/configure
|
2000-06-08 19:38:36 +00:00
|
|
|
$ make <i> Builds "sqlite" and "libsqlite.a" </i>
|
|
|
|
$ make test <i> Optional: run regression tests </i>
|
2000-06-02 13:27:59 +00:00
|
|
|
</pre></blockquote>
|
2000-08-04 13:49:02 +00:00
|
|
|
|
2001-09-20 01:44:42 +00:00
|
|
|
<p>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
|
|
|
|
<b>configure.in</b> 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.
|
|
|
|
</p>
|
2000-06-03 19:28:48 +00:00
|
|
|
}
|
2000-05-29 17:44:25 +00:00
|
|
|
|
2000-06-08 19:38:36 +00:00
|
|
|
puts {<h2>Command-line Usage Example</h2>
|
|
|
|
|
|
|
|
<p>Download the source archive and compile the <b>sqlite</b>
|
2001-05-21 13:45:10 +00:00
|
|
|
program as described above. Then type:</p>
|
2000-06-08 19:38:36 +00:00
|
|
|
|
|
|
|
<blockquote><pre>
|
|
|
|
bash$ sqlite ~/newdb <i>Directory ~/newdb created automatically</i>
|
|
|
|
sqlite> create table t1(
|
|
|
|
...> a int,
|
|
|
|
...> b varchar(20)
|
|
|
|
...> c text
|
|
|
|
...> ); <i>End each SQL statement with a ';'</i>
|
|
|
|
sqlite> insert into t1
|
|
|
|
...> values(1,'hi','y''all');
|
|
|
|
sqlite> select * from t1;
|
|
|
|
1|hello|world
|
|
|
|
sqlite> .mode columns <i>Special commands begin with '.'</i>
|
|
|
|
sqlite> .header on <i>Type ".help" for a list of commands</i>
|
|
|
|
sqlite> select * from t1;
|
|
|
|
a b c
|
|
|
|
------ ------- -------
|
|
|
|
1 hi y'all
|
|
|
|
sqlite> .exit
|
|
|
|
base$
|
|
|
|
</pre></blockquote>
|
|
|
|
}
|
2000-05-29 17:44:25 +00:00
|
|
|
puts {<h2>Related Sites</h2>
|
|
|
|
|
|
|
|
<ul>
|
2000-05-31 20:00:52 +00:00
|
|
|
|
2000-06-02 13:27:59 +00:00
|
|
|
<li><p>Here is a good <a href="http://w3.one.net/~jhoffman/sqltut.htm">
|
2000-05-31 20:00:52 +00:00
|
|
|
tutorial on SQL</a>.</p></li>
|
2000-06-02 13:27:59 +00:00
|
|
|
|
|
|
|
<li><p><a href="http://www.postgresql.org/">PostgreSQL</a> is a
|
|
|
|
full-blown SQL RDBMS that is also open source.</p></li>
|
2000-06-02 15:51:18 +00:00
|
|
|
|
|
|
|
<li><p><a href="http://www.chordate.com/gadfly.html">Gadfly</a> is another
|
|
|
|
SQL library, similar to SQLite, except that Gadfly is written
|
|
|
|
in Python.</p></li>
|
2000-05-29 17:44:25 +00:00
|
|
|
</ul>}
|
|
|
|
|
|
|
|
puts {
|
|
|
|
<p><hr /></p>
|
|
|
|
<p>
|
|
|
|
<a href="../index.html"><img src="/goback.jpg" border=0 />
|
|
|
|
More Open Source Software</a> from Hwaci.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</body></html>}
|