Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
661 What happens if you try to insert a child row with a foreign key value that has no parent?
Explanation
Referential integrity blocks any child row whose foreign key does not match an existing parent, so the insert fails.
Last verified on 27-11-2026
662 What happens if you try to update a foreign key to a value with no matching parent?
Explanation
Updating a foreign key to a non-existent parent would create an orphan, so the DBMS blocks the change.
Last verified on 27-11-2026
663 Which foreign-key action is safest when a parent row is still referenced and must not be lost?
Explanation
RESTRICT blocks the delete, so a referenced parent cannot be removed by mistake while children still depend on it.
Last verified on 27-11-2026
664 When would ON DELETE SET DEFAULT be used?
Explanation
SET DEFAULT reassigns children to a predefined default parent, which must exist, instead of deleting them or leaving them null.
Last verified on 27-11-2026
665 What is the default foreign-key action in most DBMSs if no ON DELETE clause is given?
Explanation
Without an explicit action, most systems default to NO ACTION, so deleting a referenced parent is rejected.
Last verified on 27-11-2026
666 A foreign key can reference a table in the same database only, or also another database?
Explanation
Standard foreign keys link tables inside one database, and cross-database references are limited or unsupported in many systems.
Last verified on 27-11-2026
667 Which statement about foreign keys and indexes is true?
Explanation
Joins use the foreign key, and deleting a parent requires finding its children, so an index on the foreign key improves both operations.
Last verified on 27-11-2026
668 Why does deleting a parent row sometimes take a long time?
Explanation
Without an index on the foreign key, the DBMS may scan the whole child table to find dependent rows before it can allow or cascade the delete.
Last verified on 27-11-2026
669 When a relationship has its own attributes, where are they stored after mapping?
Explanation
Relationship attributes belong with the link, so they go in the child table for one-to-many or in the junction table for many-to-many.
Last verified on 27-11-2026
670 What is the foreign key in a junction table for Books and Authors?
Explanation
The junction table holds a foreign key to each side, so BookID references Book and AuthorID references Author.
Last verified on 27-11-2026