From: drh Date: Mon, 17 Jan 2005 03:42:52 +0000 (+0000) Subject: Add incomplete, preliminary drafts of new documentation. (CVS 2225) X-Git-Tag: version-3.6.10~3927 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f10519b45a4982473bbd5aff450ed626ff9a8d91;p=thirdparty%2Fsqlite.git Add incomplete, preliminary drafts of new documentation. (CVS 2225) FossilOrigin-Name: a01159e8cb93199763d191b739da2a43ec88aab3 --- diff --git a/manifest b/manifest index 870999e9fd..6b101aea87 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\smemory\sleak\sthat\soccurs\sas\sa\sresult\sof\san\sIO\serror.\s(CVS\s2224) -D 2005-01-17T03:40:08 +C Add\sincomplete,\spreliminary\sdrafts\sof\snew\sdocumentation.\s(CVS\s2225) +D 2005-01-17T03:42:52 F Makefile.in 78d6d0af3725aef32468ac9923444d7645d21a28 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 @@ -244,6 +244,7 @@ F www/copyright-release.pdf cfca3558fc97095e57c6117d08f1f5b80d95125a F www/copyright.tcl 82c9670c7ddb0311912ab7fe24703f33c531066c F www/datatype3.tcl 1d14f70ab73075556b95e76a5c13e5b03f7f6c47 F www/datatypes.tcl 7c786d2e8ff434346764534ec015966d17efce60 +F www/different.tcl 1cdf371794ec04a993be3b3e2c65e1897b789a86 F www/docs.tcl 09e5eccffad783fe65fac87772f5265e9bb64abe F www/download.tcl 4d8ff8c882063b864d004c524e4e7456858f09a5 F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c @@ -258,6 +259,7 @@ F www/nulls.tcl ec35193f92485b87b90a994a01d0171b58823fcf F www/oldnews.tcl 7aa4478e64631859770a5fe4b413919ba6ee8a08 F www/omitted.tcl 7bd62b6f0f53b60c5360895b16b3af8407bbca03 F www/opcode.tcl dafa030a5a3cc24a2f9fd4cfbfb7d7323d2151b0 +F www/optimizing.tcl f0b2538988d1bbad16cbfe63ec6e8f48c9eb04e5 F www/pragma.tcl f2f507d50755fea3636fbb956048aac4b14ee837 F www/quickstart.tcl 6f6f694b6139be2d967b1492eb9a6bdf7058aa60 F www/speed.tcl de99c82c4729a10b6733463636f15473c4ec95bc @@ -267,7 +269,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl c3b50d3ac31c54be2a1af9b488a89d22f1e6e746 -P 2d58c0afa769d49c8819ea4982bc20ae39516f97 -R 5225b78fe98ecaba4ad353b32e187f8c -U danielk1977 -Z fe4ca27f9035b326974cf8c4ecac5357 +P 1edfdcbf142b380172a26d094e6e4a3900db8463 +R 96d57a6b3f846e4dbcc0ea017de3a1a3 +U drh +Z d0fe1f7a9cab327ab894a50df6330b34 diff --git a/manifest.uuid b/manifest.uuid index 2825989231..4815a3d38a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1edfdcbf142b380172a26d094e6e4a3900db8463 \ No newline at end of file +a01159e8cb93199763d191b739da2a43ec88aab3 \ No newline at end of file diff --git a/www/different.tcl b/www/different.tcl new file mode 100644 index 0000000000..371089ee01 --- /dev/null +++ b/www/different.tcl @@ -0,0 +1,125 @@ +set rcsid {$Id: different.tcl,v 1.1 2005/01/17 03:42:52 drh Exp $} +source common.tcl +header {Distinctive Features Of SQLite} +puts { +

+This page highlights some of the characteristics of SQLite that are +unusual and which make SQLite different from many other SQL +database engines. +

+} +proc feature {tag name text} { + puts "" + puts "

$name

\n" + puts "
$text
\n" +} + +feature zeroconfig {Zero-Configuration} { + SQLite does not need to be "installed" before it is used. + There is no "setup" procedure. There is no + server process that needs to be started, stopped, or configured. + There is + no need for an administrator to create a new database instance or assign + access permissions to users. + SQLite uses no configuration files. + Nothing needs to be done to tell the system that SQLite is running. + No actions are required to recover after a system crash or power failure. + There is nothing to troubleshoot. +

+ SQLite just works. +

+ An SQLite database is an ordinary disk file. If SQLite can read + the disk file then it can read anything in the database. If the disk + file and its directory are writable, then SQLite can change anything + in the database. + +} + +feature serverless {Serverless} { + Most SQL database engines are implemented as a separate server + process. Programs that want to access the database communicate + with the server using some kind of interprocess communcation + (typically TCP/IP) to send requests to the server and to receive + back results. SQLite does not work this way. With SQLite, the + process that wants to access the database reads and writes + directly from the database files on disk. There is no intermediary + server process. +

+ There are advantages and disadvantages to being serverless. The + main advantage is that there is no separate server process + to install, setup, configure, initialize, manage, and troubleshoot. + This is one reason why SQLite is a "zero-configuration" database + engine. Programs that use SQLite require no administrative support + for setting up the database engine before they are run. Any program + that is able to access the disk is able to use an SQLite database. +

+ On the other hand, a database engine that uses a server can provide + better protection from bugs in the client application - stray pointers + in a client cannot corrupt memory on the server. And because a server + is a single persistent process, it is able control database access with + more precision, allowing for finer grain locking and better concurrancy. +

+ Most SQL database engines are client/server based. Of those that are + serverless, SQLite is the only one that this author knows of that + allows multiple applications to access the same database at the same time. +} + +feature small {Compact} { + When optimized for size, the whole SQLite library with everything enabled + is less than 220KiB in size (as measured on an ix86 using the "size" + utility from the GNU compiler suite.) Unneeded features can be disabled + at compile-time to further reduce the size of the library to under + 180KiB if desired. +

+ Most other SQL database engines are much larger than this. IBM boasts + that it's recently released CloudScape database engine is "only" a 2MiB + jar file - 10 times larger than SQLite even after it is compressed! + Firefox boasts that it's client-side library is only 350KiB. That's + 50% larger than SQLite and does not even contain the database engine. + The Berkeley DB library from Sleepycat is 450KiB and it lacks a schema + layer. +} + +feature typing {Manifest typing} { + +} + +feature readable {Readable source code} { +} + +feature vdbe {SQL statements compile into virtual machine code} { +} + +feature binding {Tight bindings to dynamic languages} { +} + +feature license {Public domain} { + The source code for SQLite is in the public domain. No claim of copyright + is made on any part of the core source code. (The documentation and test + code is a different matter - some sections of documentation and test logic + are governed by open-sources licenses.) All contributors to the + SQLite core software have signed releases specifically disavowing any + copyright interest in the code. This means that anybody is able to legally + do anything they want with the SQLite source code. +

+ There are other SQL database engines with liberal licenses that allow + the code to be broadly and freely used. But those other engines are + still governed by copyright law. SQLite is different in that copyright + law simply does not apply. +

+ The source code files for other SQL database engines typically begin + with a comment describing your license rights to view and copy that file. + The SQLite source code contains no license since it is not governed by + copyright. Instead of a license, the SQLite source code offers a blessing: +

+ May you do good and not evil
+ May you find forgiveness for yourself and forgive others
+ May you share freely, never taking more than you give.
+
+} + +feature extensions {SQL language extensions} { +} + + +footer $rcsid diff --git a/www/optimizing.tcl b/www/optimizing.tcl new file mode 100644 index 0000000000..44d2825f53 --- /dev/null +++ b/www/optimizing.tcl @@ -0,0 +1,15 @@ +set rcsid {$Id: optimizing.tcl,v 1.1 2005/01/17 03:42:52 drh Exp $} +source common.tcl +header {Hints For Optimizing Queries In SQLite} +proc section {level tag name} { + incr level + if {$level>6} {set level 6} + puts "\n"
" + puts "$name\n" +} +section 1 recompile {Recompile the library for optimal performance} +section 2 avoidtrans {Minimize the number of transactions} +section 3 usebind {Use sqlite3_bind to insert large chunks of data} +section 4 useindices {Use appropriate indices} +section 5 recordjoin {Reorder the tables in a join} +footer $rcsid