The interview problem
A customer import rejects names that appear distinct in the UI. Diagnose database comparison semantics.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Inspect the column collation, uniqueness constraint and application normalization. Agree whether case and accents distinguish identifiers; preserve display text separately from any canonical key. Test with the actual database engine and collation version.
2. Trace the design or derivation
Identity policy → collation inspection → conflict inventory → migration plan → boundary tests
Produce a collision report before changing constraints. Let the customer decide how to rename or merge conflicting records rather than silently dropping one. Sorting rules for a human-facing list need not be the same as the rules defining account identity.
3. Calculate the example
If the database treats Alpha and alpha as equal under a unique constraint while the application treats them as different, the second insert can fail even though the UI showed an available name.
4. Failure cases and trade-offs
Changing collation can create existing-key conflicts and alter sort order. Lowercasing everything is not a universal Unicode identity policy. Database upgrades can change comparison behavior.
5. Validation, follow-ups and self-review
Acceptance: test customer-approved case and accent pairs plus existing-data collisions. Follow-up: how would you migrate a unique index? Self-review: distinguish display, equality and ordering.
Sources and related practice
Technical reference: www.postgresql.org — Database collation and comparison behavior.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Agree on Unicode identifier matching; Change a large database schema without stopping writes.
Continue your preparation
Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.