SQLite Forum

Help with foreign key
A REFERENCES constraint only needs to refer to the target table.  The target table (parent) columns default to the primary key of the target table.  You only need to specify the column names if they refer to something that is not the primary key of the table.  However, there must still be a unique index on those columns in the parent, just as their must be an index on the child for which the referencing columns must be the leading columns in the index.

In your example above, the REFERENCES constraint on track.trackartist does not need to contain the target column name (artistid) since that is the primary key of the referenced table.