Skip to content
Exercises · Q7
Q.

In another class having 2 sections, the two respective class representatives have prepared 2 separate Sports Preferences tables, as shown below:

Sports preference of section 1 (arranged on roll number column)

Table: Sports Preferences

Roll_noSports
9Cricket
13Football
17Badminton
21Hockey
24Cricket

Sports preference of section 2 (arranged on Sports name column, and column order is also different)

Table: Sports Preferences

SportsRoll_no
Badminton17
Cricket9
Cricket24
Football13
Hockey21

Are the states of both the relations equivalent? Justify.

West Bengal WbchseTextbookSubjective· 4mImportance★★★★★est
28% · 8/29 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Concept understanding — Union Operation

Imagine two class teachers each keep a register of students who signed up for the annual fest. Some names appear only in the first register, some only in the second, and a few enthusiastic students signed up with both teachers. Now the principal asks for one combined list of everyone who signed up. You would copy out all the names from both registers — but you would write each student's name only once, because listing someone twice does not make them two people. That combined, duplicate-free list is exactly what a union is.

The union of two collections is a new collection containing every item that appears in the first, in the second, or in both. Two things make it different from simply stapling the two lists together:

  • Every distinct item from both sides is included — nothing that belongs to either collection is left out.
  • No item is repeated. If something appears in both collections, the union carries it just once.

This idea shows up throughout Informatics Practices wherever data is treated as a set of distinct values. In Python, sets support a union operation directly: given two sets, a.union(b) (or the pipe operator written as a | b) produces a new set holding every element found in either one, with duplicates automatically removed — that is simply what a set is. In databases, the same idea appears when you combine the results of two similar queries into one result: rows that satisfy either condition appear together, and identical rows are not repeated. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.