A Swedish friend who just had twins here in the US asked me about the passport troubles we had with my daughter (who is also born in the US) so that they could avoid it. It's quite a fun story so here it is.

First a little background; in Sweden everybody gets a "personal number" (kind of like social security here in the US). It consist of your birth date (YYMMDD) followed by 4 digits here the third digit indicates sex (odd=male, even=female) and the last digit is a check-sum digit calculated from the other 9 digits using a simple algorithm.

When my daughter was born we registered her with the Swedish authorities through the consulate so that she would be a Swedish citizen. Since my daughter never actually never lived in Sweden she did not get a personal number but a coordination number (same format and algorithm except the birth date have a number added to it).

On her first trip to Sweden she traveled on her US passport but we thought it would ba good to have a Swedish passport for her too so we went to a police station to get her passport. But they couldn't do anything because the person with our doughter's coordination number did not have any parents according to the computer. When they looked at me and my wife we did have a daughter with the same name, but the personal number listed was our daughter's birth date followed by four zeros (which is never a valid personal number). Hence she couldn't get a passport.

I went back to the Swedish IRS (who owns the personal number registry) and they just sighed... Apparently this happens a lot to people having kids while living abroad; the consulates add the correct information into one system, but not two as they should. They could however provide me with screen shots from their system that kind of proved we were parents to our daughter but I could just have made those myself... Back at the police station we finally got our daughter's passport using these screen shots as proof of parenthood...

Next time we are in Sweden we can resolve this situation by bringing our daughter to the IRS and show them in person she exists. Until we do that they do not update the database so as far as that goes my daughter have no parents.

The thing that really intrigues me is that Sweden is a country with about nine million people. Even given a certain history there should be no problem to keep this in a single database. So no need to go all NoSQL and have non-normalized data. It would make perfect sense to have this data normalized and I think parent-child relations is a pretty obvious example form any text book on database design. But no, apparently that is not the case because that would have been too easy I guess.