Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
591 Which referential action best preserves order history after a customer account is deleted?
Explanation
SET NULL keeps the order rows as history while clearing the link to the deleted customer.
Last verified on 27-11-2026
592 A Hospital deletes a Doctor with ON DELETE SET NULL on Patient.DoctorID. What happens to the patients?
Explanation
SET NULL is appropriate when the child can exist independently and only the link is lost.
Last verified on 27-11-2026
593 If a SupplierID in Product is updated and ON UPDATE CASCADE is set, what happens?
Explanation
ON UPDATE CASCADE propagates a primary-key change to matching foreign-key values in child rows.
Last verified on 27-11-2026
594 What does ON DELETE SET NULL do when a parent row is deleted?
Explanation
ON DELETE SET NULL preserves child rows but breaks their link by setting the foreign key to NULL.
Last verified on 27-11-2026
595 A university deletes a Course with ON DELETE CASCADE on Enrolment.CourseID. What happens to the enrolments for that course?
Explanation
CASCADE propagates the parent delete to all dependent child rows, so enrolments for the deleted course disappear.
Last verified on 27-11-2026
596 Which referential action blocks deletion of a parent row while child rows still refer to it?
Explanation
RESTRICT rejects the parent delete when dependent child rows exist, protecting referential integrity.
Last verified on 27-11-2026
597 When is ON DELETE SET NULL NOT a suitable choice for a foreign key?
Explanation
SET NULL requires a nullable foreign key; if the column is NOT NULL the action cannot be applied and the delete fails.
Last verified on 27-11-2026
598 A Customer is deleted and ON DELETE SET NULL is defined on Order.CustomerID. What is the result for the orders?
Explanation
SET NULL keeps child rows for history while removing the link to the deleted parent.
Last verified on 27-11-2026
599 What is the main difference between ON DELETE CASCADE and ON DELETE SET NULL?
Explanation
CASCADE removes dependents, while SET NULL preserves them without a parent link.
Last verified on 27-11-2026
600 Which foreign-key action best fits a lookup table, such as a list of countries, that is referenced by many tables?
Explanation
A lookup value in active use should not disappear, so RESTRICT blocks its deletion while any row still references it.
Last verified on 27-11-2026