Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
501 Which is an example of a unary relationship?
A
A Book is written by an Author
B
An Employee manages another Employee, within the same entity type
C
An Order belongs to a Customer
D
A Student enrols in a Course
Explanation
Unary means one entity type participates, with two roles, as in a self-referencing relationship.
Last verified on 27-11-2026
502 Why is a relationship NOT the same as a foreign key?
A
They are identical in every model
B
A relationship is a foreign key by another name
C
A foreign key is conceptual, a relationship is physical
D
A relationship is a conceptual association, while a foreign key is one physical way to implement it in tables
Explanation
The ER relationship describes meaning, while the foreign key is the relational mechanism that enforces it in the database.
Last verified on 27-11-2026
503 A university rule says a Lecturer may teach many Courses and a Course may be taught by many Lecturers. What is the relationship type?
A
One-to-many
B
Self-referencing
C
One-to-one
D
Many-to-many
Explanation
Both sides can have many of the other, so the relationship is M:N and needs a junction table.
Last verified on 27-11-2026
504 In a 1:N relationship, which side holds the foreign key after mapping to tables?
A
The one side
B
Both sides
C
The many side
D
Neither side
Explanation
The many side stores the foreign key pointing to the one side, allowing many children to share one parent.
Last verified on 27-11-2026
505 In a M:N relationship, how many foreign keys does the junction table contain?
A
Zero
B
Two, one for each participating entity
C
Three
D
One
Explanation
The junction table links two tables, so it needs one foreign key to each of them.
Last verified on 27-11-2026
506 Which referential action would you choose if deleting a Category should delete all its Products, but deleting a Product should never delete its Category?
A
ON DELETE CASCADE on Category.ProductID
B
ON DELETE RESTRICT on Product.CategoryID
C
ON DELETE CASCADE on Product.CategoryID, because the cascade runs from parent to child only
D
ON DELETE SET NULL on Category.ProductID
Explanation
CASCADE is directional: it propagates from the referenced parent to the referencing child, not in reverse.
Last verified on 27-11-2026
507 What is the effect of ON DELETE CASCADE on a junction table when a Student is deleted?
A
All Student rows are deleted
B
Only that student's Enrolment rows are removed; Course rows are untouched
C
All Course rows are deleted
D
The Enrolment rows remain with NULL StudentID
Explanation
CASCADE on the junction table deletes links, not the entities on the other side of the relationship.
Last verified on 27-11-2026
508 A company deletes a Project with ON DELETE SET NULL on Assignment.ProjectID. What happens to the assignments?
A
The delete is rejected
B
They are deleted
C
They move to another project automatically
D
They are kept but ProjectID becomes NULL
Explanation
SET NULL preserves assignment history while clearing the link to the deleted project.
Last verified on 27-11-2026
509 Which referential action is most appropriate for a mandatory OrderItem that cannot exist without its Order?
A
ON DELETE SET NULL
B
ON DELETE CASCADE
C
ON DELETE SET DEFAULT
D
ON DELETE NO ACTION
Explanation
An OrderItem has no meaning without its Order, so deleting the order should delete its items.
Last verified on 27-11-2026
510 If ON DELETE RESTRICT is set and a user tries to delete a referenced Author, what should the application do first?
A
Change the AuthorID to NULL
B
Set the AuthorID to zero
C
Delete or reassign the author's Books, then delete the Author
D
Delete the Author directly and ignore the error
Explanation
RESTRICT blocks the delete while children exist, so the dependent rows must be handled first.
Last verified on 27-11-2026