Table of Contents
DBMS GATE Questions Based on ER Diagram
DBMS GATE Questions Based on ER Diagram are discussed here in this tutorial. Entity Relationship Diagram is an important topic for GATE(CS/IT) and UGC NET exam.
Two types of ER Diagram Questions and answers are generally asked in GATE exam. These types are as follow –
(1) Theoretical conceptual question of one marks.
(2) Problem Solving question such as conversion of Entity Relationship Diagram to Table. In such type types of questions they generally ask that how many tables are required when we convert a given ER Model in to Tables.
So lets see some DBMS GATE Questions Based on Entity Relationship Diagram asked in previous years.
Also Read – Harekala Hajabba Biography
Previous Year GATE Questions Based on ER Diagram
Some ER Diagram Questions and answers asked in GATE Exam are given below-
Q1. Consider an ER diagram given below for Bank database.
Which is the correct statement regarding the above diagram
(a) Bank-Branch is the weak entity
(b) Branch No of the Bank-Branch entity is a partial Key
(c) The Participation of BANK in BRANCHES Relationship is partial
(d) All of the above
Answer : D is the right option
Explanation
All of the above options are true. As per the notation of weak entity, Partial Key and Partial Participation Constraints of Entity Relationship Model in DBMS all the given options are true.
Q2. Consider the given ER Diagram. Lodging is many to many relationship. Rent, Payment to be made by person Occupying different hotel room should be added as an attribute to [GATE 2006]
(a) Hotel (B) Person (C) Lodging (d) None.
Answer : C is the right option
Explanation
Since in this dbms gate questions this is given that relation is many to many so There may be following possibilities
Case 1 : Hotel Entity my participate I many relation it means A hotel room might connect rent from many people therefore Rent can not be add to hotel room.
case 2: If we try to add Rent to person table then it may be incorrect because a particular person my be lodging in various hotel at various time so we can not put all the hotel rent in just one column.
We have to made a separate table for lodging Relationship which contains the attribute Hotel Room No, Person Id and Rent. Same person can be reside in separate hotel for different rent. So Rent can be added to Lodging.
Q3. Which of the following is incorrect about an ER Model. [ Gate 2012]
(a) An attribute of an Entity can have more than one value.
(b) An attribute of an entity can be composite.
(c) In a row of a relational table an attribute can have more than one value.
(d) In a row of a relational table an attribute can have exactly one value or NULL.
Answer : Option C is incorrect
Explanation
In Relational Database Model in a Table or Relation , Row or tuple of the table can not have more than one value for an attribute.
Q4. Consider the given ER Diagram [Gate 2005]
To convert this ER Diagram in to Relation or Table What is the minimum number of tables required ?
Answer: Minimum 3 Tables are required.
Explanation
One Table is required for Entity Set E1 and One table is required for Entity Set E2. Since there is One multi value attribute A23 also present in ER diagram.
So as per the Rule of RDBMS and Conversion from ER Diagram into a Relation or Table. We need a separate table to represent the multi value attribute.
Maximum Number of table will be 4. We can make a separate table for Relationship R but this is not advisable.
Q5. E1 and E2 are two entities and R1, R2 are two relationship between E1 and E2 . R1 is one to many and R2 is many to many. R1 and R2 dose not have any attribute their own What is the minimum number of table needed. ? [GATE 2005]
Answer : Minimum Number of table will be 3 .
Explanation
Because One table is required for Entity set E1 and One Table is needed for E2. Since there is two types of Relationship between E1 and E2.
Relationship R1 is one to many relationship so no need an extra table for it but the Relationship R2 is a many to many Relationship and as per the rule we need a separate table to represent the One to Many Relationship.
Q6. Consider the given ER Model [GATE 2008]
What is the minimum number of table needed ?
Answer: Either 3 or 4
Explanation
IT depends of the types of Relationship R1 whether this is one to many or many to many.
One Table is Required for M , One for P and One Table for N.
Case 1 : If the Relationship R1 is One to many then no need of a separate table for R1 in this case minimum number of table required is 3.
Case 2 : If the Relationship R2 is many to many the there is a need of a separate table for R1 in this case minimum number of table required is 4.
Q7. For the ER Diagram given in Question 6 Which of the following is correct attribute Set for one of the tables for the correct answer to the above question. [GATE 2008]
(a) {M1,M2,M3, P1} (b) { M1, P1, N1,N2} (c) {M1, P1, N1} (d) {M1, P1}
Conclusion and Summary
In this DBMS GATE Questions Based Tutorial we have discussed and explained the ER Diagram Questions and Answers asked in previous year GATE exam.
I hope this Database Management System Tutorial will be helpful for the students who are preparing for GATE exam
I kindly request to readers please give your feedback and suggestion on this er diagram in DBMS based questions tutorial. If you find any mistake in this tutorial then comment.
Don’t stop learning and practice.