Home › GATE CSE › computerscience › Database Management Systems › If `student` has 50 rows and `course` has 8 rows…
If `student` has 50 rows and `course` has 8 rows, `SELECT * FROM student CROSS JOIN course` returns
A58 rows (sum)
B50 rows (the larger table)
C8 rows (the smaller table)
D400 rows; every pair (s, c)
Answer & Solution
Correct answer: D. 400 rows; every pair (s, c)
CROSS JOIN produces the Cartesian product: every row on the left paired with every row on the right. 50 x 8 = 400. There is no matching condition; the result blows up multiplicatively. This is why CROSS JOIN is almost always used inside a WHERE filter that turns it back into an INNER JOIN.
Related questions
The main reasons production DBMSs avoid shadow paging in favour of WAL are that shadow pagWhat is the purpose of a Compensation Log Record (CLR) in ARIES?ARIES recovery is structured as exactlyFuzzy checkpoints differ from naive checkpoints byIn standard log-based recovery, the order of operations isAfter a crash, with checkpointing, the recovery system scans the logA complete log record for a write operation includesPer WAL semantics, a transaction is officially committed at the moment