GATE CSE 2017 Session 1 Q56: Rows in CR ÷ courses taken by SA (relational division)
- Databases
- 2 marks
- NAT
- No negative marking
Syllabus topic: Relational model: relational algebra, tuple calculus and SQL
Question
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below.
| StudentName | CourseName |
|---|---|
| SA | CA |
| SA | CB |
| SA | CC |
| SB | CB |
| SB | CC |
| SC | CA |
| SC | CB |
| SC | CC |
| SD | CA |
| SD | CB |
| SD | CC |
| SD | CD |
| SE | CD |
| SE | CA |
| SE | CB |
| SF | CA |
| SF | CB |
| SF | CC |
The following query is made on the database.
The number of rows in is ______.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 4 (official GATE 2017 final answer key)
Concept used: Relational division returns the students who are paired with every course in .
First step: First find T1, the set of courses taken by SA, then check which students have all of those courses.
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Relational model: relational algebra, tuple calculus and SQL
Every PYQ on this topic →Share this question
Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key
More Databases PYQs
- 2026 Session 1 · Q30Which functional dependency inferences always hold
- 2026 Session 1 · Q31Dependency-preserving decompositions for 1NF, 2NF, 3NF, BCNF
- 2026 Session 1 · Q43Relational algebra equivalent of a tuple calculus join query
- 2026 Session 1 · Q65Number of superkeys with candidate keys {A,B} and {A,C}
- 2026 Session 2 · Q15Match DBMS schema levels with what they describe
- 2026 Session 2 · Q20When two transactions do not conflict on a data item