Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
941 Which of the following is the best example of a natural key?
Explanation
CNIC is issued in the real world and uniquely identifies a person, so it is a natural key.
Last verified on 27-11-2026
942 In which situation is a surrogate key most useful?
Explanation
A surrogate key is an artificial identifier used when no natural attribute can reliably and permanently identify rows.
Last verified on 27-11-2026
943 Which of the following is a typical surrogate key?
Explanation
An auto-increment number has no real-world meaning and is generated only to identify rows.
Last verified on 27-11-2026
944 What is the main advantage of a surrogate key?
Explanation
Surrogate keys are short, system-controlled and immune to changes in real-world identifiers.
Last verified on 27-11-2026
945 Which statement about composite UNIQUE keys is correct?
Explanation
A composite UNIQUE key, like a composite primary key, applies to the whole combination.
Last verified on 27-11-2026
946 What is the purpose of a UNIQUE constraint on a Username column?
Explanation
Usernames must be distinct for login and identification, so UNIQUE enforces that rule.
Last verified on 27-11-2026
947 Which constraint is most appropriate for an ISBN column in a Books table?
Explanation
ISBN uniquely identifies a book edition, so UNIQUE (or PRIMARY KEY) prevents duplicate ISBN entries.
Last verified on 27-11-2026
948 If a UNIQUE column is also declared NOT NULL, how does it differ from a PRIMARY KEY?
Explanation
A UNIQUE NOT NULL column is a candidate key; the only structural difference is that only one candidate can be the primary key.
Last verified on 27-11-2026
949 A UNIQUE constraint is violated when:
Explanation
UNIQUE forbids duplicate non-NULL values, so inserting a repeat triggers a constraint violation.
Last verified on 27-11-2026
950 Which of the following can have a UNIQUE constraint?
Explanation
UNIQUE can be defined on one column or on a set of columns, enforcing distinct combinations.
Last verified on 27-11-2026