This is a brief overview of what's inside. More information on the examples is
available online at http://pysqlite.sourceforge.net/documentation.

This directory contains a simple test programs and sample data to illustrate the
use of PySQLite and it various features, both in and beyond the DB API
Specification. There are severl programs illustrating reading and writing to the
database.

-----------------------------
1. Reading from the database
-----------------------------

The data is distributed in ASCII format, so you must first build the database
with

    sqlite db < data.sql

or run createdb.sh, if you are in a UN*X environment.

Next you can run the test program, select.py, which will show you the
basics. Really this is no different than any other program using the DB API
spec. The only difference it the connect() function does not need a username or
password (although you are more than welcome to supply them if you really feel
compelled). It only needs a database name (path/name of sqlite database file),
and optionally a mode parameter, as described in sqlite_open().

There three scripts total which read from the database:

    (1) select.py: Simple, DB-API compliant script to pull records from
        database.

    (2) expected_types.py: Uses PySQLite additions to assign data types to
        columns. This gets around SQLite's inherent typlessness.

    (3) aggregates.py: Illustrates PySQLite's custom aggregate capability. This
        allows you to implement your own aggregate's within Python and have them
        execute within SQL.

    (4) functions.py: Illustrates PySQLite's custom functions. This is similar
        to aggregates, but here you can call python functions from within the
        SQL statement.

---------------------------
2. Writing to the database
---------------------------

Here you need to wipe out your existing records:

    echo "delete from calflora;" | sqlite db

or run cleardb.sh if you are within a UN*X environment.

The writing script is insert.py, which takes data from data.txt, splits up the
fields, and inserts the records into the database. data.txt contains the first
100 records of the calflora data as distributed off the website in
pipe-delimited format. The program reads that file,

Have a lot of fun.
