Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
1051 Which key is usually indexed automatically by the DBMS?
A
Foreign key in all systems
B
Secondary key
C
Primary key
D
Alternate key
Explanation
Most DBMSs automatically create a unique index on the primary key to enforce uniqueness and speed up lookups.
Last verified on 27-11-2026
1052 Is a foreign key automatically indexed in every DBMS?
A
Yes, always
B
No, foreign keys are never indexed
C
No, it depends on the DBMS; some create an index, others do not
D
Yes, but only for composite keys
Explanation
Indexing of foreign keys varies by system, so a designer may need to create an index explicitly for join performance.
Last verified on 27-11-2026
1053 What is the parent table in a foreign key relationship?
A
The table whose primary key is referenced by the foreign key
B
The child table
C
The table with more rows
D
The table containing the foreign key
Explanation
The parent (referenced) table holds the primary key; the child (referencing) table holds the foreign key.
Last verified on 27-11-2026
1054 If a table has three candidate keys and one is chosen as primary, how many alternate keys are there?
A
Zero
B
Three
C
One
D
Two
Explanation
The two candidate keys not chosen as primary become alternate keys.
Last verified on 27-11-2026
1055 What is the child table in a foreign key relationship?
A
The table whose primary key is referenced
B
The table containing the foreign key
C
The table with fewer columns
D
The parent table
Explanation
The child (referencing) table contains the foreign key that points to the parent table.
Last verified on 27-11-2026
1056 Can an alternate key contain NULL values?
A
It is defined as allowing NULLs
B
Only if it is a foreign key
C
No, it must be unique and not null in practice if it is to identify rows
D
Always
Explanation
An alternate key is a candidate key, so it must be unique and, to serve as an identifier, should not contain NULLs; in SQL a UNIQUE column may allow one NULL in some systems, but a true candidate key is non-null.
Last verified on 27-11-2026
1057 If DeptID is the primary key of Department and a foreign key in Employee, deleting a department with employees and ON DELETE RESTRICT will:
A
Delete the employees too
B
Block the deletion
C
Delete the department only
D
Set DeptID to NULL in Employee
Explanation
ON DELETE RESTRICT (the default in many systems) blocks deletion of a referenced parent row.
Last verified on 27-11-2026
1058 What is a simple key?
A
A foreign key
B
A key consisting of a single attribute
C
A key consisting of many attributes
D
A key with NULLs
Explanation
A simple key has exactly one attribute, such as EmpID.
Last verified on 27-11-2026
1059 Which constraint is created by a foreign key?
A
CHECK
B
Referential integrity constraint
C
UNIQUE
D
NOT NULL
Explanation
A foreign key creates a referential integrity constraint between the child and parent tables.
Last verified on 27-11-2026
1060 What is a composite key?
A
A key with a single attribute
B
A key consisting of two or more attributes together
C
A foreign key only
D
A key that is also a derived attribute
Explanation
A composite key combines several attributes, and only their combination is unique.
Last verified on 27-11-2026