Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
971 What happens if one column of a composite primary key is dropped from the table?
A
The table becomes a view
B
The key remains valid automatically
C
The foreign keys are unaffected
D
The key is broken because the remaining columns may no longer be unique
Explanation
Removing a key column can destroy uniqueness, so the key definition must be redesigned.
Last verified on 27-11-2026
972 Which index is typically created for a composite primary key?
A
A separate index on each column only
B
An index on the last column only
C
A composite index on all key columns in order
D
No index at all
Explanation
Most DBMSs create a composite index on the primary key columns to enforce uniqueness and speed lookups.
Last verified on 27-11-2026
973 In a table with composite key (Year, Month, BranchID), can Year repeat?
A
No, unless Month is NULL
B
Yes, as long as the full combination is unique
C
Yes, only once
D
No, Year must be unique
Explanation
Individual columns in a composite key may repeat freely; only the complete combination must be unique.
Last verified on 27-11-2026
974 Which example best illustrates a compound key in a real database?
A
PassportNo alone in a travellers table
B
Email alone in a customers table
C
EmployeeID alone in an employees table
D
(OrderID, ProductID) in an order-lines table
Explanation
An order line is identified by its order and its product together, a classic compound key.
Last verified on 27-11-2026
975 A composite key with redundant columns should be:
A
Converted to a surrogate key only
B
split into two primary keys
C
Kept as it is for safety
D
Reduced to a minimal set that still guarantees uniqueness
Explanation
Extra columns add storage and join cost without improving identification, so a minimal key is preferred.
Last verified on 27-11-2026
976 What is the main purpose of a composite key?
A
To allow NULL primary keys
B
To uniquely identify each row when single columns cannot
C
To store duplicate rows
D
To replace all foreign keys
Explanation
Its purpose is row identification, using a combination where one attribute is insufficient.
Last verified on 27-11-2026
977 What does it mean if a composite key is minimal?
A
No column can be removed from it without losing uniqueness
B
It has no foreign key columns
C
It contains the maximum possible columns
D
It allows NULL values
Explanation
A minimal composite key has no redundant attribute; removing any part would allow duplicate combinations.
Last verified on 27-11-2026
978 Which pair could be a composite candidate key in a Library Loan table (MemberID, BookID, LoanDate)?
A
MemberID and BookID
B
LoanDate alone
C
MemberID alone
D
BookID alone
Explanation
A member may borrow the same book on different occasions, so in a simple loan table the pair is the usual identifying combination, while LoanDate alone is not unique.
Last verified on 27-11-2026
979 A composite foreign key is:
A
A foreign key made of two or more columns referencing a composite primary key
B
A foreign key that references two different tables
C
A primary key with two columns in the same table
D
A unique key with two values
Explanation
A composite foreign key must match the full composite primary key it references, column by column and in order.
Last verified on 27-11-2026
980 When referencing a composite primary key, the foreign key must:
A
Include all columns of the referenced key in the same order
B
Include any one column
C
Include only the first column
D
Include only the last column
Explanation
Referential integrity requires the complete key value to match; a partial reference cannot identify the parent row.
Last verified on 27-11-2026