Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
321 What does a foreign key constraint prevent?
Explanation
A foreign key constraint requires every foreign key value to match an existing primary key value or be NULL.
Last verified on 27-11-2026
322 A table can have how many PRIMARY KEY constraints?
Explanation
- A table can have only one primary key, although it may consist of several columns as a composite key.
- Additional unique columns use UNIQUE constraints.
Last verified on 27-11-2026
323 Which action is typically prevented by ON DELETE RESTRICT on a foreign key?
Explanation
- ON DELETE RESTRICT blocks deletion of a parent row while child rows reference it.
- CASCADE would delete the children instead.
Last verified on 27-11-2026
324 Which constraint links a column in one table to the primary key of another table?
Explanation
- A foreign key creates a link between tables and enforces referential integrity.
- It must match an existing primary key value or be NULL.
Last verified on 27-11-2026
325 Which referential action should be used when child rows have no meaning without their parent row?
Explanation
ON DELETE CASCADE deletes child rows with the parent row, which is correct when the children cannot exist meaningfully on their own.
Last verified on 27-11-2026
326 What happens if you try to insert a child row whose foreign key value does not exist in the parent table?
Explanation
- Referential integrity rejects a child row that refers to a non-existent parent.
- The parent row must exist first.
Last verified on 27-11-2026
327 Which constraint checks that a value satisfies a specified condition, such as Age >= 18?
Explanation
- CHECK enforces a condition on values in a column.
- For example CHECK (Age >= 18) rejects ages below 18.
Last verified on 27-11-2026
328 What is the purpose of a DEFAULT constraint?
Explanation
- DEFAULT provides a value automatically when an INSERT omits the column.
- For example DEFAULT 'Active' fills the status column.
Last verified on 27-11-2026
329 Which statement is true about normalization and redundancy?
Explanation
- Normalization removes uncontrolled duplication, but keys and controlled copies remain.
- Foreign keys themselves repeat key values by design.
Last verified on 27-11-2026
330 If a table has no redundancy at all, can anomalies still occur?
Explanation
- The classic insertion, deletion and update anomalies arise from redundancy.
- Other errors such as constraint violations are a different problem.
Last verified on 27-11-2026