I have two tables in database:
Now when the r
Depending on which version of SQLite your app is running on, you might be able to use SQLite's foreign key support.
In older version's of SQLite you might be able to use the genfkey utility to create triggers to enforce your foreign key constraints (older versions of SQLite would parse foreign key constraints added during a CREATE TABLE statement, but wouldn't actually implement them).
Hope this helps.