13

I have recently been pondering names and the way we store them. Generally a person will have a First, Last and Middle name. If you want to be particularly complete you might add a suffix field, perhaps even a title field. So if someone wants to be "Dr. John Q. Public III", they can. But a person can have more than one honorific and more than one suffix. For that matter then could hve a hyphenate last name too. So what if you are "Dr. John Quintus Maximus Public-Doe III Ph.D. MD. RPh."? You could do:

Persons
    PersonID
    Prefix
    FirstName
    MiddleName
    LastName
    Suffix
PersonHonorifics
    PHID
    PersonID
    Honorific
PersonNames
    PANID
    PersonID
    NameOrder
But then it gets to be a bear to work with, and no one ends up using them anyway.

Is there a generally accepted "Standard Way" to store name data?

Nick
  • 5,875
  • 1
  • 27
  • 38
Aaron Bush
  • 1,115
  • 2
  • 8
  • 16
  • Depends on your needs. Do you need to search eg. by first name or group by prefix? How many names will you be storing? What kind of operations will you perform upon these names? – aefxx Feb 25 '10 at 16:00
  • 1
    Why would you ever process the Honorifics separately? Are you going to handle Chivalric Orders where a KG is ranked before a CGB? – S.Lott Feb 25 '10 at 16:19
  • 3
    @S.Lott I wanted to have an academic discussion independent of requirements and it seemed like a good example where there was a trade off. In a scenario where you wanted to query down a population by a certain credential combination (say: all the MCDBAs who are also MCITPs) then the normalized version might be preferable to a "junk field". – Aaron Bush Feb 25 '10 at 18:10
  • "academic discussion independent of requirements"? Doesn't make any sense at all. We only write software because of "requirements". If it doesn't solve a problem, why bother? If you don't have "requirements" there's no measure of "done" or "correct", "complete" or "consistent". With no requirements a text field is perfect for what you're talking about. – S.Lott Feb 25 '10 at 21:28
  • 2
    Hmm your logic is predicated on a false premise. I don't write software *only* because of a requirments. I often write software that never sees the light of day for practice, and for fun. And so do you or you wouldn't be here:) – Aaron Bush Feb 26 '10 at 18:30
  • See https://stackoverflow.com/questions/1122328/first-name-middle-name-last-name-why-not-full-name – Raedwald Oct 01 '19 at 10:30

9 Answers9

19

Sometimes you only think you know your requirements. The book publishing industry has an information standard called ONIX that uses the following. It's interesting to note that First and Middle names are combined into one field.

  • Titles before names (ex: Professor, HRH Prince, Saint)
  • Names before key names (first names and/or middle initials - ex: Brendan J. E.)
  • Prefix to key names (ex: van, as in Ludwig van Beethoven)
  • Key name (last name)
  • Names after key names (ex: Ibrahim as in Anwar Ibrahim)
  • Suffix to key names (ex: Jr, III)
  • Qualifications and honors after key names (ex: MB, PhD)
  • Titles after names (ex: Duke of Edinburgh)
Jim
  • 191
  • 2
  • 2
  • 3
    Love this one because it works internationally. Also found a link to the actual document: http://www.editeur.org/93/Release-3.0-Downloads/#Specification – danielson317 Sep 04 '14 at 20:52
  • Wow, this is great. May use this one myself. –  Jul 28 '15 at 17:42
5

I prefer AD naming style

First Name  givenName
Last Name   sn
Initials    initials
Display Name    displayName
Description description
Office  physicalDeliveryOfficeName
Telephone Number    telephoneNumber
Telephone: Other    otherTelephone
E-Mail  mail
Web Page    wWWHomePage
Web Page: Other url
Janusz Skonieczny
  • 17,642
  • 11
  • 55
  • 63
  • 1
    +1: First name, Last name (for sorting), and Display Name (to include all the decorations that people like to have.) And reasonably compatible with other ways of storing information about people. That's what LDAP (and AD) are for. – S.Lott Feb 25 '10 at 16:16
  • 19
    +1 (to LDAP) for encapsulating the most needed fields in a standard way, -100 for way inconsistent naming (`givenName`, `sn`... What?) and bizarre camelCaps (`wWWHomePage`? Seriously?). – Jakob Borg Feb 28 '10 at 10:52
4

The standard way is to look at your requirements, and store the data required. While this is an interesting academic problem, the truth is, in the dozens of systems I've worked on, first and last name is usually sufficient. Sometimes we will store a middle initial, but most of the time even that isn't required.

If you have a requirement to store all of Dr. John Quintus Maximus Public-Doe III Ph.D. MD. RPh's information, then you devise storage for that. But as long as your last name allows for enough data, then Dr. Maximus can type as much or as little as he would like to be stored about his name and titles.

NerdFury
  • 18,876
  • 5
  • 38
  • 41
4

Best to use a single full name field.

See: https://www.w3.org/International/questions/qa-personal-names

Names are culturally determined, so don't be blinded by your own culture.

Gene
  • 41
  • 1
1

I would start by looking at the vCard standard; it needs a bit of normalization.

Scott
  • 6,411
  • 6
  • 39
  • 43
1

You should design your storage format around how you expect to use the data. If you need to know the difference between the first name(s) and last name(s), then have columns for each. Likewise, if you (or your business) cares about suffix/prefix/middle names/etc... enough to want to use them in a specific manner (e.g. spamming all customers who are Doctors), then have columns for each. But if all your need it for is to identify them in a report, or in a email salutation, then consider an easier approach of: First_names, Last_Names, and leave it at that.

Ask yourself what realistic benefit your organisation would get out of storing each component of a persons name separately. Look at government forms and see how much information about a persons name they feel the need to capture.

Mike
  • 2,417
  • 1
  • 24
  • 33
0

From my experience it is usually

  • Title (as a FK, linking out to a table of titles)
  • Forename
  • Middle name
  • Last name
  • Previous last name (if needed, to catch change of name for married women)
  • Suffix

Anything else tends to be overkill (unless needed in your specific application) and a pain to manage

CResults
  • 5,100
  • 1
  • 22
  • 28
0

The following is a bad idea (see the first comment):

KISS! Free yourself and just use "FullName" :-) (In case you need it, the last word in the string is the "Lastname")

You can always use: Dear "Fullname".

How you handle honorifics depends on your requirements and your audience. You could collect "salutation".

Robert
  • 1,466
  • 10
  • 25
  • 2
    Bad idea in general. Yes you can have a fullname field but it should be built on separate fileds, otherwise ordering by lastname or seraching by lastname means using like '%Smith%' which means you can;t use the index. I would never store only fullname. – HLGEM Feb 25 '10 at 16:14
  • Good point :-) I changed the answer. (May be for some public web applications this would be good enough - where you apply YAGNI and don't even collect the Lastname. (But this was not the question). ... – Robert Feb 25 '10 at 16:20
  • 3
    Don't sort by "lastname", problem solved. – Chris_F Jun 08 '16 at 02:50
0

Unless you are dealing with a specialized group of peole like doctors where you might need to store all the suffixes in an way that makes it easy to search (we often search on professional suffix here), then you can store them either in the lastname field or in a separate suffix field (makes searching all the people named smith more reliable if sufffix is a separate field). but with a comma delimited list. Same for prefixes. I would suggest that firstname, lastname and middlename (Helps distinguish dups and without the filed it is less likely to be put in even if the user knows it) are generally necessary for being able to properly search and report on the data. I wopuld also suggest a calculated field that formats the fullname the way you want it displayed on emails, etc.

HLGEM
  • 94,695
  • 15
  • 113
  • 186