hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    What happens when a tuple referenced by a foreign key is deleted in the parent table?
    Question



    What happens when a tuple referenced by a foreign key is deleted in the parent table?

    A.

    The tuple is removed silently.

    B.

    It causes a foreign key constraint violation.

    C.

    The deletion cascades to the child table.

    D.

    The foreign key reference is updated automatically.

    E.

    All tuples in the child table are deleted.

    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:

    1. Referential Integrity: Foreign keys ensure data consistency between related tables
    2. Constraint Violation: Default action is to reject deletion that would break references.
    3. Orphaned Records: Child records would have invalid foreign key references.
    4. Database Protection: System prevents actions that compromise data integrity.
    5. Transaction Rollback: The delete operation is typically rolled back.
    6. Error Message: Database returns foreign key constraint violation error.
    7. Data Consistency: Maintains logical relationships between tables.
    8. 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.

    Free Tests

    Free
    Must Attempt
    Video Solutions

    RBI Assistant Pre 2026 Full Mock Test -01

    languageIcon English
    • pdpQsnIcon100 Questions
    • pdpsheetsIcon100 Marks
    • timerIcon60 Mins
    languageIcon English
    Free
    Must Attempt
    Video Solutions

    RBI Asst Prelims 2026 : Reasoning Section Test 01

    languageIcon English
    • pdpQsnIcon35 Questions
    • pdpsheetsIcon35 Marks
    • timerIcon20 Mins
    languageIcon English
    Free
    Must Attempt
    Video Solutions

    RBI Office Attendant 2026 Full Mock Test - 01

    languageIcon English
    • pdpQsnIcon120 Questions
    • pdpsheetsIcon120 Marks
    • timerIcon90 Mins
    languageIcon English
    test-prime-package

    Access ‘SEBI Grade-A Assistant Manager’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    354k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow