Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
611 Which of the following is a binary relationship with degree two?
A
Employee manages Employee
B
Doctor prescribes Drug to Patient
C
Student enrols in Course
D
Part contains Part
Explanation
Student-Course connects two different entities, so it is binary, while the others are unary or ternary.
Last verified on 27-11-2026
612 A Shop has Customers and LoyaltyCards. Each customer may have one card and each card belongs to one customer, but a card is optional. How is this mapped?
A
With a junction table
B
With a foreign key in the Customer table with no constraint
C
With a nullable unique foreign key in the LoyaltyCard table referencing Customer
D
By merging the tables always
Explanation
The UNIQUE foreign key enforces one-to-one, while allowing null means a customer can exist without a card.
Last verified on 27-11-2026
613 How do you enforce a one-to-one relationship in SQL if both tables already exist?
A
Remove the primary key
B
Add a junction table
C
Add a second primary key
D
Add a foreign key in one table and a UNIQUE constraint on that foreign key column
Explanation
The foreign key creates the link and the UNIQUE constraint limits it to one row per parent, which together enforce one-to-one.
Last verified on 27-11-2026
614 Which normal form is violated if a table stores a list of phone numbers in one column?
A
Boyce-Codd normal form
B
Second normal form
C
Third normal form
D
First normal form, because values must be atomic
Explanation
First normal form requires each column value to be atomic, so a list of numbers in one cell breaks it.
Last verified on 27-11-2026
615 A Vehicle and its Engine have a one-to-one link. The Engine table uses VehicleID as both its primary key and foreign key. What is this pattern called?
A
Shared primary key
B
Composite key
C
Junction table
D
Surrogate key
Explanation
In the shared primary key pattern, the child table reuses the parent primary key as its own primary key and foreign key.
Last verified on 27-11-2026
616 What happens to a one-to-one child row if its parent row is deleted with ON DELETE CASCADE?
A
The child row remains with a null key
B
The child row is deleted as well
C
The delete is blocked
D
The child becomes the parent
Explanation
CASCADE removes the dependent child row together with its parent, so no orphan child remains.
Last verified on 27-11-2026
617 In a one-to-many link, what does it mean if the foreign key is in the parent table instead of the child table?
A
It means the relationship is many-to-many
B
It is the correct design
C
It is a design error, because one parent row cannot store many child IDs in a single column
D
It means the relationship is one-to-one
Explanation
A single foreign key column in the parent cannot hold many child IDs, so the link must live on the many side.
Last verified on 27-11-2026
618 Why is it wrong to store a list of OrderIDs in a Customer row?
A
It is required for one-to-many links
B
It is the fastest design
C
It saves space
D
It violates first normal form, makes joins hard and prevents referential integrity checks
Explanation
A list in one column is not atomic, cannot be joined or indexed properly, and cannot be checked against the Order table.
Last verified on 27-11-2026
619 Which query correctly finds customers with no orders?
A
SELECT * FROM Customer WHERE CustomerID NOT IN (SELECT CustomerID FROM Orders);
B
SELECT * FROM Customer WHERE CustomerID IN (SELECT CustomerID FROM Orders);
C
SELECT * FROM Orders WHERE CustomerID IS NULL;
D
SELECT * FROM Customer WHERE CustomerID = Orders;
Explanation
Customers with no orders are those whose ID never appears as a foreign key in Orders, so NOT IN or a LEFT JOIN with IS NULL finds them.
Last verified on 27-11-2026
620 A university changes its grading scale, so a student’s grade in a course changes. Which table should be updated in a Student-Course design?
A
The Student table only
B
The Enrolment junction table, because the grade is an attribute of that enrolment
C
The Course table only
D
The junction table's primary key
Explanation
The grade belongs to a specific student in a specific course, so it is stored in the junction table that links them.
Last verified on 27-11-2026