A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 attributes are deleted and 4 tuples are added, what will be the cardinality of the relation ?
A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 attributes are deleted and 4 tuples are added, what will be the cardinality of the relation ?
Options
Correct option: (C) 6
Cardinality is the number of tuples (rows). Starting with 2 tuples, deleting attributes (columns) does not change the row count; adding 4 tuples gives tuples, so the cardinality becomes 6.
Marking Scheme
- 11 mark: correct option (C) 6 selected.
Hint
Cardinality = number of rows only; attribute (column) changes never affect cardinality.
Quick Oral Answer
Cardinality counts rows only; attribute deletions change degree, not cardinality, so 2 initial tuples plus 4 added tuples gives a final cardinality of 6.
Analysis & Explanation
This question distinguishes between degree (columns) and cardinality (rows) of a relation.
Why (C) is correct
- The relation initially has 2 tuples (cardinality = 2) and 3 attributes (degree = 3).
- Deleting 2 attributes changes the degree to , but has NO effect on the number of tuples.
- Adding 4 tuples increases the row count: .
- So the final cardinality (number of rows) is 6.
Why the other options are wrong
- (A) 4 wrongly subtracts the deleted attributes from the tuple count, confusing degree with cardinality.
- (B) 5 has no correct basis in the given arithmetic.
- (D) 7 incorrectly adds an extra unit, possibly by miscounting the initial tuples.
Common Mistakes
- 1Mixing up degree (columns) and cardinality (rows) — deleting attributes wrongly reduces the tuple count in the student's calculation.
- 2Forgetting to add the initial 2 tuples to the new 4 tuples, giving an answer of 4 instead of 6.
Interesting Facts
In relational database terminology (from E.F. Codd's 1970 relational model), 'cardinality' and 'degree' are precise mathematical terms borrowed from set theory, describing the size of a relation (as a set of tuples) and its arity respectively.
Adding or removing columns (attributes) in MySQL is done via ALTER TABLE, while adding or removing rows (tuples) is done via INSERT and DELETE — two completely independent operations.
Spotted a mistake or something unclear?
Tell us — we fix reported answers fast.
Frequently Asked Questions
Does deleting a column change the cardinality of a relation?
No. Deleting a column changes only the degree (number of attributes) of the relation. Cardinality refers strictly to the number of rows (tuples) and is unaffected by adding or removing columns.
How do you calculate final cardinality after rows are added or removed?
Start with the original number of tuples, then add the number of tuples inserted and subtract the number of tuples deleted. Column (attribute) changes are never part of this calculation.