What's in a name database?

All too often I will see an application somewhere cause users to scream bloody murder because the author didn't know about some of the material I'm about to cover here. These things took a lot of time and reading to fully realize not only because they are not intuitive but also culture dependant. Hopefully you can follow my findings and save yourself the pain of bad design, and the time spent reading about cultural differences.

Many websites ask us for our name, under the assumption that they need this sort of information.Of course they do, how else would they personalize emails to us as if they were our dear friends that care so deeply about us.

Does anyone actually feel special when getting emails from some random forum they posted a question on 5 years ago? I'm glad they reminded me they're #1 on my birthday. Well wash my arm folks, I'm touched!

Nobody on the planet can justify requiring a name for sending these lame emails.

So, what's your name?

Surprisingly, this is actually the wrong question to be asking someone. Let me quickly explain to you what a name really is. In the German language (which is one of the languages that helped form English), you don't normally ask someone "What is your name?" but more literally you will ask them "What are you called?". A name is simply some noises and letters we use as a reference to someone else. Historically, in many cultures it wasn't unheard of to go by different names all at the same time, or at later dates. You may have heard of William Shakespear being referred to as The Bard, or Williams Shatner who goes by Bill with closer friends. Such nick-names are still very common today, perhaps sometimes goofy.

It's not unheard of for people to change their names either, obviously so with married persons in modern western cultures, but even historically thousands of years ago, entire names would change to signify a major life event. Names are not always inherited either, such as the tradition of ancient Hebrew cultures where there was no "last name" or "family name," you were simply David, son of Jesse, or in the Sikh tradition where men will take the last name Singh upon baptism.

The question I'd like to go back to is, why are you asking for this person's name?

What is a name?

A name is a reference to a person relative to another group of people at a specific time. My friends call me BDG and write it on my birthday card, my boss calls me Brian, the government calls me Mr. Graham. If I change my name, my friends will still probably call me BDG, my boss might call me both names, and the government will bill me for the name-change processing fees.

So, again, a name is flexible, it changes, and it can be a number of things, to anyone, at any time. So before you ask someone for their name, you need to tell yourself first why you need their name. That's right, scope out requirements rather than mindlessly collect data.

If you've been paying attention to registration forms you'll see them come in all types. Facebook's changed their signup form and run their big data crunching over names hundreds of times. Twitter's needs are actually very straight forward-- you get a "Full Name", twitter account, email, and password.

Speaking strictly as an end-user for a moment here. I don't know you or your service/company on any personal level, so I don't really trust you. I don't want to tell you anything about me because you're just going to spam me on my birthday with some email. Why you would ever need my name is frankly beyond me. You'd better have a great reason that's valuable to me as an end-user, and not you as an advertising or data-collecting agency.

On sites that feel my "Government of Canada name" is important without providing me a clear reason why simply get a fake name such as "Bruce Oxford". It's going to happen to you when you're only asking for my name so your emails can say "Dear Bruce" in the subject line, rather than a valid reason that I care about. Email greetings generated by a robot are stupid, my name on a parcel is not.

You don't need my name, stop asking for it. Provide me whatever service it is you do and leave me the hell alone after that. Nobody on this planet is naïve enough to think that some website mass email script included me because they want to be my friend, and making money had nothing to do with it.

I actually do need your name.

I saw an email sent out to a travel agency once from their customer. The agency is collecting data used to book an individual flights and hotels. While it might seem obvious to us that he may need to give them his name and address to do things like work on processing entry visa requirements to China, he didn't understand and simply replied with a very short email asking "Are you totally high?! I'm not giving that out!!". Yes, he was an extreme case, but there's something to be learnt here. People care about their information, so explain to them why you need it, even if it's obvious to you. Let them know you're not selling it to some spam farm in Russia for twenty Kopeks.

Ask for their name after you've ensured there's a value to them in having it (and doing mental gymnastics doesn't count, it's a strong sign you need to immediately stop the mistake you're about to throw onto your customers).

Ask them for the name you need. You may need the government name that's the most recognized, or simply a pseudonym like "Incognito". Let them pick something if you don't actually need it for any regulatory purposes, or even better, don't use names at all. My email from something I pay money for didn't include my name and I couldn't be more thrilled about it.

Okay, so we can now ask them for their real name?

You have a real reason now that actually provides value to your users? Of course you can! So make your database tables with your three fields like you were about to.
  • First name
  • Middle name
  • Last name
And now let's have the last German Minister of Defence come and put his name in, so here's his name and start typing it in: Karl Theodor Maria Nikolaus Johann Jacob Philipp Franz Joseph Sylvester Freiherr von und zu Guttenberg. 

Yes, our friend Karl is the exceptional case being of nobility, so please ensure your database cannot accept any members of the bourgeois and stick with the simple traditional proper modern anglo-saxon naming contention of having a first name, middle name, and a last name. Everyone who isn't in this naming scheme is a person who's business you most certainly don't want.

Over in Hungary names are different from how you might expect them to be. If your name is Bob Smith Magyar, in Hungary you would be known as Magyar Bob Smith. Their culture expects the family name to come before the given names. They have similar conventions in many Asian cultures, for instance, my friend Dai Wai (who goes commonly by Dave, and doesn't use Chinese writing over here to write his name, but back home and on his passport he does). In some Malay, Korean and Arab cultures it may be the custom to refer to a person as the parent of their children (rather than the Hebrew tradition "David, son of Jesse", one could expect "David's father").

I'm not the only person saying this stuff either. The W3C has a lengthy document describing how names differ around the world, what the implications are, and how to design for this concept.

Now, if for some reason you actually agree that a naming convention is a silly reason to not just take someone's money they're willing to give you, keep reading.

We can't do three names, I get it. What do I do?

We have two options here, add in at-least fifty more fields to the database to deal with this (by the way, "von und zu Gutenberg" is german for "from and to Gutenberg", so spaces doesn't mean it's another name), or we go back to that question I keep telling you to answer: why do you need this name?

Most of you don't need any names from an end-user. You can work off some random user-handle or something and let us keep what shred of privacy we have left. Just let me change it later if I need to signify a change in my life.

So let's accept there is no such thing in the international world as a "first" name. Hungarian first names are the family name, English first names are the given name. There's commonly a Given Name (that is, the name that was given to you, or you gave yourself), and the Family Name (or more correctly, SurName)

So, ask for, only when needed, a place for the following:
  • Given Names (all of the names you were given)
  • SurName (the name of a family you belong to)
You can't make them required. People living in Turkey, Indonesia, Afghanistan, Tibet,  and south India commonly have no surname at all. Here in Canada, we have a senator named "Nancy Ruth", where Ruth is actually not her surname. Nancy formally renounced her surname of "Jackman", leaving only her given names. This isn't entirely unheard of either, many people all over the globe will renounce their surname on paper.

That's it. Just ask for those two names, and have flags go off it it doesn't meet your guidelines to have someone review it. Let them enter in all the accents, spaces, and other marks they need to.

Don't be dumb

I want to warn you here, because you might not see it elsewhere. I see a lot of people bang out some code for what they think is a suitable program for taking name input, only to have their database crash when Jack O'Brian comes and puts his name in. That's because you don't understand SQL injection, so go figure that out (start searching the web, it's a big topic). Don't pass names through a regex, don't force capitalization or lower case, "McDonald" is a valid name, so is "DeLuca". Don't play around with people's names once they give them to you.

Don't use the same name when testing your database either. Ensure you have fake test data. The last thing you want is a real person's data becoming abused (especially your own) at some point. There's a service that doesn't specialize in edge-cases that may push the limits of what a name is, but an excellent tool for generating large sets of fake persons. It is called the Fake Name Generator. I use it.

One last note about Honorifics.

There's a huge mistake I see all the time, where programmers don't know what Honorifics are. You may have never heard of the word, but you do know some of them.

If you see the name, "Mr. Oxford", it's that "Mr." that is the honorific. If you read through this post and thought names were complicated, you have no idea how bad these get. My advice, much like names,. is avoid dealing with them.

Sometimes, you might need to because of a regulation. My advice in this case is stick with the normal honorific system of your country of operation. If you're in Japan, you shouldn't worry about Mr. Oxford, or if this is Oxford-sama or Oxford-chan or any of the millions of combinations over all of the cultures out there.

The Honorific is truely worse than a name. It will change depending on age, social status, martial status, and perhaps other things. Keep it to a simple list as per the minimum requirement of whatever regulatory need you're working with. If you don't need them, don't do it.

I've seen forms list this as a "salutation" input for some reason, and no, it's an honorific. I understand honorific is a long word, so simply put "title" which is close enough that English readers understand the context.

  • Don't ever ask me for a name
  • Don't ever ask me for a title
  • Seriously, don't ask.
  • What type of name do you need from me?
  • Okay, explain why you need it and only if you really do need it
  • Support any text as "Given Names" and "Surname". Ideally you support all proper names.
  • Support as few honorific titles are you need to. Ideally you support 0.
  • The scheme for names changes quite frequently through history, and culture.

Labels: , ,

Full list of archived posts