A common benefit of foreign keys is to allow cascading deletes (haven't read if this new SQLite FK enables this).
This is usually a performance benefit for the DB and app processes. It also helps to not_repeat_yourself by having the "business rule" in only one place.
Comments
A common benefit of foreign keys is to allow cascading deletes (haven't read if this new SQLite FK enables this).
This is usually a performance benefit for the DB and app processes. It also helps to not_repeat_yourself by having the "business rule" in only one place.
We use triggers to do cascading deletes in sqlite3 without foreign keys. It's not as concise or declarative as a foreign key constraint, though.