Top "Referential-integrity" questions

Referential integrity is a property of data which requires the value of an attribute/column of a relation table to exist as a value of another attribute/column in another relation table

Should referential integrity be enforced?

One of the reasons why referential integrity should not be enforced is performance. Because Db has to validate all updates …

database database-design referential-integrity
Referential Integrity Constraint violation when attempting to set a FK to null

I am trying to update an entity in EF6. I have read that if I wish to change a ForeignKey …

c# entity-framework referential-integrity
Why do Rails migrations define foreign keys in the application but not in the database?

If I define a Customer and Order model in which a Customer "has many" Orders and the Order "belongs to" …

ruby-on-rails database foreign-keys referential-integrity
mysql circular dependency in foreign key constraints

Given the schema: What I need is having every user_identities.belongs_to reference an users.id. At the same …

mysql sql database-design referential-integrity
How to reference other tables in check constraints?

I have a table, ProductSupportArticles: ProductSupportArticleID int NOT NULL <primary key> ParentArticleID int NULL ProductID int NOT NULL …

sql-server referential-integrity check-constraints
postgresql and Delete statement violates foreign key constraint

I have a problem with my delete statement. I have two tables: table vehicule_loan( vehicule TEXT NOT NULL UNIQUE, ); …

sql postgresql foreign-keys referential-integrity
PostgreSQL: deleting rows referenced from another table

I have two tables, object and object_data, with object referencing object_data by foreign key (the relation is 1:1). For …

sql postgresql foreign-keys referential-integrity
zend adapter beginTransaction() and commit() fails

I am facing a strange issue The Zend_DB_Adapter's beginTrasaction() and commit() methods don't seem to be working as …

mysql zend-framework transactions zend-db referential-integrity
Maintaining Referential Integrity - Good or Bad?

We are planning on introducing simple Audit Trail in our database using triggers and separate history table for each table …

sql database-design referential-integrity audit-trail