foreign Keys
Queries or sets the enforcement of foreign key constraints.
When set to true (the default in recent Android versions if onConfigure is used), foreign key constraints are enforced for all INSERT, UPDATE, and DELETE statements. When set to false, these constraints are ignored.
It is highly recommended to keep this enabled to maintain data integrity. Disabling it can lead to orphaned records and inconsistent database states. Note that changing this setting does not affect any existing data; it only controls the behavior of future data modification statements.
This pragma is off by default for backward compatibility in SQLite, but modern frameworks like Android's SQLiteDatabase often enable it by default.
Author
MOHAMMAD AZIM ANSARI