To store the address of a person, which data type is more efficient?
To store the address of a person, which data type is more efficient?
Solution
✅ Correct Option: 2
An address is text whose length differs from person to person. varchar(50) is a variable-length type, so it stores only the characters actually entered (plus a small length overhead) and uses less space.
Option 1: char(50) is fixed-length, so a short address is padded with spaces up to 50 characters, which wastes storage.
Option 3: address is not a standard SQL data type.
Option 4: int holds only whole numbers, so it cannot store text such as street and city names.
Related questions:
2025: 13 May Shift 2
2026: 26 May Shift 1
2025: 13 May Shift 2