Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
631 What is the primary key of a weak entity usually made of?
A
A single surrogate key only
B
A combination of the owner entity's primary key and the weak entity's partial key
C
A foreign key alone
D
A derived attribute
Explanation
A weak entity is usually identified by the owner entity's primary key combined with its own partial key.
Last verified on 27-11-2026
632 A Room in a Hotel system is identified by RoomNo plus HotelID. What kind of entity is Room?
A
Strong entity
B
Self-referencing entity
C
Weak entity, dependent on Hotel
D
Lookup entity
Explanation
A room number repeats in different hotels, so Room needs HotelID from its owner to be uniquely identified.
Last verified on 27-11-2026
633 In mapping, what is the partial key of a weak entity?
A
The owner's primary key
B
A foreign key to another table
C
The surrogate key of the owner
D
The attribute that identifies the weak entity only within its owner, such as LineNo within an Order
Explanation
The partial key, or discriminator, distinguishes weak entities of the same owner, and combined with the owner key it forms the full key.
Last verified on 27-11-2026
634 Why is a junction table sometimes called an associative entity?
A
Because it represents the relationship itself as an entity, and can have its own attributes
B
Because it is a parent table
C
Because it has no primary key
D
Because it links three tables
Explanation
An associative entity turns a relationship into a table, so it can store facts about the link, such as enrolment date or quantity.
Last verified on 27-11-2026
635 Which scenario needs a ternary relationship rather than three binary ones?
A
A Customer places an Order
B
A Doctor prescribes a Drug to a Patient, where the three together form one treatment event
C
A Student enrols in a Course
D
An Employee works in a Department
Explanation
The prescription only makes sense as a three-way link, because the doctor, drug and patient are tied together in one event.
Last verified on 27-11-2026
636 How is a ternary relationship mapped into tables?
A
By adding three foreign keys to one table
B
By merging the three entities into one table
C
By creating a junction table with three foreign keys, one to each participating entity
D
By using three separate junction tables
Explanation
A ternary link needs one junction table holding a foreign key to each of the three entities, with the three together usually forming the key.
Last verified on 27-11-2026
637 What is referential integrity in the context of a junction table?
A
The junction table must have no primary key
B
Only one foreign key needs to match
C
The junction table needs no foreign keys
D
Each foreign key in the junction table must match an existing row in its own parent table
Explanation
A junction row links two real entities, so both foreign keys must point to existing parent rows or the link is invalid.
Last verified on 27-11-2026
638 If a Student is deleted, what should happen to their rows in the Enrolment junction table?
A
They should be deleted by ON DELETE CASCADE, or the delete should be blocked
B
They should remain, pointing to a deleted student
C
They should be set to null
D
They should be moved to the Course table
Explanation
Enrolment rows for a deleted student would be orphans, so they must be cascaded away or the delete must be prevented.
Last verified on 27-11-2026
639 In a many-to-many relationship, if the junction table is deleted, what happens to the original tables?
A
The original tables are also deleted
B
Only the links between them are lost; the entities themselves remain
C
The original tables lose their primary keys
D
The entities are merged
Explanation
The junction table stores only the links, so deleting it removes associations but leaves Students and Courses intact.
Last verified on 27-11-2026
640 In a one-to-many relationship, can the many-side table have more than one foreign key?
A
No, it can have only one foreign key
B
Yes, it can link to several different parent tables at once
C
Yes, but only to the same parent
D
No, foreign keys are only in junction tables
Explanation
A child table can hold several foreign keys, for example an Order can reference both a Customer and a DeliveryAddress, each a separate one-to-many link.
Last verified on 27-11-2026