Skip to content
Think & Reflect · Q1

Q.Can you think of an attribute for which fixed length string is suitable?

Rajasthan RbseTextbookSubjective· 2mImportance★★★★★est
82% · 37/45 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 →

A fixed-length string (CHAR(n)) suits any attribute whose values always have exactly the same number of characters — the chapter's own example is the 12-digit Aadhaar number stored as GUID CHAR(12).

Other everyday examples: a 10-digit mobile number, a 6-digit PIN code, a single-character attendance status ('P'/'A').

The reasoning

CHAR(n) reserves exactly n characters for every value — shorter data gets space-padded, so it wastes storage when lengths vary. But when every value has the same known length, CHAR wastes nothing and is the natural choice. VARCHAR is for varying lengths (names, addresses).

Attributes from this very chapter that fit perfectly:

AttributeWhy fixed lengthDeclaration
GUID (Aadhaar number)always exactly 12 digits, no arithmetic done on itCHAR(12)
GPhone (mobile number)always 10 digitsCHAR(10)
AttendanceStatusalways one character: 'P' or 'A'CHAR(1)

Beyond the book: a 6-digit postal PIN code → CHAR(6); a 2-letter state code like 'KA', 'DL' → CHAR(2); a vehicle registration number or IFSC code (fixed 11 characters) → CHAR(11).

For instance, in a table you might declare:

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.