Documentation Source Text

Check-in [14e677d1dc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a "todo" note to fix the schema file-format range. Also fix another todo in fileformat.html.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 14e677d1dc45ad0056ebbe82b4db482d94eae179
User & Date: dan 2009-05-26 15:13:30
Context
2009-05-26
23:13
Improve the internal links from text to glossary definitions in fileformat.html. Also fix a bunch of issues reported by John Machin on the mailing list. check-in: c5aa49ff35 user: dan tags: trunk
15:13
Add a "todo" note to fix the schema file-format range. Also fix another todo in fileformat.html. check-in: 14e677d1dc user: dan tags: trunk
04:32
Modify some requirements in fileformat.html to make them more testable. check-in: 9a9955c381 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/fileformat.in.

533
534
535
536
537
538
539
540
541
542
543




544
545
546
547
548
549
550
...
789
790
791
792
793
794
795





796
797
798
799
800
801
802
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
	<li>If the database is an auto-vacuum database, a flag indicating 
	    whether or not the database is in incremental vacuum mode or not.
	<li>The default page cache size in pages to use with the database (an 
	    integer field).
      </ol>
  </ul>

  <p class=todo>
    Say something about items 5 and 6 being advisory only. SQLite places an
    interpretation on each field, but other applications may safely ignore
    them.





  <p class=todo>
    The concept of a logical database and its contents should be defined
    properly in some requirements document so that it can be referenced from
    here and other places. The definition will be something like the list of
    bullet points above.

................................................................................
              <li> Implicit default (non-NULL) values at the end of table
                   records (see section <cite>table_btree_content</cite>).
              <li> Descending indexes (see section
                   <cite>index_btree_compare_func</cite>) and Boolean values
                   in database records (see section <cite>record_format</cite>,
                   serial types 8 and 9).
            </ol>





            <td>H30120

        [Tr]<td>48..51 <td>4<td>
            Default pager cache size. This field is used by SQLite to store
            the recommended pager cache size to use for the database.
            <td>H30130

................................................................................
          [fileformat_import_requirement2 H30210]
          [fileformat_import_requirement2 H30220]
        

    [h3 "The Schema Table" schema_table]
      <p>
        Apart from being the page that contains the file-header, page 1 of
        the database file is special because it is the root page of the
        B-Tree structure that contains the schema table data. From the SQL
        level, the schema table is accessible via the name "sqlite_master".
      <p>
        The exact format of the B-Tree structure and the meaning of the term
        "root page" is discussed in section <cite>btree_structures</cite>.
        For now, it is sufficient to know that the B-Tree structure is a
        data structure that stores a set of records. Each record is an







|
|
|
|
>
>
>
>







 







>
>
>
>
>







 







|







533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
...
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
...
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
	<li>If the database is an auto-vacuum database, a flag indicating 
	    whether or not the database is in incremental vacuum mode or not.
	<li>The default page cache size in pages to use with the database (an 
	    integer field).
      </ol>
  </ul>

  <p>
    Of the six database properties enumerated above, the values taken by the
    initial three dramatically affect the structure of the database image. Any
    software system that handles SQLite database images will need to understand
    and interpret them. Properties 4 to 6 may be considered advisory. Although
    properties 5 and 6 modify the operation of the SQLite library in 
    well-defined manners, an alternative SQLite database client is free to
    interpret them differently, or not interpret them at all. 

  <p class=todo>
    The concept of a logical database and its contents should be defined
    properly in some requirements document so that it can be referenced from
    here and other places. The definition will be something like the list of
    bullet points above.

................................................................................
              <li> Implicit default (non-NULL) values at the end of table
                   records (see section <cite>table_btree_content</cite>).
              <li> Descending indexes (see section
                   <cite>index_btree_compare_func</cite>) and Boolean values
                   in database records (see section <cite>record_format</cite>,
                   serial types 8 and 9).
            </ol>

            <p class=todo>
              Turns out SQLite can be tricked into violating this. If you delete
	      all tables from a database and then VACUUM the database, the
              schema layer file-format field somehow gets set to 0.
            <td>H30120

        [Tr]<td>48..51 <td>4<td>
            Default pager cache size. This field is used by SQLite to store
            the recommended pager cache size to use for the database.
            <td>H30130

................................................................................
          [fileformat_import_requirement2 H30210]
          [fileformat_import_requirement2 H30220]
        

    [h3 "The Schema Table" schema_table]
      <p>
        Apart from being the page that contains the file-header, page 1 of
        a database image is special because it is the root page of the
        B-Tree structure that contains the schema table data. From the SQL
        level, the schema table is accessible via the name "sqlite_master".
      <p>
        The exact format of the B-Tree structure and the meaning of the term
        "root page" is discussed in section <cite>btree_structures</cite>.
        For now, it is sufficient to know that the B-Tree structure is a
        data structure that stores a set of records. Each record is an