chapter

    Relational Model, Er Design and Schema Architecture Pyqs for Gate Cs

    Solve 6+ Relational Model, Er Design and Schema Architecture previous year questions for GATE CS with answers and detailed solutions. Free sample questions be

    Try a question

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

    Question 1
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    In the context of DBMS, consider the two sets T and S given below.

    TS
    I: Logical schemaL: Views
    II: Physical schemaM: File organization and indexes
    III: External schemaN: Relations


    Which one of the following is the correct match from T to S ?
    Question 2
    2024 Slot Set2 PYQ
    Level 3: Exam Standard

    In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?

    Question 3
    2024 Slot Set1 PYQ
    Level 3: Exam Standard
    Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?

    Instructor Teaches Course Registration Classroom Allocation Student Guides (i) Instructor Teaches Course Classroom Allocation Registration Projects Guides (ii) Instructor Teaches Course Classroom Allocation Registration Student Guides (iii) Instructor Teaches Course Classroom Allocation Registration Student Guides (iv)
    Question 4
    2023 PYQ
    Level 3: Exam Standard

    Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?

    Question 5
    2023 PYQ
    Level 3: Exam Standard
    Consider the following table named Student in a relational database. The primary key of this table is rollNum.

    Student
    rollNumnamegendermarks1NamanM622AliyaF703AliyaF804JamesM825SwatiF65

    The SQL query below is executed on this database.

    SELECT *
    FROM Student
    WHERE gender = ‘F’ AND
       marks > 65;

    The number of rows returned by the query is __________.
    Question 6
    2021 Slot Set2 PYQ
    Level 3: Exam Standard
    Consider the following statements S1 and S2 about the relational data model:

    S1: A relation scheme can have at most one foreign key.
    S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.

    Which one of the following choices is correct?
    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.

    Relational Model, Er Design and Schema Architecture PYQs for GATE CS

    Solve 6+ Relational Model, Er Design and Schema Architecture previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: Relational Model, ER Design and Schema Architecture

    Chapter Journey

    1
    ER Modeling & Weak Entities
    Design databases visually • Foundational topic
    Master: Entity types, cardinalities, weak vs strong entities
    2
    Relational Schemas & Keys
    Convert ER to tables • High importance
    Master: Primary/Foreign keys, referential integrity
    3
    Three-Schema Architecture
    Abstraction layers • Moderate importance
    Master: External, conceptual, internal schemas
    What You Will Achieve
    • Translate real-world requirements into professional ER diagrams
    • Identify and correctly model weak entities and their owners
    • Convert any ER diagram into normalized relational schemas

    Topic Hero: The Foundation of ER Modeling

    The Core Mental Model

    Database design begins with a conceptual blueprint, independent of any specific software. This blueprint is the Entity-Relationship model.

    1. Entities
    The independent nouns. (e.g., Student, Course)
    2. Relationships
    The verbs connecting them, governed by cardinality rules. (e.g., Enrolls, Teaches)
    3. Weak Entities
    The dependent nouns that rely on an owner for their very identity. (e.g., Loan dependent on Branch)
    Key Principle

    Ask: "Does this thing exist independently and have its own unique identity?" If yes, it is an entity. If it only exists as a property of something else, it is an attribute.

    Valid: Student is an entity (exists independently).
    Invalid: Name is an entity (it is just an attribute).

    Relational Model, Er Design and Schema Architecture: Solved Questions with Step-by-Step Explanations (6 Problems)

    Question 1 · Databases · 2026_Set2 MCQ
    In the context of DBMS, consider the two sets T and S given below.

    TS
    I: Logical schemaL: Views
    II: Physical schemaM: File organization and indexes
    III: External schemaN: Relations


    Which one of the following is the correct match from T to S ?
    1. A.

      I – L, II – M, III – N

    2. B.

      I – M, II – L, III – N

    3. C.

      I – N, II – M, III – L

    4. D.

      I – N, II – L, III – M

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Map the three-schema architecture levels to their concrete DBMS implementations: External=Views, Logical=Relations, Physical=File org/indexes.

    Exam route: Logical schema defines tables/relations (N). Physical schema defines storage/indexes (M). External schema defines user views (L). Match: I N, II M, III L. This corresponds to option C.

    Learning route:

    1. External Schema (View Level): Tailored to specific user groups, hiding the rest of the database for security and simplicity. Concrete DBMS equivalent: Views (L).
    2. Logical Schema (Conceptual Level): Describes what data is stored and the relationships among them, hiding physical details. Concrete DBMS equivalent: Relations/Tables (N).
    3. Physical Schema (Internal Level): Describes how data is actually stored on the storage medium (bytes, compression, indexing). Concrete DBMS equivalent: File organization and indexes (M).

    Matching: I (Logical) matches N (Relations). II (Physical) matches M (File organization). III (External) matches L (Views).

    Therefore, the correct match is I – N, II – M, III – L.

    Question 2 · Databases · 2024_Set2 MCQ

    In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?

    1. A.

      The weak entity set MUST have total participation in the identifying relationship

    2. B.

      The owner entity set MUST have total participation in the identifying relationship

    3. C.

      Both weak and owner entity sets MUST have total participation in the identifying relationship

    4. D.

      Neither weak entity set nor owner entity set MUST have total participation in the identifying relationship

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: A weak entity cannot exist without its owner, making its participation in the identifying relationship strictly total.

    Exam route: Recall the definition of a weak entity. It lacks a primary key of its own and depends on the owner's primary key for identification. Thus, every weak entity instance must be linked to an owner instance (total participation). The owner, however, can exist without the weak entity (partial participation).

    Learning route:

    1. Weak Entity Definition: An entity that cannot be uniquely identified by its own attributes alone. It depends on an owner (strong) entity.
    2. Identifying Relationship: The relationship connecting the weak entity to its owner, drawn with a double diamond.
    3. Participation Constraint: Since a weak entity instance is meaningless and cannot exist without its owner, it MUST have total participation (double line) in the identifying relationship.
    4. Owner Participation: The owner entity may have partial participation (single line). For example, a 'Department' (owner) may exist without any 'Dependent' (weak) entities, but a 'Dependent' cannot exist without a 'Department'.

    Therefore, only the weak entity set MUST have total participation.

    Question 3 · Databases · 2024_Set1 MCQ
    Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?

    Instructor Teaches Course Registration Classroom Allocation Student Guides (i) Instructor Teaches Course Classroom Allocation Registration Projects Guides (ii) Instructor Teaches Course Classroom Allocation Registration Student Guides (iii) Instructor Teaches Course Classroom Allocation Registration Student Guides (iv)
    1. A.

      (i)

    2. B.

      (ii)

    3. C.

      (iii)

    4. D.

      (iv)

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: Identify all nouns as entities (rectangles) and verbs as relationships (diamonds), ensuring no independent object is mistakenly drawn as an attribute or relationship.

    Exam route: Scan the specification for nouns: Instructor, Course, Student, Classroom. These must be rectangles. Scan for verbs: Teaches, Register, Allocated, Guide. These must be diamonds. Eliminate any diagram violating this basic mapping.

    Learning route:

    1. Parse the specification into components:
    • "Instructors teach courses" Entities: Instructor, Course. Relationship: Teaches.
    • "Students register for courses" Entities: Student, Course. Relationship: Registration.
    • "Courses are allocated classrooms" Entities: Course, Classroom. Relationship: Allocation.
    • "Instructors guide students" Entities: Instructor, Student. Relationship: Guides.
    1. Evaluate the standard distractors for this historical GATE question:
    • Option A incorrectly models 'Student' as a relationship (diamond) instead of an independent entity.
    • Option B introduces an extraneous entity 'Project' which is not mentioned in the specification.
    • Option C incorrectly models 'Classroom' as an attribute (oval) of 'Course' rather than a separate entity.
    • Option D correctly depicts all four nouns as entities (rectangles) connected by the four appropriate relationship diamonds.
    1. Conclusion: Option D is the only diagram that faithfully represents the specification without adding, removing, or misclassifying components.
    Question 4 · Databases · 2023 MCQ

    Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?

    1. A.

      Number of attributes of its relation schema.

    2. B.

      Number of tuples stored in the relation.

    3. C.

      Number of entries in the relation.

    4. D.

      Number of distinct domains of its relation schema.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: Degree (or arity) is strictly the number of columns (attributes), while cardinality is the number of rows (tuples).

    Exam route: Recall the formal definition of a relation in the relational model. Degree = number of attributes in the relation schema. Option A matches this definition exactly.

    Learning route:

    1. Relation Structure: A relation is mathematically defined as a table consisting of rows (tuples) and columns (attributes).
    2. Degree (Arity): The number of attributes (columns) in the relation schema. For example, in Student(RollNum, Name, Age), the degree is 3. This is a fixed property of the schema.
    3. Cardinality: The number of tuples (rows) currently stored in the relation instance. This can change as data is inserted or deleted.
    4. Evaluation of Options:
    • Option A correctly defines degree as the number of attributes.
    • Option B defines cardinality, not degree.
    • Option C uses "entries", which is ambiguous (could mean total cells) and is not formal relational terminology.
    • Option D refers to distinct domains, which is unrelated to the schema's structural width.
    Question 5 · Databases · 2023 NAT
    Consider the following table named Student in a relational database. The primary key of this table is rollNum.

    Student
    rollNumnamegendermarks1NamanM622AliyaF703AliyaF804JamesM825SwatiF65

    The SQL query below is executed on this database.

    SELECT *
    FROM Student
    WHERE gender = ‘F’ AND
       marks > 65;

    The number of rows returned by the query is __________.
    Correct Answer:

    2.00

    Step-by-Step Solution

    Insight: Filter rows by checking both conditions simultaneously: gender = 'F' AND marks > 65.

    Exam route: Scan the 5 rows. Row 2 (Aliya, F, 70) matches. Row 3 (Aliya, F, 80) matches. Row 5 (Swati, F, 65) fails because 65 is not strictly greater than 65. Total matching rows = 2.

    Learning route: The SQL query applies a conjunctive filter (AND). We evaluate each tuple individually:

    • Tuple 1: gender='M' (Fails gender condition)
    • Tuple 2: gender='F', marks=70. 70 > 65 is True (Passes)
    • Tuple 3: gender='F', marks=80. 80 > 65 is True (Passes)
    • Tuple 4: gender='M' (Fails gender condition)
    • Tuple 5: gender='F', marks=65. 65 > 65 is False (Fails marks condition)

    The count of passing tuples is exactly 2.

    Question 6 · Databases · 2021_Set2 MCQ
    Consider the following statements S1 and S2 about the relational data model:

    S1: A relation scheme can have at most one foreign key.
    S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.

    Which one of the following choices is correct?
    1. A.

      Both S1 and S2 are true.

    2. B.

      S1 is true and S2 is false.

    3. C.

      S1 is false and S2 is true.

    4. D.

      Both S1 and S2 are false.

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: Foreign keys have no limit on quantity per table, and they can absolutely reference the same table (self-reference).

    Exam route: Evaluate S1: False, a table can have multiple foreign keys (e.g., an Order table referencing Customer, Product, and Shipping tables). Evaluate S2: False, self-referencing foreign keys are valid and common (e.g., ManagerID referencing EmpID in the same Employee table). Thus, both statements are false.

    Learning route:

    1. Statement S1 Analysis: A relation scheme can have zero, one, or multiple foreign keys. There is no "at most one" restriction in the relational model. A single table often links to multiple parent tables.
    2. Statement S2 Analysis: A foreign key can refer to the primary key of the same relation. This is called a recursive or self-referencing foreign key. It is the standard way to model hierarchical data, such as an Employee table where each employee has a Manager who is also an employee.
    3. Conclusion: Both statements violate standard relational model rules, making them both false.

    More previous year questions (pyqs) in this unit