SQLite - Foreign key referencing rowid alias. Legal or not?
If the internal rowid is not a named column, it might not keep the same values after a VACUUM, which would break the foreign key references.
If the rowid is named, it is guaranteed to keep its values.Using an INTEGER PRIMARY KEY as the parent of a foreign key is allowed, and common.