chapter

    Er Model, Keys and Integrity Constraints Pyqs for Gate Da

    Solve 3+ Er Model, Keys and Integrity Constraints previous year questions for GATE DA with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 PYQ
    Level 3: Exam Standard
    Consider an ER model with the entities and , where, are the attributes of , and are the attributes of . Let be a multi-valued attribute. and are the primary keys of and , respectively.

    Let be a many-to-many relationship between and . Participation of both and in is total.

    The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
    Question 2
    2026 PYQ
    Level 3: Exam Standard
    Consider two relations r and s defined on the relational schemas R(A,B) and S(E,C), respectively. A is the primary key of R and E is a foreign key of S referencing A in R.
    Which of the following operations will NEVER violate the foreign key constraint?
    Question 3
    2025 PYQ
    Level 3: Exam Standard
    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Er Model, Keys and Integrity Constraints PYQs for GATE DA

    Solve 3+ Er Model, Keys and Integrity Constraints previous year questions for GATE DA with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: ER Model, Keys and Integrity

    Chapter Roadmap

    ER Model, Keys and Integrity Constraints

    This chapter bridges the gap between how we visualize data and how we actually store it. By the end, you will master the translation of conceptual designs into robust logical schemas.

    Topic 1 - Current
    ER-to-Relational Mapping
    Transform ER diagrams into relations. Handle multivalued attributes, weak entities, and complex relationships. (Moderate Weightage)
    Topic 2
    Keys & Foreign Key Integrity
    Master primary, candidate, and super keys. Understand referential integrity, ON DELETE/UPDATE actions, and NULL handling. (High Weightage)

    ER-to-Relational Mapping and Multivalued Attributes

    ER-to-Relational Mapping

    Bridge the gap between conceptual design and logical implementation.

    Strong & Weak Entities:
    Flattening composites and inheriting keys.
    Binary Relationships:
    1:1, 1:N, and M:N mapping rules.
    Multivalued Attributes:
    Achieving First Normal Form through separate relations.
    n-ary Relationships:
    Handling complex multi-entity associations.

    Er Model, Keys and Integrity Constraints: Solved Questions with Step-by-Step Explanations (3 Problems)

    Question 1 · Database Management and Warehousing · 2026 NAT
    Consider an ER model with the entities and , where, are the attributes of , and are the attributes of . Let be a multi-valued attribute. and are the primary keys of and , respectively.

    Let be a many-to-many relationship between and . Participation of both and in is total.

    The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
    Correct Answer:

    4.00

    Step-by-Step Solution

    Insight: Multi-valued attributes require a separate relation, and M:N relationships require a separate relation to achieve 1NF and 3NF.

    Exam route: Count relations for each component. E1 -> 1 relation. E2 with multi-valued A22 -> 2 relations (one for simple attributes, one for multi-valued). M:N relationship R12 -> 1 relation. Total = 1 + 2 + 1 = 4.

    Learning route:

    To convert an ER model to a relational model in 3NF, we follow standard mapping rules:

    1. Strong Entity E1: Maps to 1 relation with PK .
    2. Strong Entity E2: Has a multi-valued attribute . To satisfy 1NF (and thus 3NF), multi-valued attributes must be separated. This creates 2 relations:
    • with PK .
    • with PK .
    1. M:N Relationship R12: Must map to a separate relation containing the primary keys of both participating entities: with PK .

    Total number of relations = 1 (E1) + 2 (E2) + 1 (R12) = 4.

    All resulting relations are in 3NF as there are no transitive dependencies.

    Question 2 · Database Management and Warehousing · 2026 MSQ
    Consider two relations r and s defined on the relational schemas R(A,B) and S(E,C), respectively. A is the primary key of R and E is a foreign key of S referencing A in R.
    Which of the following operations will NEVER violate the foreign key constraint?
    1. A.

      Inserting records into relation r

    2. B.

      Deleting records from relation s

    3. C.

      Deleting records from relation r

    4. D.

      Inserting records into relation s

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Insight: Foreign key constraints restrict child inserts/updates and parent deletes/updates, but never restrict parent inserts or child deletes.

    Exam route: Identify parent (R) and child (S). Parent insert = safe. Child delete = safe.

    Learning route:

    Referential integrity dictates that a foreign key in the child table must match an existing primary key in the parent table.

    When you insert into the parent (R), you are adding a new valid target. No existing child can reference it yet, so no constraint is violated.

    When you delete from the child (S), you are removing a reference. The parent remains intact, and no orphaned records are created in the child, so no constraint is violated.

    Conversely, deleting from the parent (R) might leave orphaned records in S, and inserting into the child (S) might reference a non-existent parent in R.

    Therefore, inserting into R and deleting from S will NEVER violate the foreign key constraint.

    Question 3 · Database Management and Warehousing · 2025 MSQ
    1. A.

      aadhaar is a candidate key in the Customer relation

    2. B.

      phone can be NULL in the Customer relation

    3. C.

      aadhaar is a candidate key in the Person relation

    4. D.

      aadhaar can be NULL in the Person relation

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Insight: Primary keys cannot be NULL and are always candidate keys; foreign keys can be NULL and thus cannot be candidate keys.

    Exam route: Since the question statement is missing, we deduce from standard relational rules and the options. A primary key (aadhaar in Person) cannot be NULL and is a candidate key. A foreign key (aadhaar in Customer) can be NULL, so it is not a candidate key.

    Learning route:

    Note: The question statement is missing from the prompt, but based on the options, this is a standard question about Person and Customer relations where aadhaar is the primary key of Person and a foreign key in Customer.

    1. Option A: aadhaar is a candidate key in Customer. Since it is a foreign key, it can contain NULL values (unless explicitly constrained). Candidate keys cannot contain NULLs. Thus, A is false.
    2. Option B: phone can be NULL in Customer. Without the statement, this is ambiguous. If phone is a candidate key, it cannot be NULL. If it is just a unique or regular attribute, it can be. We exclude it as it depends on missing text.
    3. Option C: aadhaar is a candidate key in Person. Since aadhaar is the primary key of Person, it is by definition a candidate key. Thus, C is unconditionally true.
    4. Option D: aadhaar can be NULL in Person. Primary keys cannot be NULL (Entity Integrity). Thus, D is false.

    The only unconditionally true statement is C.

    More previous year questions (pyqs) in this unit