Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
911 What does ON DELETE RESTRICT (or NO ACTION) do?
Explanation
RESTRICT / NO ACTION blocks the delete to protect child rows from becoming orphans.
Last verified on 27-11-2026
912 What does ON UPDATE CASCADE do?
Explanation
UPDATE CASCADE propagates a primary key change to all referencing foreign keys.
Last verified on 27-11-2026
913 A designer chooses an auto-increment ID as primary key and puts UNIQUE on CNIC. What is the CNIC then?
Explanation
CNIC is a natural candidate key not chosen as primary key, so it is an alternate key enforced by UNIQUE.
Last verified on 27-11-2026
914 Which key is invisible in most user interfaces?
Explanation
Users see names, codes and emails; the internal surrogate ID is normally hidden in the interface.
Last verified on 27-11-2026
915 What is a drawback of a surrogate key?
Explanation
A surrogate value alone tells a user nothing, so meaningful attributes must be retrieved alongside it.
Last verified on 27-11-2026
916 Which pair correctly matches key to example?
Explanation
ISBN is a real-world identifier, while an auto-increment ID is system-generated, so this pairing is correct.
Last verified on 27-11-2026
917 Which situation violates referential integrity?
Explanation
Referential integrity requires every foreign key value to match an existing primary key value or be NULL.
Last verified on 27-11-2026
918 Which constraint enforces referential integrity?
Explanation
A FOREIGN KEY constraint links a child column to a parent primary key and enforces matching values.
Last verified on 27-11-2026
919 In Orders(CustomerID) referencing Customers(CustomerID), what does referential integrity prevent?
Explanation
An order must belong to a real customer, so a foreign key for a missing customer is rejected.
Last verified on 27-11-2026
920 What is an orphan row in a database?
Explanation
Orphan rows break referential integrity because their parent reference points nowhere.
Last verified on 27-11-2026