Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
771 In a bank, an account number is used as the primary key. This is an example of:
Explanation
An account number is the real identifier customers and the bank use in the real world, so it is a natural key even though the bank issues it.
Last verified on 27-11-2026
772 What distinguishes a surrogate key from a candidate key?
Explanation
Candidate keys are existing attributes that could identify a row, while a surrogate key is a new artificial column created for that purpose.
Last verified on 27-11-2026
773 If a natural key value is updated, what must also happen in a well-designed database?
Explanation
Changing a referenced primary key breaks referential integrity unless the change is cascaded to all referencing foreign keys.
Last verified on 27-11-2026
774 Why are surrogate keys popular in data warehouses?
Explanation
Different source systems may use different codes for the same customer, so a warehouse surrogate key provides one stable identifier.
Last verified on 27-11-2026
775 Which scenario best justifies a surrogate key?
Explanation
When the natural code is unstable, a surrogate key protects joins from change, while the supplier code stays as an ordinary unique attribute.
Last verified on 27-11-2026
776 What happens if a database tries to store two rows with the same primary key value?
Explanation
Entity integrity requires primary key values to be unique, so a duplicate insert is rejected.
Last verified on 27-11-2026
777 An Enrolment row refers to StudentID 999, but no student with ID 999 exists. Which integrity rule is violated?
Explanation
A foreign key that points to a non-existent parent row violates referential integrity.
Last verified on 27-11-2026
778 What does the NOT NULL constraint on a primary key enforce?
Explanation
A primary key must always have a value, because a null cannot identify a row, so entity integrity requires NOT NULL.
Last verified on 27-11-2026
779 In a composite primary key (OrderID, ProductID), what does entity integrity require?
Explanation
In a composite key, no part may be null and the whole combination must be unique, otherwise a row cannot be identified.
Last verified on 27-11-2026
780 Which constraint enforces referential integrity in a relational database?
Explanation
A foreign key constraint ensures that foreign key values match existing primary key values in the referenced table.
Last verified on 27-11-2026