You Win, Broken Database Schemas
christine.website
christine.website
meta: What is the purpose of the M01 10 2022 date format? Is that intended to reduce ambiguity between the month and day? Why not an ISO 8601? Why isn't it M01 D10 Y2022?
But for a lot of common use cases, there's really no need to separate first and last name in a database imo.
Name: The Who, Sort_Name: Who
Otherwise, add a whole bundle of fields and make none of them mandatory. That's what Google Contacts does, and that seems to work ok.
It is an instance of a general problem that policy can be anything, even stuff that is inconsistent. Closest I've ever got was in an object DB where I could define various subclasses of a Name class that were related to the Person instances (along with titles and whatnot). There were obvious efficiency and UI issues. Harder to do with relational.
I've never seen that before, it's hilarious. As to why, imagine you're from a country that uses a subpar date formatting like MM DD YYYY, and while you're conscious enough to notice its badness and improve on it slightly by adding an "M", you're not conscious enough to search for a fundamentally different approach - a sane date format. A local maxima of sorts.
If you don't have 30 more code points worth of stuff to say, you can feed fewer bytes into the hash. But then you can never speak about me again.
What's the database schema for that?
Reconsidering whether you actually need to store a name, or whether you need more than an “informal” name is another good default. I’ve scare quoted “informal” because what you probably mean is somewhere between “preferred conversational” and “legally identifying”, and people may prefer to use a name they’ve chosen in formal settings (my understanding of Xe’s article suggests xer do [and sorry if I’m misrepresenting that, or misusing xer]). I have used a chosen name (originally chosen by a friend) for almost 20 years, both in formal and informal contexts. And many many people do, even from childhood (eg choosing to go by a middle name or a specific variant of the name on, say, their birth certificate).
If for whatever reason you need or have a good reason to ask for/store a “formal” name and a “preferred conversational” name, those are probably reasonable default names, though you may want to also allow for multiple “conversational” names, and without qualification that can get ambiguous very quickly (which loops back to “reconsider” IMO).
Most of the other replys talk about 'Legal' names vs various levels of friendly name.
How about Mailing Address fields for snail mail? Don't decompose it, just have a full text area and store EXACTLY what the user provides. POSSIBLY toss it at a an address validation routine your postal services. Be prepared to handle an 'International' printed label where you might print a blob of text you don't understand, targeted to a country you do, and require manual processing for country, payment, and customs forms validations outside of the typical flow.
Try to show the end user examples of where and how the information will be typically used.
Never, ever, break down components of user provided input; at least not without letting them confirm if they're correct and allowing them to skip it if it isn't.
https://en.wikipedia.org/wiki/List_of_country_names_in_vario...
[1]: One good reason is that, as you say, people get things wrong—even their own address—on a regular basis, and you may be charged more money if you’re e.g. shipping things with the wrong postal code for the rest of the address. But even then it’s good to provide a workaround if necessary; post office databases can be wrong too!
I agree with that part, but I also think that often giving a name isn't really about identity, but about having a shared space to communicate. For example, when I want to order something online, I have to give a delivery address. I may live here. I may not. It might be just a PO box, or the address of a friend. But, by giving this address, I'm saying "put what I want in a box, I'll handle it from here". I feel the same for names. It's not about expressing who I am deeply, it's about giving something to people that they can use.
Now, as usual, the correct answer here might be to not even ask for a name in the first place. Usually websites have my email address, and that's enough. They can put the information that they want to transmit to me in a box, and I'll take a look.
Like you stated, it's a bit of a leap to conflate self identity and one's name. It's just an identifier, not the full self.
And the false dichotomy seems a tad presumptuous.
Some folks truly do have a firm understanding of themselves and lack self-doubt.
Or for some their identity isn't the focus of their activities, and acts as a simple tool to achieve other things.
Or perhaps what they've figured out is to accept that their identity is fluid and will forever be hard to define.
Or...
On the other hand, if the pizza place asks for a "home" address that makes me uncomfortable (conceptually offensive/technically incorrect) when I order to a friends house. I know what it means so I fill in the correct value to get the result I want but the form should say "delivery address".
I've heard plenty of time to not put my address in my CV if I'm not currently living in a nice place. Especially for students looking for job, a foreign-sounding name and an address in a relatively bad neighborhood (where prices are cheaper) can be enough for people to reject your application.
> On the other hand, if the pizza place asks for a "home" address that makes me uncomfortable (conceptually offensive/technically incorrect) when I order to a friends house. I know what it means so I fill in the correct value to get the result I want but the form should say "delivery address".
I think we agree in that forms shouldn't ask for a "personal" information when they need a "practical" informations ("where do you live?" vs "where should we deliver your pizza?"). Names are like that, I think. 95% of the time, when websites ask for a name, they want something to put in marketing emails or when you're connected. I can understand that most people don't mind, but adding an option to opt out shouldn't be too hard.
For example, Iceland has very restrictive naming laws:
https://en.wikipedia.org/wiki/Naming_law
> Parents are limited to choosing children's names from the Personal Names Register, which as of 2013 approved 1800 names for each gender.[20] Since 2019 given names are no longer restricted by gender.[21] The Icelandic Naming Committee maintains the list and hears requests for exceptions.
Israel apparently demands first and last names:
> According to a law from 1956, a person should have a first name (more than one is permitted) and surname (a double-barrelled name is permitted).
Finland is, apparently, worse than Iceland:
> The Names Act of 1985 requires that all Finnish citizens and residents have at least one and at the most four first names. Persons who do not have a first name are obligated to adopt one when they are entered into the Finnish national population database. Parents of new-born children must name their child and inform the population registry within two months of the child's birth. The name may be chosen freely, but it must not be
> a name used primarily by persons of the other sex
> a name foreign to the naming tradition in Finland
> a surname, except a patronymic as last given name
> a name already used by a sibling, if this is to be the only given name.
There isn't really a working excuse for a broken schema.
Just have a blanket 'name' field.
The name someone wants to be called and their legal name isn't necessarily the same, either. If you're writing normal software, you shouldn't really care about these legal provisions. I guess you'd want a 'Billing Name' too in most cases.
I never said anything about "should" and I think this conflation of "what this person knows the world is" with "what this person thinks the world should be" is detrimental to discourse. I've seen it in multiple places, especially online, and it leads to arguments where both people actually agree on what should be, but one of them is talking about what is and the other person can't or won't tell the difference between the two.
The database should reflect the reality that humans are messy and not try to out-think / hardcode patterns.
Why do you think I'd have any choice in the matter?
https://en.wikipedia.org/wiki/%C3%81rni_Magn%C3%BAsson_Insti...
-- James C Scott, Seeing Like a State: How Certain Schemes to Improve the Human Condition Have Failed
That being said, I’ve gone though a similar caving-to-the-reality-of-database-schemas a few years ago, when I changed my music making artist name from a single word to a first name, last name schema.
Q: "What belongs to you but others use it more than you do?"
A: "Your name."
Given that your name is going to be used by other people a lot more frequently than you're going to use it yourself, it would make sense to make sure that your name is convenient for others to use.
Another thing - any person defining their own name could technically have a valid caveat that breaks some schema. I could decide that I can never have the same name after it's been uttered once. I could decide that my name is the last ten thousand numbers of pi. I could decide that my name is only allowed to be said by a person, and not rendered by a computer, because my name belongs to only the heavenly language of humans. I could decide that my name is the same as my social security number, which would make any system that doesn't have PCI-DSS control on my name out of compliance. There is no limit to the ways that a name can be restricted in a database, because there's no limit to the ways that a name can be defined. We decided collectively in the western English speaking world to assume that mononyms are more of a novelty than a real identifier.
There will be other restrictions. There always are. An example: the restriction that people using a website are literate. I think you'll find that there are far more illiterate computer users than there are people with mononyms, and yet no one designs websites to cater to those who are not able to read.
They don’t care about your SSN. They only care about credit card numbers (“PANs”).
I’m not sure a riddle that stumps young children is a good basis for how people should define their own identity. I certainly don’t think it should defer to the convenience of others. Especially when identity, or conflict thereof, can be a source of trauma and/or expose people to serious risk.
The riddle is a reflection of reality. I used it as an example to illustrate the idea that everyone - including children - implicitly know that a name is a social contract with everyone (including software and government databases) that uses that name.
> Especially when identity, or conflict thereof, can be a source of trauma and/or expose people to serious risk.
Identity absolutely can expose people to risk. No system, anywhere, has ever exposed someone to a special form of risk or trauma by asking for a first name and a last name. They absolutely have by asking for valid government names without privacy protections (as Facebook, Google+, and others have), but that's an orthogonal issue.
Countdown til this gets added to Falsehoods Programmers Believe About Names, if it hasn’t already.
It can be, for me. It depends on my state of mind when I encounter it. Recall isn’t always traumatic for me, for which I’m grateful. Sometimes when I hear my family name or I’m compelled to say/write it, along comes a flood of other mental references. Many of which are traumatic. When I’m compelled to put name values in forms I… have trained my mind well to consider how deeply I’m going into that memory cave, but I’m already there before I’ve evaluated whether I think that form needs my information for valid reasons.
Your “point” that people can substitute names for convenience of data collection is not avoiding trauma, it’s avoiding you bothering to accommodate it.
Me faced with just the fact of the whole of my name, my family history, I’m looking at abuse and suicide and misery. Even if I ultimately write in “eat” for first name and “butts” for last.
There are plenty of names (as enumerated in the “Falsehoods programmers believe” article linked from the post) which have complications already, without needing to invent new ones.
I'm not inventing any new ones. "Falsehoods programmers believe about names" is a superset of the examples I gave. If you have issues with the examples I gave, then it's because you have issues with what is implied by the article, and not about my examples. Everything that I said flows directly from reading that article and understanding its implications.
In my opinion, your post would have been more engaging and less polarizing had you omitted that section altogether: the fantastical hypotheticals draw the reader’s attention away, and do not seem to add anything that more staid examples would not have offered while avoiding reducing the salience of your main argument.
These are not always 'arbitrary naming whims'.
And yet somehow those aren't the people we see complaining (and I'm speaking as someone whose name currently gets mangled because I have the "wrong" number of names).
If it must match your given name, feel free to add `legal_name TEXT NOT NULL`, at the cost of some really awkward form filling for your users.
While middle names might be common in the anglosphere, in other countries (e.g. Germany) it is common to have multiple given names, which is not the same as having a single given (first) name followed by zero or more middle names.
Here is a simplified version of how it works in Germany:
Informally, people usually go by exactly one of the given names, but notably, this can be any one of the multiple given names, since these have equal status by law (this is different from going by your middle name, which have other legal implications, depending on the jurisdiction).
Using all given names is usually only required for official purposes (e.g. on a passport). Note that using a combination of more than one (but not all) of the given names or changing the order (without doing an official name change) is not allowed. A person can, of course, choose to use all given names in day to day life too.
This means that a person with the given names Foo Bar and the family name FizzBuzz may use any of the following names:
- Foo FizzBuzz
- Bar FizzBuzz
- Foo Bar FizzBuzz
Note that it is perfectly legal for this person to go by Bar FizzBuzz even though "Bar" is not their first name (of the given names).
Also note that changing your given names (other than their order) is not easily possible for most people (according to current law), so if you require someone to give you their full name (here Foo Bar FizzBuzz) for legal reasons, please also give the user the option to at least state a simplified version of their legal name for display purposes (such as any single one of their given names which may not be the first).
TL;DR
Do:
- Allow people to enter multiple given names, even if you also ask for middle names separately
- Consider that the same person may use a different single given name for different purposes (e.g. basic account details vs. name details in the shipping address)
Don't:
- Prompt for the full name (including all given/middle name, or the family name) unless you have to for legal reasons; if you do have to, at least let the user pick another name for display purposes, which may be derived from their full legal name in unexpected ways
- Omit any of the multiple given names because "middle names are optional" or "not part of the legal name"
- Forcibly abbreviate the remaining given names after the first given name
- Drop any part of a given or family name if the name consists of multiple components separated by a dash