Correct option is B
When a tuple (record) referenced by a foreign key is deleted from the parent table, the default behavior in most database systems is to prevent the deletion and throw a foreign key constraint violation error. This is because deleting the parent record would leave orphaned records in the child table with foreign key values that no longer reference valid parent records, violating referential integrity.
Important Key Points:
- Referential Integrity: Foreign keys ensure data consistency between related tables
- Constraint Violation: Default action is to reject deletion that would break references.
- Orphaned Records: Child records would have invalid foreign key references.
- Database Protection: System prevents actions that compromise data integrity.
- Transaction Rollback: The delete operation is typically rolled back.
- Error Message: Database returns foreign key constraint violation error.
- Data Consistency: Maintains logical relationships between tables.
- Default Behavior: Most RDBMS systems use RESTRICT as default action.
Knowledge Booster:
· "Removed silently" would only happen with specific CASCADE DELETE settings, not the default behavior.
· "Deletion cascades" occurs only when ON DELETE CASCADE is explicitly defined in the foreign key constraint, not by default.
· "Foreign key updated automatically" would require ON DELETE SET NULL or ON DELETE SET DEFAULT constraints to be defined.
· "All tuples deleted" is incorrect as it would cause massive data loss and is not a standard database behavior.