views:

562

answers:

3

Storing personal names in a structured way seems quite difficult when it comes to an application which is used by users from lots of different countries. The application I'm working on could theoretically be used by anyone from any place in the world.

Most often a given name (first name / forename) and surname seems to be used. In which case those two could simply be stored in the user database table.

  • Is storing "given name" and "surname" in the user table enough for a globally used application? Please give your opinion with a motivation.
  • Do you have any other suggestions?
  • Are there any good guides on how to solve this?

Some important facts:

  • Communication between users (who reside at the same or different companies and may be in different countries).
  • It's important that searching for users by name feels natural to users and that all important parts of a person name are searchable.
  • It would be nice if, when sending a message to someone in another country the system should be able to help by suggesting a proper greeting. It will probably be hard for arabic names, at least from what I've read as they seem to have a complex structure.
+4  A: 

There isn't really a universal structured way to do this. I'd have a big field for "Full Name" and another field for "Display Name". Both unicode.

For example, in Spanish-speaking countries, IIRC, people usually have FOUR names. Two given names, and two surnames (one from the father, one from the mother). Arabs essentially have a linked list of names as far back as they choose to go (So-and-so, son of so-and-so, son of so-and-so, ...). East Asian countries tend to put the given names last, whilst Europeans put the given names first.

Adam Jaskiewicz
+1  A: 

If you are really interested in going global across all cultures, take a look at the HR-XML specification of Person. Given name & surname just doesn't cut it when you move outside of the West. Eastern standards of FamilyName GivenName will trip you up on defining FullName. Besides, you have all the potential complexities of alternate scripts (not everybody uses the Latin alphabet, y'know), prefixes and suffixes (NN Sr, van der Waals).

It's a standard intended for transmission and integration rather than storage, but don't let the XML schema syntax scare you. I wouldn't implement every aspect of it, but it's an excellent provider of corner cases which aren't immediately obvious, and which you can then ignore consciously. In particular, check out the examples at the end!

And for goodness' sake, don't create an American application which assumes a middle initial for everyone!

Pontus Gagge
+1  A: 

In general, a name is a human-readable identifier of a person. For a given person, you will need to store one name for each use case of such an identifier. You will need a name to display as part of the postal address; you may need one to use as a "screen name"; you may need one to use in the openning of a letter to the person; you may sometimes need to include titles and honors of the person, sometimes not.

In any of these cases, what you want to display is a single string. You may or may not be able to avoid duplication of effort by storing components of these strings and putting them back together later. But in general, both in terms of national culture and professional culture, you may be better off just storing the full strings.

The same, BTW, largely occurs for postal addresses, except that there are international standards that permit the postal authority of one country to send mail to persons in another country.

John Saunders