O'Reilly logo

Refactoring Databases: Evolutionary Database Design by Pramod J. Sadalage, Scott W. Ambler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8Referential Integrity Refactorings

Referential integrity refactorings are changes that ensure that a referenced row exists within another table and/or that ensures that a row that is no longer needed is removed appropriately. The referential integrity refactorings are as follows:

• Add Foreign Key Constraint

• Add Trigger For Calculated Column

• Drop Foreign Key Constraint

• Introduce Cascading Delete

• Introduce Hard Delete

• Introduce Soft Delete

• Introduce Trigger For History

Add Foreign Key Constraint

Add a foreign key constraint to an existing table to enforce a relationship to another table.

Motivation

The primary reason to apply Add Foreign Key Constraint is to enforce data dependencies at the database level, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required