====== Database ======
Created Tuesday 31/01/2006 23:52

[[http://www.sqlite.org/|SQLite]] fit the profile for an embedded database that uses binary files. The user does not need to know what a database is or how to configure one.

===== Tables =====
* Pages (id, basename, timestamp)
* Namespaces (id, namespace, timestamp)
* Links (source, target)
* History (page, cursor, ...)
* ...	

===== DB versus Files =====
The database contains all meta data, the files contain the actual content (although an alternative repository can be written that also puts the files in a database). Since files can edited/moved/deleted by external programs the database should check timestamps to see if re-indexing is wanted. Also an explicit "rebuild index" button should be included somewhere. This way the database will never lock away data that is not in the files (except for the history), it just makes the application simpler by having a straight forward interface to all meta data (SQL). Another advantage is that by using DBI the choice of dataase is more or less free.

Other uses for SQLite might be a "binary" format for tables (spreadsheets); again just tell the user that it is binary and that it is faster than CSV, he never needs to know that it is SQL.
