Why I Didn’t Store Citizenship Directly on the Person Entity
A small modeling decision that prevents large architectural mistakes in identity systems.
While redesigning my Identity Service, I noticed a recurring pattern: many systems assume a person has exactly one citizenship.
Person
└── citizenship_country_id
Simple to query. Easy to understand. Hidden assumption: one nationality forever.
Reality check
- Multiple citizenships are normal in many regions
- Second citizenship can arrive later in life
- Primary nationality can change; some are renounced
These are legitimate scenarios — not exotic edge cases you can forever postpone.
Attribute vs relationship
Turning a relationship into an attribute is one of the most common design shortcuts — and one of the most expensive to undo.
The model I used
Person
│
├── Citizenship #1
├── Citizenship #2
└── Citizenship #3
In database terms:
Person
│
└── PersonCitizenship
│
└── Country
Each citizenship can carry:
| Field | Why it exists |
|---|---|
| Country | Which state |
| Acquisition date | History / audit |
| Status | Active, renounced, pending |
| Primary flag | UX and default jurisdiction |
Why this matters
1. It reflects reality
People can have one citizenship — or several. The model should represent both.
2. It avoids expensive migrations
Discovering multi-citizenship late means schema surgery under load. Modeling the relationship early is cheaper.
3. Clearer boundaries
Citizenship is not merely a column. It is a relationship between a person and a country.
Example: one person, two states
A small modeling lesson
Sometimes an attribute is hiding a richer concept underneath. Citizenship was one of those concepts in my system.
Design goal
Not “support every edge case on day one” — avoid assumptions that aren’t universally true. One citizenship or several: both should fit.
You’ve now seen the first modeling arc of this book: Person / User → Contacts → Citizenship. Next: dual sessions — device before account — and the refresh-token families that make theft detectable.
Next chapter
Continue with Device Session vs User Account Session.
Canonical version. Also on Medium.