2000-05-29 21:44:25 +04:00
|
|
|
#
|
|
|
|
# Run this TCL script to generate HTML for the index.html file.
|
|
|
|
#
|
2000-06-09 18:14:32 +04:00
|
|
|
set rcsid {$Id: index.tcl,v 1.18 2000/06/09 14:14:34 drh Exp $}
|
2000-05-29 21:44:25 +04:00
|
|
|
|
|
|
|
puts {<html>
|
2000-06-08 23:38:36 +04:00
|
|
|
<head><title>SQLite: An SQL Database Engine Built Atop GDBM</title></head>
|
2000-05-29 21:44:25 +04:00
|
|
|
<body bgcolor=white>
|
2000-06-08 23:38:36 +04:00
|
|
|
<h1 align=center>SQLite: An SQL Database Engine Built Atop
|
2000-06-02 17:27:59 +04:00
|
|
|
<a href="http://www.gnu.org/software/gdbm/gdbm.html">GDBM</a></h1>
|
2000-05-29 21:44:25 +04:00
|
|
|
<p align=center>}
|
2000-06-02 17:27:59 +04:00
|
|
|
puts "This page was last modified on [lrange $rcsid 3 4] GMT<br>"
|
|
|
|
puts "The SQLite source code was last modifed on [exec cat last_change] GMT"
|
2000-05-29 21:44:25 +04:00
|
|
|
puts {</p>}
|
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
if 0 {
|
2000-05-29 22:50:16 +04:00
|
|
|
puts {
|
2000-06-02 17:27:59 +04:00
|
|
|
<h2>News</h2>
|
|
|
|
<p>
|
2000-06-06 22:24:42 +04:00
|
|
|
The SQLite code base is being called "beta" only because it is
|
|
|
|
relatively new. It appears to be stable and usable.
|
|
|
|
Most of the SQL language is now implemented and working.
|
|
|
|
The regression test suite
|
|
|
|
provides good coverage, according to
|
|
|
|
<a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">gcov</a>.
|
|
|
|
There are currently no known errors in the code.</p>
|
|
|
|
|
|
|
|
<p>If you find bugs or missing features, please submit a comment
|
|
|
|
to the <a href="#mailinglist">SQLite mailing list</a>.</p>
|
2000-05-29 22:50:16 +04:00
|
|
|
}
|
2000-06-08 23:38:36 +04:00
|
|
|
}
|
2000-05-29 22:50:16 +04:00
|
|
|
|
2000-05-29 21:44:25 +04:00
|
|
|
puts {<h2>Introduction</h2>
|
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
<p>SQLite is an SQL database engine built on top of the
|
2000-06-02 17:27:59 +04:00
|
|
|
<a href="http://www.gnu.org/software/gdbm/gdbm.html">GDBM library</a>.
|
2000-06-08 23:38:36 +04:00
|
|
|
SQLite includes a standalone command-line
|
|
|
|
access program (<a href="sqlite.html">sqlite</a>)
|
|
|
|
and a C library (<a href="c_interface.html">libsqlite.a</a>)
|
2000-06-02 17:27:59 +04:00
|
|
|
that can be linked
|
2000-06-08 23:38:36 +04:00
|
|
|
with a C/C++ program to provide SQL database access without
|
|
|
|
an separate RDBMS.</p>
|
|
|
|
|
|
|
|
<h2>Features</h2>
|
|
|
|
|
|
|
|
<p><ul>
|
|
|
|
<li>Implements most of SQL92.</li>
|
|
|
|
<li>A database is just a directory of GDBM files.</li>
|
|
|
|
<li>Unlimited length records.</li>
|
|
|
|
<li>Import and export data from
|
|
|
|
<a href="http://www.postgresql.org/">PostgreSQL</a>.</li>
|
|
|
|
<li>Very simple
|
|
|
|
<a href="c_interface.html">C/C++ interface</a> uses only
|
|
|
|
four functions and one opaque structure.</li>
|
|
|
|
<li>A <a href="http://dev.scriptics.com/">Tcl</a> interface is
|
|
|
|
included.</li>
|
|
|
|
<li>Command-line access program <a href="sqlite.html">sqlite</a> uses
|
|
|
|
the <a href="http://www.google.com/search?q=gnu+readline+library">GNU
|
|
|
|
Readline library</a></li>
|
|
|
|
<li>A Tcl-based test suite provides near 100% code coverage</li>
|
|
|
|
<li>7500+ lines of C code. No external dependencies other than GDBM.</li>
|
|
|
|
<li>Built and tested under Linux (RedHat 6.0). Should work under any Unix and
|
|
|
|
probably also under Windows95/98/NT/2000.</li>
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h2>Current Status</h2>
|
|
|
|
|
|
|
|
<p>A <a href="changes.html">change history</a> is available online.
|
|
|
|
There are currently no <em>known</em> bugs or memory leaks
|
|
|
|
in the library. <a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">Gcov</a>
|
|
|
|
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 <tt>malloc()</tt> fails. The code has been tested
|
|
|
|
for memory leaks and is found to be clean.</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Among the SQL features that SQLite does not currently implement are:</p>
|
2000-05-29 21:44:25 +04:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<ul>
|
2000-06-08 23:38:36 +04:00
|
|
|
<li>outer joins</li>
|
|
|
|
<li>constraints are parsed but are not enforced</li>
|
|
|
|
<li>no support for transactions or rollback</li>
|
2000-05-29 21:44:25 +04:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
<h2>Documentation</h2>
|
2000-05-29 21:44:25 +04:00
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
<p>The following documentation is currently available:</p>
|
2000-05-29 21:44:25 +04:00
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
<p><ul>
|
|
|
|
<li>Information on the <a href="sqlite.html">sqlite</a>
|
|
|
|
command-line utility.</li>
|
2000-06-09 18:14:32 +04:00
|
|
|
<li>The <a href="lang.html">SQL Language</a> subset understood by SQLite.</li>
|
2000-06-08 23:38:36 +04:00
|
|
|
<li>The <a href="c_interface.html">C/C++ Interface</a>.</li>
|
|
|
|
<li>The <a href="fileformat.html">file format</a> used by SQLite databases.</li>
|
2000-06-09 07:47:19 +04:00
|
|
|
<li>The <a href="arch.html">Architecture of the SQLite Library</a> describes
|
2000-06-09 18:14:32 +04:00
|
|
|
how the library is put together.</li>
|
2000-06-09 07:51:26 +04:00
|
|
|
<li>A description of the <a href="opcode.html">virtual machine</a> that
|
2000-06-09 18:14:32 +04:00
|
|
|
SQLite uses to access the database.</li>
|
2000-06-08 23:38:36 +04:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>The SQLite source code is 35% comment. These comments are
|
|
|
|
another important source of information. </p>
|
2000-05-29 21:44:25 +04:00
|
|
|
}
|
|
|
|
|
2000-05-29 22:50:16 +04:00
|
|
|
puts {
|
|
|
|
<a name="mailinglist" />
|
|
|
|
<h2>Mailing List</h2>
|
2000-05-29 21:44:25 +04:00
|
|
|
<p>A mailing list has been set up on eGroups for discussion of
|
|
|
|
SQLite design issues or for asking questions about SQLite.</p>
|
|
|
|
<center>
|
|
|
|
<a href="http://www.egroups.com/subscribe/sqlite">
|
|
|
|
<img src="http://www.egroups.com/img/ui/join.gif" border=0 /><br />
|
|
|
|
Click to subscribe to sqlite</a>
|
|
|
|
</center>}
|
|
|
|
|
|
|
|
puts {<h2>Download</h2>
|
|
|
|
|
2000-06-03 23:28:48 +04:00
|
|
|
<p>You can download a tarball containing all source
|
|
|
|
code for SQLite (including the TCL scripts that generate the
|
|
|
|
HTML files for this website) at <a href="sqlite.tar.gz">sqlite.tar.gz</a>.}
|
2000-05-29 21:44:25 +04:00
|
|
|
puts "This is a [file size sqlite.tar.gz] byte download. The
|
|
|
|
tarball was last modified at [clock format [file mtime sqlite.tar.gz]]"
|
2000-05-29 22:20:15 +04:00
|
|
|
puts {</p>
|
|
|
|
|
2000-06-02 17:27:59 +04:00
|
|
|
<p>To build sqlite, just unwrap the tarball, create a separate
|
|
|
|
build directory, run configure from the build directory and then
|
|
|
|
type "make". For example:</p>
|
|
|
|
|
|
|
|
<blockquote><pre>
|
2000-06-08 23:38:36 +04: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 17:27:59 +04:00
|
|
|
$ cd bld
|
|
|
|
$ ../sqlite/configure
|
2000-06-08 23:38:36 +04:00
|
|
|
$ make <i> Builds "sqlite" and "libsqlite.a" </i>
|
|
|
|
$ make test <i> Optional: run regression tests </i>
|
2000-06-02 17:27:59 +04:00
|
|
|
</pre></blockquote>
|
2000-06-03 23:28:48 +04:00
|
|
|
}
|
2000-05-29 21:44:25 +04:00
|
|
|
|
2000-06-08 23:38:36 +04:00
|
|
|
puts {<h2>Command-line Usage Example</h2>
|
|
|
|
|
|
|
|
<p>Download the source archive and compile the <b>sqlite</b>
|
|
|
|
program as described above. The type:</p>
|
|
|
|
|
|
|
|
<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 21:44:25 +04:00
|
|
|
puts {<h2>Related Sites</h2>
|
|
|
|
|
|
|
|
<ul>
|
2000-05-29 22:20:15 +04:00
|
|
|
<li><p>The canonical site for GDBM is
|
2000-05-29 21:44:25 +04:00
|
|
|
<a href="http://www.gnu.org/software/gdbm/gdbm.html">
|
|
|
|
http://www.gnu.org/software/gdbm/gdbm.html</a></p></li>
|
|
|
|
|
|
|
|
<li><p>Someday, we would like to port SQLite to work with
|
|
|
|
the Berkeley DB library in addition to GDBM. For information
|
|
|
|
about the Berkeley DB library, see
|
2000-06-01 04:04:41 +04:00
|
|
|
<a href="http://www.sleepycat.com/">http://www.sleepycat.com/</a>
|
2000-05-29 21:44:25 +04:00
|
|
|
</p></li>
|
2000-06-01 00:00:52 +04:00
|
|
|
|
2000-06-02 17:27:59 +04:00
|
|
|
<li><p>Here is a good <a href="http://w3.one.net/~jhoffman/sqltut.htm">
|
2000-06-01 00:00:52 +04:00
|
|
|
tutorial on SQL</a>.</p></li>
|
2000-06-02 17:27:59 +04: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 19:51:18 +04: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>
|
|
|
|
|
|
|
|
<li><p><a href="http://www.vogel-nest.de/tcl/qgdbm.html">Qgdbm</a> is
|
|
|
|
a wrapper around
|
|
|
|
<a href="http://www.vogel-nest.de/tcl/tclgdbm.html">tclgdbm</a>
|
|
|
|
that provides SQL-like access to GDBM files.</p></li>
|
2000-05-29 21:44:25 +04: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>}
|