GATE / CS ARCHIVE

SUBJECT COLLECTION

Database Management Systems · Database Models, Architecture & ER Diagrams

20 questions, newest first

GATE CSE has asked 20 questions on Database Models, Architecture & ER Diagrams (Database Management Systems) from 1992 to 2026, in 16 of the 46 papers; the most recent is in GATE CSE 2026 Set 2. In the last five years it carried 0.5 marks per 100-mark paper on average, against 0.5 since 2003. Since 2014 the questions have been 8 MCQ and 2 NAT. 2 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
1 mark · MCQ
Report issue

Separating database schema levels

Database Models, Architecture & ER Diagrams

Question 15, GATE 2026: Match I logical schema, II physical schema, III external schema with L views, M file organization and indexes, N relations. Options: A I-L,II-M,III-N; B I-M,II-L,III-N; C I-N,II-M,III-L; D I-N,II-L,III-M.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Givens and goal

Match I logical schema, II physical schema, III external schema with L views, M file organization and indexes, N relations. Options: A I-L,II-M,III-N; B I-M,II-L,III-N; C I-N,II-M,III-L; D I-N,II-L,III-M.

Approach

Distinguish what is stored logically, how it is stored, and what a user sees.

Step-by-step solution

1. The logical schema describes database structure at the relation level: tables, attributes, and their logical relationships. It therefore matches N, relations.
2. The physical schema describes storage choices such as file layout and indexes. Those choices determine access paths without changing the logical relation definitions, so II matches M.
3. An external schema is a view of data exposed to a particular user or application. It may hide attributes or combine relations. Hence III matches L.
4. The resulting matching I-N,II-M,III-L is C. For example, a payroll view can remain unchanged while a new B+ tree index is added; this illustrates why external and physical descriptions are separate levels.

Original paper, page 13 · Answer key

1 mark · MCQ
Report issue

Translate relationships into an ER diagram

Database Models, Architecture & ER Diagrams

Question 20, GATE 2024: Choose the ER diagram for: instructors teach courses; students register for courses; courses receive classrooms; instructors guide students. Rectangles denote entities and diamonds denote relationships. A diagram (i) uses a Student diamond and Registration rectangle. B diagram (ii) uses a Projects entity in place of Student. C diagram (iii) directly links Classroom to Course while its Allocation diamond is attached only to Course. D diagram (iv) has entities Instructor, Course, Student, Classroom and relationships Teaches(Instructor,Course), Registration(Student,Course), Allocation(Course,Classroom), Guides(Instructor,Student).
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Approach: Identify the objects first, then check the two endpoint entities of each relationship.
1. The four object categories are Instructor, Course, Student and Classroom. These must be entity rectangles. The verbs or associations become relationship diamonds: Teaches, Registration, Allocation and Guides.
2. Teaches must connect Instructor to Course; Registration must connect Student to Course; Allocation must connect Course to Classroom; Guides must connect Instructor to Student. Diagram (iv) satisfies all four requirements.
3. Diagram (i) interchanges the semantic roles of Student and Registration, using the wrong kinds of symbols. Diagram (ii) introduces Projects instead of the specified Student entity.
4. Diagram (iii) has a direct Classroom–Course edge and does not connect Classroom through Allocation; the named allocation relationship is therefore not properly represented.
Answer: D. The specification does not give cardinality constraints such as one-to-many, so there is no need to invent them when selecting the diagram.

Original paper, page 14 · Answer key

1 mark · MCQ
Report issue

Mandatory participation of a weak entity

Database Models, Architecture & ER Diagrams

Question 20, GATE 2024: In an ER model, what participation in an identifying relationship is mandatory? A total participation of the weak entity set; B total participation of the owner entity set; C both sets must participate totally; D neither must.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Approach: Distinguish the dependent entity from the entity that supplies its identity.

1. Derivation. A weak entity needs its identifying owner relationship to determine its identity; every weak entity therefore participates. An owner may exist with no dependent weak entity unless a separate application constraint requires one. Thus total participation is mandatory for the weak entity set only, option A.

2. Explanation and checks. For example, a dependent identified by an employee identifier together with a dependent-name discriminator cannot exist in this model without an employee owner. However an employee can have no dependents and still have its own identity. “Total participation” means every entity in that set appears in the relationship; it does not mean every possible owner–dependent pair is related. Thus mandatory dependence flows from weak entity to owner, not in both directions.

Original paper, page 14 · Answer key

1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 16, GATE 2023: What is a relation's degree or arity? A number of attributes; B number of tuples; C number of entries; D number of distinct attribute domains.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The degree or arity of a relation is its number of attributes/columns. Its number of tuples is its cardinality, and multiple attributes may share a domain. Therefore A.

Teaching detail. For example, a Student relation with columns rollNum, name, gender, marks has degree 4 whether it contains zero rows or a million rows. Its cardinality changes when rows are inserted, but its arity changes only if the schema's attribute count changes. Two columns can share the same domain, such as two integer-valued attributes, so counting distinct domains can undercount attributes. “Entries” is not the precise schema-level definition sought here.

Original paper, page 13 · Answer key

1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 6, GATE 2021: Relational model statements: S1 a relation schema has at most one foreign key; S2 a foreign key in R cannot refer to tuples of R itself. A both; B only S1; C only S2; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

A relation can have several foreign keys, for example managerId and departmentId. It can also reference itself, as managerId referencing another employee in the same employee relation. Both proposed restrictions are false, D.

A concrete schema is Employee(id,managerId,deptId), where managerId references Employee(id) and deptId references Department(id). It simultaneously refutes both claims. A foreign key enforces referenced-key membership; it does not impose a one-foreign-key limit or require a different relation name.

Original paper, page 58 · Answer key

1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 14, GATE 2020: In an ER diagram, which symbol denotes the supporting many-to-one relationship for a weak entity? A double/bold diamond; B double/bold rectangle; C double/bold oval; D oval with underlined identifier.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Worked explanation

In Chen notation, shape and border encode different information. A rectangle denotes an entity, an oval an attribute, and a diamond a relationship. A double rectangle marks a weak entity whose identity depends on an owner. The supporting identifying relationship is correspondingly the double diamond. A double oval normally represents a multivalued attribute, and underlining an attribute name indicates key information, not a relationship. Because the question asks about the relationship rather than the weak entity itself, A rather than B is required.

Derivation and answer

The identifying relationship connecting a weak entity to its owner is shown by a double-bordered diamond in the standard Chen ER notation. A double rectangle denotes the weak entity itself. Thus A.

Original paper, page 7 · Answer key

1 mark · MCQ
Report issue

Total participation in many-to-one relations

Database Models, Architecture & ER Diagrams

Question 11, GATE 2018: R is a many-to-one relation E1→E2. Both entity sets participate totally and |E1|>|E2|. Which holds? A each E1 entity has exactly one E2 partner; B some E1 entity has multiple E2 partners; C each E2 entity has exactly one E1 partner; D each E2 entity has at most one E1 partner.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Method

Treat the relation as a mapping from E1 into E2. “Many-to-one” imposes an upper bound of one on each E1 entity’s partners, and “total participation” imposes a lower bound of one. Together they force exactly one. On the E2 side total participation makes the map surjective, while the larger source cardinality invokes the pigeonhole principle: at least one E2 entity receives two or more partners.

Solution

Many-to-one permits at most one E2 target per E1 entity. Total participation of E1 supplies at least one, hence exactly one. Total participation of E2 and |E1|>|E2| ensure some E2 target has multiple preimages, not exactly one each. Thus A.

Original paper, page 6 · Answer key

1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 17, GATE 2017: In an ER model, entity types A and B are related by R, which has no attributes of its own. When can the relational table for R be merged into A? A:R is one-to-many and A participates totally. B:one-to-many and A participates partially. C:many-to-one and A participates totally. D:many-to-one and A participates partially. Cardinalities are read from A to B.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C under nonnullable merge convention

1. Merging R into A means representing an A entity's partner by storing a B key in its row, instead of using a separate relationship row. A single such field can represent at most one B partner for each A. Thus the appropriate direction is many A entities to one B entity, not one A to many B entities.

2. Under the conventional null-free merge rule, every A must have a partner so that each A row has a valid B key. Total participation provides this guarantee. These two conditions yield the intended option C.

3. The wording leaves a modeling caveat: with nullable foreign keys, an A that does not participate can use NULL, so many-to-one with partial participation, D, can also be represented in A. Official C is retained under the nonnullable conventional criterion rather than treating D as impossible in SQL generally.

Original paper, page 7 · Answer key

1 mark · NAT
Report issue

Database Models, Architecture & ER Diagrams

Question 19, GATE 2017: T1(P,Q) contains (2,2),(3,8),(7,3),(5,8),(6,9),(8,5),(9,8). T2(R,S) contains (2,2),(8,3),(3,2),(9,7),(5,7),(7,2). P and R are their primary keys. T1.Q references T2.R with ON DELETE CASCADE and ON UPDATE CASCADE. T2.S references T1.P with ON DELETE SET NULL and ON UPDATE CASCADE. Delete (3,8) from T1. How many additional T1 records must be deleted?
Tap to enlarge
Answer & solution

Official answer: 0.0

Our answer: 0

1. Follow the incoming foreign-key references to the deleted key P=3. In T2, only row (R=8,S=3) references this value through S. Its specified action is ON DELETE SET NULL, so it becomes (8,NULL).

2. Crucially, this action neither deletes the T2 row nor changes its primary key R=8. The references from T1.Q to T2.R remain valid, including Q=8 values in other T1 rows.

3. T1's ON DELETE CASCADE would apply if a referenced T2 row were deleted; that has not happened. Nor has a referenced primary key been updated. Thus no cascade returns to T1 and the number of additional deletions is 0. A change to a foreign-key field is not automatically a change to the key referenced by the opposite table.

Original paper, page 8 · Answer key

2 marks · NAT
Report issue

Database Models, Architecture & ER Diagrams

Question 48, GATE 2015: Entities E1,E2,E3 have single-valued attributes (a11 key,a12),(a21 key,a22),(a31 key,a32). E1–E2 has m:n relationship R12; E1–E3 has 1:n R13, n on E3 side. Relationships have no attributes. Find minimum relations when all are in 3NF.
Tap to enlarge
Answer & solution

Official answer: 4

Construct E1(a11,a12), E2(a21,a22), E3(a31,a32,a11), and R12(a11,a21). E3's added a11 foreign key records its single associated E1 without a separate R13 table. R12 needs a separate association relation because either entity may participate in multiple pairs. Given only the stated dependencies, these four relations meet 3NF; merging an entity's nonkey attributes into R12 would introduce redundant dependencies.

Solution: Use one relation for each of the three entity types. Implement the 1: n relationship by a foreign key on the n side, requiring no extra relation. The m: n relationship needs its own relation containing the participating keys. Thus four relations suffice under the displayed constraints.

Original paper, page 18 · Answer key

1 mark · MCQ
Report issue

Atomic attributes in the basic relational model

Database Models, Architecture & ER Diagrams

Question 14, GATE 2012: Given the basic ER and relational models, which of the following is INCORRECT?
        (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 a NULL value
Tap to enlarge
Your answer
Answer & solution

Official answer: C

The basic ER model can represent composite and multivalued attributes. In the ordinary first-normal-form relational representation, however, each cell contains a single atomic value (or the SQL-style NULL marker admitted by the options), not several values for that attribute. Therefore C is the incorrect statement. Multivalued ER attributes need a separate relational representation.

Check: An ER address can have components such as city and postcode, and an ER person can have several phone numbers. Mapping to relations separates components into columns and multiple phone values into rows of a related table rather than storing a set in one atomic cell.

Original paper, page 4 · Answer key

2 marks · MCQ
Report issue

Minimum relations for an ER diagram

Database Models, Architecture & ER Diagrams

Question 82, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. What is the minimum number of tables in the standard relational mapping?

(A) 2
(B) 3
(C) 4
(D) 5
Question 82, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. What is the minimum number of tables in the standard relational mapping?

(A) 2
(B) 3
(C) 4
(D) 5
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Use three relations: P(P1,P2), M(M1,M2,M3,P1), and N(P1,N1,N2). R1 is many-to-one from M to P with total participation of M, so a P1 foreign key in M represents it without a separate relationship table.
2. N is weak, R2 is its identifying many-to-one relationship with P, and N1 is the partial key; include P1 in N, whose primary key is (P1,N1). Thus the standard ER-to-relational mapping needs three tables, option B.

Original paper, page 18

2 marks · MCQ
Report issue

Attributes in the mapped M relation

Database Models, Architecture & ER Diagrams

Question 83, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. In the minimum-table standard mapping, which is the attribute set of one resulting table?

(A) {M1,M2,M3,P1}
(B) {M1,P1,N1,N2}
(C) {M1,P1,N1}
(D) {M1,P1}
Question 83, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. In the minimum-table standard mapping, which is the attribute set of one resulting table?

(A) {M1,M2,M3,P1}
(B) {M1,P1,N1,N2}
(C) {M1,P1,N1}
(D) {M1,P1}
Question 83, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. In the minimum-table standard mapping, which is the attribute set of one resulting table?

(A) {M1,M2,M3,P1}
(B) {M1,P1,N1,N2}
(C) {M1,P1,N1}
(D) {M1,P1}
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. The many-to-one R1 relationship associates each M with a unique P. Total participation means every M must have that owner/reference.
2. Store P’s key P1 as a foreign key beside M’s own attributes M1,M2,M3; a separate R1 table is unnecessary.
3. Thus M’s table has {M1,M2,M3,P1}, A. N is represented separately by owner key P1, partial key N1 and N2; there is no direct M-to-N relationship to justify the other sets.

Original paper, page 18

2 marks · MCQ
Report issue

Tables for two entity relationships

Database Models, Architecture & ER Diagrams

Question 75, GATE 2005: Two ER entities E1, E2 have simple single-valued attributes and two relationships between them: R1 one-to-many and R2 many-to-many, neither with attributes. Minimum relational tables: A2; B3; C4; D5.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Use one table for each entity set. The one-to-many relationship is represented by placing the one-side key as a foreign key in the many-side table, so it needs no separate table. The many-to-many relationship needs a third junction table containing the two entity keys. Minimum: three tables, option B.

Represent each entity type by a table, giving two. The many side of R1 can store the one-side primary key, since each many-side instance relates to at most one one-side instance; no junction table is necessary. R2 needs a junction table because either side can have several partners. Its pair of foreign keys records each pair, bringing the minimum to three.

Original paper, page 10

2 marks · MCQ
Report issue

Transitive cascading deletion

Database Models, Architecture & ER Diagrams

Question 76, GATE 2005: Table(A, C), primary key A, C references A ON DELETE CASCADE, contains (2, 4),(3, 4),(4, 3),(5, 2),(7, 2),(9, 5),(6, 4). Besides(2, 4), which rows must be deleted when it is removed? A(3, 4),(6, 4); B(5, 2),(7, 2); C(5, 2),(7, 2),(9, 5); D(3, 4),(4, 3),(6, 4).
Question 76, GATE 2005: Table(A, C), primary key A, C references A ON DELETE CASCADE, contains (2, 4),(3, 4),(4, 3),(5, 2),(7, 2),(9, 5),(6, 4). Besides(2, 4), which rows must be deleted when it is removed? A(3, 4),(6, 4); B(5, 2),(7, 2); C(5, 2),(7, 2),(9, 5); D(3, 4),(4, 3),(6, 4).
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Deleting key A=2 directly deletes the referencing rows (5, 2) and (7, 2). Deleting A=5 in turn deletes (9, 5). Nothing points to 7 or 9 in the displayed instance. Rows (3, 4),(4, 3),(6, 4) do not depend on key 2 and remain. The additional deletion set is {(5, 2),(7, 2),(9, 5)}, option C.

Follow references toward deleted primary-key values, not outward along the deleted row’s own foreign key. Removing key 2 first removes rows with C=2, namely 5 and 7. Removing key 5 then removes row 9. No remaining row points to 7 or 9. The cycle 3↔4 and row 6→4 are unrelated to deletion of 2, so they survive. Cascades must be followed transitively, which is why choice B is incomplete.

Original paper, page 10

2 marks · MCQ
Report issue

Recursive deletion through a self-referencing foreign key

Database Models, Architecture & ER Diagrams

Question 2.25, GATE 2001: Table geq has nonnull integer lb,ub, primary key lb, and self-referencing foreign key ub with ON DELETE CASCADE. Every row(x,y) obeys y≥x. On deleting(x,y), can a cascaded row(z,w) have z>y, z>x, or w<x, or must deletion be prohibited?
Question 2.25, GATE 2001: Table geq has nonnull integer lb,ub, primary key lb, and self-referencing foreign key ub with ON DELETE CASCADE. Every row(x,y) obeys y≥x. On deleting(x,y), can a cascaded row(z,w) have z>y, z>x, or w<x, or must deletion be prohibited?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Deleting parent key x directly cascades to rows(z,w) with w=x. Since every row obeys w≥z, these direct children have z≤x. Cascades continue to their children, so keys along a deletion chain cannot increase. Options requiring z>x or z>y≥x are therefore impossible.

Step 2: A deeper descendant can have w<x. For example the legal rows(3,3),(2,3),(1,2) satisfy the ordering and foreign key. Deleting(3,3) cascades to(2,3) and then(1,2), whose upper value 2 is less than the original x=3.

Thus C is possible. ON DELETE CASCADE means the mere presence of dependent rows does not prohibit the deletion; self-reference is handled by the database’s cascade semantics.

Original paper, page 7

2 marks · MCQ
Report issue

Operations that can violate a foreign key

Database Models, Architecture & ER Diagrams

Question 6.10, GATE 1997: S.d references the primary key of R. Which can violate this reference: insert R, insert S, delete R, delete S?
Question 6.10, GATE 1997: S.d references the primary key of R. Which can violate this reference: insert R, insert S, delete R, delete S?
Tap to enlarge
Your answer
Answer & solution

Answer: D: insert S and delete R (no official key was published)

Inserting into S can introduce a nonnull d value absent from R. Deleting a referenced row from R can leave existing S rows without a parent. These are operations 2 and 3, D. Inserting a valid new R row cannot remove an existing reference target; deleting an S row removes a referencing requirement. This concerns the foreign-key constraint specifically, not a separate duplicate-primary-key violation on insertion into R. A DBMS may reject or cascade dangerous operations, but those enforcement policies do not change which raw changes can create a violation.

Original paper, page 6

Report issue

Logical versus physical data independence

Database Models, Architecture & ER Diagrams

Question 3.11, GATE 1994: True or false: logical data independence is easier to achieve than physical data independence.
Tap to enlarge
Answer & solution

Answer: False (no official key was published)

Physical data independence hides changes such as indexes, file organization and storage placement behind an unchanged logical schema. Applications can often remain unaffected. Logical data independence must hide changes to the conceptual schema itself, such as restructuring relations or attributes, while preserving external views and application meaning. That generally requires more semantic translation and is harder. Therefore the source reverses the usual difficulty comparison. This is a database-design principle, not an assertion that every individual physical change is trivial.

Original paper, page 4

Report issue

Reducing redundancy in the hierarchical model

Database Models, Architecture & ER Diagrams

Question 13(a.i), GATE 1992: Give a one-line answer: how is redundancy reduced in the hierarchical database model?
Question 13(a.i), GATE 1992: Give a one-line answer: how is redundancy reduced in the hierarchical database model?
Question 13(a.i), GATE 1992: Give a one-line answer: how is redundancy reduced in the hierarchical database model?
Tap to enlarge
Answer & solution

Answer: Store shared parent information once above its children; systems supporting logical/virtual child links can reference a shared record rather than duplicate it. (no official key was published)

One-line answer: Store shared parent information once above its children; systems supporting logical/virtual child links can reference a shared record rather than duplicate it.

Why this works: A parent such as a department need not have its name and address copied into every employee child. A pure tree, however, gives each child one parent and does not automatically remove duplication for many-to-many relationships. Logical relationships or virtual/pointer records are implementation extensions, not a universal property of every hierarchical model.

Redundancy means repeatedly storing the same fact, not merely having repeated key values. Keys or links may legitimately recur to express relationships. These are design mechanisms rather than a claim that the model makes every possible database free of redundancy.

Original paper, page 9

Report issue

Reducing redundancy in the network model

Database Models, Architecture & ER Diagrams

Question 13(a.ii), GATE 1992: Give a one-line answer: how is redundancy reduced in the network database model?
Question 13(a.ii), GATE 1992: Give a one-line answer: how is redundancy reduced in the network database model?
Question 13(a.ii), GATE 1992: Give a one-line answer: how is redundancy reduced in the network database model?
Tap to enlarge
Answer & solution

Answer: Store an entity record once and represent its multiple owner/member relationships by links instead of repeating its data. (no official key was published)

One-line answer: Store an entity record once and represent its multiple owner/member relationships by links instead of repeating its data.

Why this works: A network model allows a record to participate in multiple set relationships. A course shared by several student relationships can be stored as one course record with relationship links or connector records, rather than duplicating the course attributes for each student. The relationships still occupy space; the reduction is in repeated entity facts.

Redundancy means repeatedly storing the same fact, not merely having repeated key values. Keys or links may legitimately recur to express relationships. These are design mechanisms rather than a claim that the model makes every possible database free of redundancy.

Original paper, page 9