Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch branch-3.19 Excluding Merge-Ins
This is equivalent to a diff from a30aad4d5c to 2785e9dd6c
2017-07-24
| ||
12:01 | Merge hyperlink fixes from the 3.19 branch. (check-in: 727dbfb460 user: drh tags: trunk) | |
2017-07-23
| ||
17:07 | Fix the hyperlinks to the mailing lists. (Leaf check-in: 2785e9dd6c user: drh tags: branch-3.19) | |
2017-07-17
| ||
12:25 | Fix a typo in whentouse.html. (Cherrypick from trunk) (check-in: 8cd332487d user: drh tags: branch-3.19) | |
2017-07-01
| ||
23:24 | Attempt to improve the INSERT documentation. (check-in: 6b1a2005d8 user: drh tags: branch-3.19) | |
2017-06-29
| ||
14:47 | Initial draft of release notes for version 3.20.0. (check-in: fe054454f3 user: drh tags: trunk) | |
2017-06-26
| ||
14:43 | Correction to the schema for the DBSTAT virtual table. (check-in: a30aad4d5c user: drh tags: trunk) | |
2017-06-17
| ||
13:51 | Add a reference to the Jim Gray paper to the faster-than-filesystem article. (check-in: b37cb6bc60 user: drh tags: trunk) | |
Changes to pages/appfileformat.in.
︙ | ︙ | |||
131 132 133 134 135 136 137 | <p>As with custom file formats, and unlike pure pile-of-file formats, a wrapped pile-of-files format is not as easy to edit, since usually the entire file must be rewritten in order to change any component part. </ol> <p>The purpose of this document is to argue in favor of a fourth | | | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | <p>As with custom file formats, and unlike pure pile-of-file formats, a wrapped pile-of-files format is not as easy to edit, since usually the entire file must be rewritten in order to change any component part. </ol> <p>The purpose of this document is to argue in favor of a fourth new category of application file format: An SQLite database file. <h2>SQLite As The Application File Format</h2> <p> Any application state that can be recorded in a pile-of-files can also be recorded in an SQLite database with a simple key/value schema like this: |
︙ | ︙ |
Changes to pages/copyright.in.
︙ | ︙ | |||
47 48 49 50 51 52 53 | <div class="rightsidebar"> <form method="GET" action="https://www.hwaci.com/cgi-bin/license-step1"> <input type="submit" value="Buy An SQLite License"> </form> </div> | | | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <div class="rightsidebar"> <form method="GET" action="https://www.hwaci.com/cgi-bin/license-step1"> <input type="submit" value="Buy An SQLite License"> </form> </div> <h2>Obtaining A License To Use SQLite</h2> <p> Even though SQLite is in the public domain and does not require a license, some users want to obtain a license anyway. Some reasons for obtaining a license include: </p> |
︙ | ︙ |
Changes to pages/dbstat.in.
1 2 3 4 5 6 7 8 9 10 11 | <title>The DBSTAT Virtual Table</title> <tcl>hd_keywords dbstat {dbstat virtual table}</tcl> <fancy_format> <h1>Overview</h1> <p> The DBSTAT virtual tables is a read-only [eponymous virtual table] that returns information about which pages of the database files are used by which tables and indexes in the schema. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <title>The DBSTAT Virtual Table</title> <tcl>hd_keywords dbstat {dbstat virtual table}</tcl> <fancy_format> <h1>Overview</h1> <p> The DBSTAT virtual tables is a read-only [eponymous virtual table] that returns information about which pages of the database files are used by which tables and indexes in the schema. The DBSTAT virtual table is used to implement [sqlite3_analyzer.exe] utility program, and to help compute the [https://www.sqlite.org/src/repo-tabsize|table size pie-chart] in the [https://www.fossil-scm.org/|Fossil-implemented] version control system for SQLite. </p> <p> |
︙ | ︙ |
Changes to pages/faq.in.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <title>SQLite Frequently Asked Questions</title> <tcl> set cnt 1 proc faq {question answer} { set ::faq($::cnt) [list [string trim $question] [string trim $answer]] incr ::cnt } ############# # Enter questions and answers here. faq { | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <title>SQLite Frequently Asked Questions</title> <tcl> set cnt 1 proc faq {question answer} { set ::faq($::cnt) [list [string trim $question] [string trim $answer]] incr ::cnt } ############# # Enter questions and answers here. faq { How do I create an AUTOINCREMENT field? } { <p>Short answer: A column declared [INTEGER PRIMARY KEY] will autoincrement.</p> <p>Longer answer: If you declare a column of a table to be [INTEGER PRIMARY KEY], then whenever you insert a NULL |
︙ | ︙ |
Changes to pages/foreignkeys.in.
︙ | ︙ | |||
320 321 322 323 324 325 326 | Errors reported when content is changed are "DML errors" and errors reported when the schema is changed are "DDL errors". So, in other words, misconfigured foreign key constraints that require looking at both the child and parent are DML errors. ^The English language error message for foreign key DML errors is usually "foreign key mismatch" but can also be "no such table" if the parent table does not exist. | | | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | Errors reported when content is changed are "DML errors" and errors reported when the schema is changed are "DDL errors". So, in other words, misconfigured foreign key constraints that require looking at both the child and parent are DML errors. ^The English language error message for foreign key DML errors is usually "foreign key mismatch" but can also be "no such table" if the parent table does not exist. ^(Foreign key DML errors are reported if: <ul> <li> The parent table does not exist, or <li> The parent key columns named in the foreign key constraint do not exist, or <li> The parent key columns named in the foreign key constraint are not the primary key of the parent table and are not subject to a unique |
︙ | ︙ |
Changes to pages/lang.in.
︙ | ︙ | |||
1846 1847 1848 1849 1850 1851 1852 | <tcl> hd_puts "[Operator =] or [Operator ==]. ^The non-equals operator can be either [Operator !=] or [Operator {<>}]. ^The [Operator ||] operator is \"concatenate\" - it joins together the two strings of its operands. | | | > > | 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 | <tcl> hd_puts "[Operator =] or [Operator ==]. ^The non-equals operator can be either [Operator !=] or [Operator {<>}]. ^The [Operator ||] operator is \"concatenate\" - it joins together the two strings of its operands. ^The operator [Operator %] outputs the integer value of its left operand modulo its right operand. In other words, the operator [Operator %] works in SQLite the same as it does in ANSI-C.</p> <p>^The result of any binary operator is either a numeric value or NULL, except for the [Operator ||] concatenation operator which always evaluates to either NULL or a text value.</p>" hd_fragment {isisnot} {IS operator} {IS NOT operator} |
︙ | ︙ | |||
3235 3236 3237 3238 3239 3240 3241 | ############################################################################## Section INSERT insert {INSERT *INSERTs} RecursiveBubbleDiagram insert-stmt </tcl> <p>The INSERT statement comes in three basic forms. | | > | > | > | | > > | > | < | 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 | ############################################################################## Section INSERT insert {INSERT *INSERTs} RecursiveBubbleDiagram insert-stmt </tcl> <p>The INSERT statement comes in three basic forms. <ol> <li><p><b>INSERT INTO </b><i>table</i><b> VALUES(...);</b> <p>^The first form (with the "VALUES" keyword) creates one or more new rows in an existing table. ^If the <yyterm>column-name</yyterm> list after <yyterm>table-name</yyterm> is omitted then the number of values inserted into each row must be the same as the number of columns in the table. ^In this case the result of evaluating the left-most expression from each term of the VALUES list is inserted into the left-most column of each new row, and so forth for each subsequent expression. ^If a <yyterm>column-name</yyterm> list is specified, then the number of values in each term of the VALUE list must match the number of specified columns. ^Each of the named columns of the new row is populated with the results of evaluating the corresponding VALUES expression. ^Table columns that do not appear in the column list are populated with the [default column value] (specified as part of the [CREATE TABLE] statement), or with NULL if no [default value] is specified. <li><p><b>INSERT INTO </b><i>table</i><b> SELECT ...;</b> <p>The second form of the INSERT statement contains a [SELECT] statement instead of a VALUES clause. ^A new entry is inserted into the table for each row of data returned by executing the SELECT statement. ^If a column-list is specified, the number of columns in the result of the SELECT must be the same as the number of items in the column-list. ^Otherwise, if no column-list is specified, the number of columns in the result of the SELECT must be the same as the number of columns in the table. ^Any SELECT statement, including [compound SELECTs] and SELECT statements with [ORDER BY] and/or [LIMIT] clauses, may be used in an INSERT statement of this form. <li><p><b>INSERT INTO </b><i>table</i><b> DEFAULT VALUES;</b> <p>The third form of an INSERT statement is with DEFAULT VALUES. ^(The INSERT ... DEFAULT VALUES statement inserts a single new row into the named table.)^ ^Each column of the new row is populated with its [default value], or with a NULL if no default value is specified as part of the column definition in the [CREATE TABLE] statement. </ol> <p> ^The initial "INSERT" keyword can be replaced by "REPLACE" and "INSERT OR <i>action</i>" to specify an alternative constraint [ON CONFLICT|conflict resolution algorithm] to use during that one INSERT command. For compatibility with MySQL, ^the parser allows the use of the single keyword <a href="lang_replace.html">REPLACE</a> as an alias for "INSERT OR REPLACE". <p>^(The optional "<i>schema-name</i><b>.</b>" prefix on the <yyterm>table-name</yyterm> is supported for top-level INSERT statements only.)^ ^The table name must be |
︙ | ︙ |
Changes to pages/privatebranch.in.
︙ | ︙ | |||
355 356 357 358 359 360 361 | simply by cloning the official repository:</p> <blockquote><pre> fossil clone http://www.sqlite.org/src private-project.fossil </pre></blockquote> <p>This command both creates the new repository and populates it with | | | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | simply by cloning the official repository:</p> <blockquote><pre> fossil clone http://www.sqlite.org/src private-project.fossil </pre></blockquote> <p>This command both creates the new repository and populates it with all the latest SQLite could. You can then create a private branch as described in section 3.4.</p> <p>When the private repository is created by cloning, incorporating new public SQLite releases becomes much easier too. To pull in all of the latest changes from the public SQLite repository, simply move into the open check-out and do:</p> |
︙ | ︙ |
Changes to pages/rbu.in.
︙ | ︙ | |||
49 50 51 52 53 54 55 | The total amount of data written is around three times the size of the final database file. By contrast, an RBU Vacuum requires roughly the size of the final database file in temporary disk space and writes a total of twice that to disk. <p>On the other hand, an RBU Vacuum uses more CPU than a regular SQLite VACUUM - in one test as much as five times as much. For this reason, an RBU | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | The total amount of data written is around three times the size of the final database file. By contrast, an RBU Vacuum requires roughly the size of the final database file in temporary disk space and writes a total of twice that to disk. <p>On the other hand, an RBU Vacuum uses more CPU than a regular SQLite VACUUM - in one test as much as five times as much. For this reason, an RBU Vacuum is often significantly slower than an SQLite VACUUM under the same conditions. <li><b>RBU runs in the background</b> <p>An ongoing RBU operation (either an update or a vacuum) does not interfere with read access to the database file. |
︙ | ︙ | |||
100 101 102 103 104 105 106 | <li><p>The target database may not contain [indexes on expressions]. <li><p>No other writes may occur on the target database while the RBU update is being applied. A read-lock is held on the target database to prevent this.</p></li> </ul> | | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | <li><p>The target database may not contain [indexes on expressions]. <li><p>No other writes may occur on the target database while the RBU update is being applied. A read-lock is held on the target database to prevent this.</p></li> </ul> <h2>Preparing an RBU Update File</h2> <p>All changes to be applied by RBU are stored in a separate SQLite database called the "RBU database". The database that is to be modified is called the "target database". <p>For each table in the target database that will be modified by the update, a corresponding table is created within the RBU database. The RBU database |
︙ | ︙ | |||
233 234 235 236 237 238 239 | <p>is represented by the data_t1 row created by: <codeblock> INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); </codeblock> <p>If RBU is used to update a large BLOB value within a target database, it | | | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | <p>is represented by the data_t1 row created by: <codeblock> INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); </codeblock> <p>If RBU is used to update a large BLOB value within a target database, it may be more efficient to store a patch or delta that can be used to modify the existing BLOB instead of an entirely new value within the RBU database. RBU allows deltas to be specified in two ways: <ul> <li> In the "fossil delta" format - the format used for blob deltas by the <a href=http://fossil-scm.org>Fossil source-code management system</a>, or |
︙ | ︙ |
Changes to pages/sqldiff.in.
︙ | ︙ | |||
33 34 35 36 37 38 39 | <dd><p>Use the schema-defined [PRIMARY KEY] instead of the [rowid] to pair rows in the source and destination database. (See additional explanation below.)</dd> <dt><b>--schema</b></dt> <dd><p>Show only differences in the schema not the table content</p></dd> <dt><b>--summary</b></dt> <dd><p>Show how many rows have changed on each table, but do not show | | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | <dd><p>Use the schema-defined [PRIMARY KEY] instead of the [rowid] to pair rows in the source and destination database. (See additional explanation below.)</dd> <dt><b>--schema</b></dt> <dd><p>Show only differences in the schema not the table content</p></dd> <dt><b>--summary</b></dt> <dd><p>Show how many rows have changed on each table, but do not show the actual changes</dd> <dt><b>--table TABLE</b></dt> <dd><p>Show only the differences in content for TABLE, not for the entire database</p></dd> <dt><b>--transaction</b></dt> <dd><p>Wrap SQL output in a single large transaction</p></dd> <dt><b>--vtab</b></dt> <dd><p>Add support for handling [FTS3], [FTS5] and [rtree] virtual tables. |
︙ | ︙ | |||
89 90 91 92 93 94 95 | [CREATE TRIGGER|TRIGGERs] or [CREATE VIEW|VIEWs]. <li><p id=vtab> By default, differences in the schema or content of virtual tables are not reported on. <p>However, if a [virtual table] implementation creates real tables (sometimes | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | [CREATE TRIGGER|TRIGGERs] or [CREATE VIEW|VIEWs]. <li><p id=vtab> By default, differences in the schema or content of virtual tables are not reported on. <p>However, if a [virtual table] implementation creates real tables (sometimes referred to as "shadow" tables) within the database to store its data in, then sqldiff.exe does calculate the difference between these. This can have surprising effects if the resulting SQL script is then run on a database that is not <i>exactly</i> the same as the source database. For several of SQLite's bundled virtual tables (FTS3, FTS5, rtree and others), the surprising effects may include corruption of the virtual table content. <p> If the --vtab option is passed to sqldiff.exe, then it ignores all underlying shadow tables belonging to an FTS3, FTS5 or rtree virtual table and instead includes the virtual table differences directly. </ol> |
Changes to pages/support.in.
1 2 3 4 5 6 7 8 9 10 11 | <title>SQLite Support Options</title> <tcl>hd_fragment mailinglists {mailing lists}</tcl> <h2>Free Public Mailing Lists</h2> <ul> <li><p> <a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users"> sqlite-users</a> — General discussion for programmers using SQLite in their applications. <i>This is probably the mailing list you want!</i> | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <title>SQLite Support Options</title> <tcl>hd_fragment mailinglists {mailing lists}</tcl> <h2>Free Public Mailing Lists</h2> <ul> <li><p> <a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users"> sqlite-users</a> — General discussion for programmers using SQLite in their applications. <i>This is probably the mailing list you want!</i> <a class="button" href='http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users'>Sign-up</a> <a class="button" href="http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/">Archives</a> </li> <li><p> <a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-dev"> sqlite-dev</a> — Conversations about SQLite internals, for those who work directly on enhancing SQLite itself. <a class="button" href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-dev">Sign-up</a> </li> <li><p> <a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-announce"> <nobr>sqlite-announce</nobr></a> — Announcements of new SQLite releases.</td> <a class="button" href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-announce">Sign-up</a> </li> </ul> <tcl>hd_fragment prosupport</tcl> <h2>Paid Professional Support</h2> <p> |
︙ | ︙ |
Changes to pages/whentouse.in.
1 2 3 4 5 6 7 8 9 10 11 12 | <title>Appropriate Uses For SQLite</title> <h1 align="center">Appropriate Uses For SQLite</h1> <p> SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a different problem. </p> <p> Client/server SQL database engines strive to implement a shared repository | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <title>Appropriate Uses For SQLite</title> <h1 align="center">Appropriate Uses For SQLite</h1> <p> SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a different problem. </p> <p> Client/server SQL database engines strive to implement a shared repository of enterprise data. They emphasize scalability, concurrency, centralization, and control. SQLite strives to provide local data storage for individual applications and devices. SQLite emphasizes economy, efficiency, reliability, independence, and simplicity. </p> |
︙ | ︙ |