Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It seems there are many different ways to represent the same information:

FirstName, MiddleName, LastName
Forename, MiddleName, Surname
GivenName, MiddleName, FamilyName

Which one is preferable? It depends??

share|improve this question

closed as primarily opinion-based by user61852, Glenn Nelson, Giorgio, Dan Pichelman, GlenH7 Jul 17 '13 at 20:14

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If users will be in the USA then use first/middle/last. –  mike30 Jul 17 '13 at 13:45
    
mike, that's totally not his question... He's not refering to last/first vs first/last... –  Frederik P. Jul 17 '13 at 13:51
    
What about displaying to the user how the name will be used? For instance you can have Name1, Name2, Name3. And then you can have some dynamic text that says "Hello <insert Name1>" or "Hello Mr. <insert Name3>" –  TruthOf42 Jul 17 '13 at 14:12
3  
possibly better suited for ux.stackexchange –  jk. Jul 17 '13 at 15:46
1  
@jk. - whilst this does have a big impact on ux, I believe the naming and structure is equally relevant to OO and DB design. Would you agree? Where possible I try to keep names of cols, properties and inputs consistent through an application. –  Scotty.NET Jul 17 '13 at 16:36
show 5 more comments

2 Answers

up vote 11 down vote accepted

The blog post "Falsehoods Programmers Believe About Names" is an eye-opener.

You could say that your application is localized for only USA, but even there you're certain to find some odd names.

A simple example, Japanese family names are the first name. That's enough reason not to split names in separate fields. The only reasonable way to cover a big percentage of cases is a single, long, Unicode field. (Maybe add a couple 'support' fields like "addressing prefix/suffix", "informal name", nickname, etc)

share|improve this answer
1  
Ha, you beat me to it. –  Jaydee Jul 17 '13 at 14:01
    
@Javier - For my particular case most systems I will integrate with have separated names, and I will attempt to match on the 'surname' if needed (amongst other fields). I didn't want to make this question prescriptive though, and the issues you and others have raised have been great. Some great comments to the blog post you referenced as well. –  Scotty.NET Jul 17 '13 at 14:42
    
40. People have names. That one confused me, but I am sure there is an example. I was born in the US and have three names. Unfortunately for me I go by my middle name. Thanks a lot mom and dad. –  dbasnett Jul 17 '13 at 15:04
1  
11. Consider various sign languages or obscure phonetically complex languages without a written form. It appears that to be universal, the entry form should be a binary blob accepting any number of UTF, audio, image and video inputs! –  user96962 Jul 17 '13 at 19:37
add comment

Since all of the terms are used quite often, and legitimately, the best choice will depend on the purpose and intended audience. Regardless of the names that you use internally, you can always choose to label them however you want in the UI, so ultimately the behind-the-scenes names don't really matter.

If you think it's likely that the users may have differing opinions on which is best, and will care enough about it to complain, I'd recommend making it a configurable setting to change the labels used in the UI. As long as the labels used in the UI are configurable, I would just choose whichever behind-the-scenes names that make the most sense to you. I would say that first/middle/last are the most immediately recognizable, but that's just me.

When it comes to storing names, I know I'm out on a limb here, but I am of the opinion that, the full name should always, when possible, be stored as a single string rather than breaking it out into separate parts, like that. I understand that there are many instances where you may need to split them apart. For instance, you may need the ability to sort people by last name. However, in such cases, I would recommend storing both the complete name and the necessary parts. So for instance, if your only requirement is to have the ability to sort by last name, then you could simply store two fields: full name and last name. It doesn't make sense to store the first name if you are never going to need it. Given the fact that names are formatted differently in different cultures and parts of the world, no matter how you break it apart, you'll likely never be able to guarantee that the sum of the parts will always be the way that it should be displayed as a full name.

That said, if the purpose of capturing the data is to later submit it or export it to some other system, and that system requires names to be split out, then I would just follow that system's conventions for the names of the fields, so as to avoid confusion.

share|improve this answer
    
I wouldn't store names as a single string. The reason being that single string names cause headaches when trying to create salutations for mail merges and email notifications/marketing. –  Jason Holland Jul 17 '13 at 13:56
    
@JasonHolland That was my point. In that case, I would store both the full name as a single string as well as the last name as a separate string. In that example, there's no reason to know what their middle name is, for instance. Like I said, though, I know it's out there on a limb. Take that part of my answer with a grain of salt :) –  Steven Doggart Jul 17 '13 at 13:59
    
@StevenDoggart The bottom line is, cultures are different. For example, in Russian, a gentle way to adress someon is "Given Name" "Father's Name" like if someones name is Iwan Iwanowitsch Inwanow, you'd write "Dear Iwan Iwanowitsch" and not "Mr. Iwanow" –  Ingo Jul 17 '13 at 14:46
    
@StevenDoggart - It does seem many modern web sites (Stack Exchange and Amazon are the only 2 I can check behind corp firewall) are using a single non-required field for name. –  Scotty.NET Jul 17 '13 at 14:47
    
@Scotty.NET Yes. There are obviously many difficulties involved in handling names from other cultures. The rule-of-thumb should be to store names as single fields, if possible, with as few restrictions as possible. What I was trying to recognize, in my answer, is that in the real-world, doing so is often impractical. As "wrong" as it may be to store first/middle/last, sometimes you don't get much of a choice in the matter. –  Steven Doggart Jul 17 '13 at 14:53
show 2 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.