What will be the degree and cardinality respectively of the following relation "GUARD"?
GuID Gname contact address 111 Jacob 789582582 NJ Washington 112 John 895858885 London 115 Victor 985852828 Austria 118 Samuel 798588846 Germany 125 Mary 798986543 Stockholm
What will be the degree and cardinality respectively of the following relation "GUARD"?
| GuID | Gname | contact | address |
|---|---|---|---|
| 111 | Jacob | 789582582 | NJ Washington |
| 112 | John | 895858885 | London |
| 115 | Victor | 985852828 | Austria |
| 118 | Samuel | 798588846 | Germany |
| 125 | Mary | 798986543 | Stockholm |
Solution
✅ Correct Option: 2
Degree is the number of attributes (columns) in a relation, and cardinality is the number of tuples (rows).
GUARD has 4 columns (GuID, Gname, contact, address) and 5 rows of data, so the degree is 4 and the cardinality is 5.
Option 1: reverses the counts and uses 5 for degree, but the header row is not a tuple and the degree is only 4.
Option 3 and Option 4: 6 comes from wrongly counting the header row as a tuple, but the header is not a tuple, so it is not counted.
Memory trick: degree = "D" for downward headings (columns), cardinality = rows (tuples).
Related questions:
2026: 23 May Shift 1