Documentation Source Text

Check-in [d1edb27943]
Login

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

Overview
Comment:Update the documentation to be explicit that a parent key must not be a rowid.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d1edb27943bf34cb2bb8598ddf0668236603c2ed
User & Date: drh 2010-11-18 16:21:18.000
Context
2010-11-18
20:42
Fix a typo in the PRAGMA auto_vacuum documentation. (check-in: 8c4c6ab123 user: drh tags: trunk)
16:21
Update the documentation to be explicit that a parent key must not be a rowid. (check-in: d1edb27943 user: drh tags: trunk)
01:11
Another minor change to the EQP documentation. (check-in: 1aff231013 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/foreignkeys.in.
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
        is applied to and the table that contains the REFERENCES clause.
        The example in this section uses the <i>track</i> table
        as the child table. Other books and articles refer to this as the
        <i>referencing table</i>.

    <li><p>The <b>parent key</b> is the column or set of columns in the parent 
        table that the foreign key constraint refers to. This is normally, but
        not always, the primary key of the parent table.


    <li><p>The <b>child key</b> is the column or set of columns in the child 
        table that are constrained by the foreign key constraint and which
        hold the REFERENCES clause.
  </ul>

  <p>







|
>







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
        is applied to and the table that contains the REFERENCES clause.
        The example in this section uses the <i>track</i> table
        as the child table. Other books and articles refer to this as the
        <i>referencing table</i>.

    <li><p>The <b>parent key</b> is the column or set of columns in the parent 
        table that the foreign key constraint refers to. This is normally, but
        not always, the primary key of the parent table.  ^The parent key must
        be a named column or columns in the parent table, not the [rowid].

    <li><p>The <b>child key</b> is the column or set of columns in the child 
        table that are constrained by the foreign key constraint and which
        hold the REFERENCES clause.
  </ul>

  <p>
Changes to pages/lang.in.
901
902
903
904
905
906
907



908
909
910
911
912
913
914
integer primary key or rowid column, a "datatype mismatch" error occurs and the
statement is aborted.

<p>^If an INSERT statement attempts to insert a NULL value into a rowid or
integer primary key column, the system chooses an integer value to use as the
rowid automatically. A detailed description of how this is done is provided
<a href="autoinc.html">separately</a>.</p>




<tcl>
##############################################################################
Section {CREATE TRIGGER} createtrigger {{CREATE TRIGGER}}

BubbleDiagram create-trigger-stmt 1
</tcl>







>
>
>







901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
integer primary key or rowid column, a "datatype mismatch" error occurs and the
statement is aborted.

<p>^If an INSERT statement attempts to insert a NULL value into a rowid or
integer primary key column, the system chooses an integer value to use as the
rowid automatically. A detailed description of how this is done is provided
<a href="autoinc.html">separately</a>.</p>

<p>^(The [parent key] of a [foreign key constraint] is not allowed to
use the rowid.  The parent key must used named columns only.)^</p>

<tcl>
##############################################################################
Section {CREATE TRIGGER} createtrigger {{CREATE TRIGGER}}

BubbleDiagram create-trigger-stmt 1
</tcl>