This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1How many entities are associated in the quaternary relationship in E—R modelling?
Option C
In E–R (Entity–Relationship) modelling, a relationship represents an association among entities. Relationships are classified according to the number of participating entities.
| Relationship Type | Number of Entities |
|---|---|
| Unary Relationship | 1 |
| Binary Relationship | 2 |
| Ternary Relationship | 3 |
| Quaternary Relationship | 4 |
A quaternary relationship involves four different entities participating together in a single relationship.
For example, if we have four entities such as Student, Teacher, Subject, and Classroom, and all four entities participate together in a single relationship, then it is called a quaternary relationship.
Q: 2Let A and B be two entities in and E—R diagram with simple single value attributes. R1 and R2 are two relationships between M and N. R1 is one-to-many from A to B. R2 is many-to-many from A to B. What is the minimum number of tables required to represent A, B, R1 and R2 in the relational mode?
Option D
In ER-to-relational mapping, each entity set becomes a separate table. Therefore, entities A and B require two tables.
For relationships:
A one-to-many (1:N) relationship (R1) can be implemented by adding the primary key of entity A as a foreign key in table B, so no separate table is required.
A many-to-many (M:N) relationship (R2) cannot be represented using a foreign key alone, so it requires a separate relation, containing the primary keys of A and B.
Thus, total 3 tables required:
Q: 3In ER Model, which of the following relationship is correct for a condition that a person in INDIA has an Aadhaar Card?
Option A
In India, each person has only one Aadhaar Card, and each Aadhaar number belongs to only one person.
This is a One-to-One (1:1) relationship in the ER Model.
Q: 4Assume a one-to-many relationship from table named “authors” to the table named “books”. Where should the foreign key reside in an optimal design for this relationship?
Option A
In a one-to-many relationship, one record in the parent table can be associated with multiple records in the child table. The foreign key is placed in the child table to reference the primary key of the parent table.
In this case, one author can write many books, so the authors table is the parent table and the books table is the child table. Therefore, the foreign key referencing the author’s primary key should be stored in the “books” table.
Q: 5Which of the following is suitable for a derived attribute?
Option C
A derived attribute is an attribute whose value can be calculated from other stored attributes.
Q: 6If an entity appears in not more than 5 relationships then it is a
Option B
In E-R modeling, cardinality defines how many instances of one entity can be associated with instances of another entity.
The statement says, “an entity appears in not more than 5 relationships” this means, one instance of an entity can be related to maximum 5 instances of another entity. This represents a 1:5 relationship.
| Relationship Type | Meaning |
|---|---|
| 1:1 | One Entity : One related Entity |
| 1:N | One Entity : Many Entities |
| N:1 | Many Entities : One Entity |
| M:N | Many Entities : Many Entities |
Q: 7Which of the following is an example of a composite attribute?
Option A
A composite attribute is an attribute that can be divided into smaller sub-attributes.
Address can be broken into House No, Street, City, State, and PIN Code, so it is a composite attribute.
Age, City and State are the simple attributes and cannot be meaningfully divided further.
Q: 8Which of the following is a bottom-up approach?
Option B
Generalization is a bottom-up approach where lower-level entities are combined to form a higher-level, more general entity.
Specialization is a top-down approach, where a higher-level entity is divided into lower-level entities.
Q: 9The E-R (Entity-Relationship) modeling technique follows which approach?
Option A
E-R modeling is primarily a Top-Down approach to database design. It starts with identifying high-level entities and relationships in the real world and then gradually breaks them down into attributes and detailed structures.
Q: 10When an E-R model is converted to a relational database
Option C
When an E-R model is converted into a relational database, the goal is to represent all data and relationships in the form of tables while maintaining data integrity.
Entities are directly mapped to tables, where:
Relationships are handled based on their type:
Note:
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.