News for hackers. Stuff that matters.
Re:A humble guide to database schema design by clon on Tuesday April 07, 2020 @08:37PM (#22809026)
Absolutely! Having 'name_given', 'name_middle', 'name_family' or some nonsense like this is one of the most common mistakes in database (and application) design, usually made by culturally narrow-minded Western developers.

Take names in Myanmar [1] as an example. From Wikipedia:

> Burmese names lack the serial structure of most modern names. The Bamars have no customary patronymic or matronymic system and thus there is no surname at all.

That said, it is hard to push back on a business requirement to sort users A-Z based on family name, just because.

[1] https://en.wikipedia.org/wiki/Burmese_names

Re:A humble guide to database schema design by true_religion on Tuesday April 07, 2020 @10:50PM (#22809595)
It’s not really a mistake to localize your application design and UX to the first major market that you are targeting.

To immediately target the entire world, will leave you burning cash as you figure out all 200+ counties customs, or with a hopelessly generic app that is hard to use for everyone, pleases no one, and hard to extend in culturally relevant ways.

Re:A humble guide to database schema design by Xelbair on Wednesday April 08, 2020 @03:17AM (#22810720)
This kind of mentality lead to huge fuckup that were the ASCII code-pages, and we are still suffering fallout from that.

I still cannot input one of letters in my name into most systems for example.

There is a decent middle ground, as you can store first-name(or equivalent), last name(or equivalent) for sorting purposes... and a display name which is culture sensitive.

Re:A humble guide to database schema design by alharith on Tuesday April 07, 2020 @09:46PM (#22809337)
> usually made by culturally narrow-minded Western developers.

Usually made by developers who realize this will suit 99% of their users. I'm culturally eastern myself and realize this.

Re:A humble guide to database schema design by franciscop on Tuesday April 07, 2020 @10:52PM (#22809606)
Non-American here. I believe US citizens often have a middle name. We Spanish-speaking people have 2 last names. Japanese reverse the "firstname" and "lastname". I had a lot of troubles when I tried to buy a ticket in a Chinese website a few years back. So no 99% of the users don't follow the "firstname" and "lastname" pattern. We might put up with it, but it doesn't suit 99% of the users as stated.
Re:A humble guide to database schema design by jayshua on Wednesday April 08, 2020 @12:54AM (#22810182)
To clarify the comment you are replying to (not the author): 99% of their users. Clearly 99% of people globally aren't going to follow that custom, but many (most?) applications written in the US have a user-base where 99% of their users will follow the custom. Switching to something more globally applicable isn't necessarily a non-zero cost either - using a single name field has downsides like making sorting by last name more difficult (a ubiquitous thing in the US) and not being able to display first vs. last name where culturally expected.
Re:A humble guide to database schema design by franciscop on Wednesday April 08, 2020 @02:15AM (#22810482)
But I am replying exactly to that. I don't believe 99% of the users of a given application for any non-trivial number of users conform to have exactly a "firstname" + "lastname".

In the US it's not rare to have a middlename. And there are many Latinos, Japanese and Chinese in the US as well, all of them which do not follow the convention.

Re:A humble guide to database schema design by funcDropShadow on Wednesday April 08, 2020 @06:57AM (#22811778)
A lot of US-based startups target the global market early on, although they behave as if they only had to cater to US users.

As a side note, the group of HN commenters seem to fall into two categories, the first think group of commenters seem to think HN is a mostly US only forum, whereas the second group seems to think HN is an international forum. I don't know what the truth is or whether there is one at all. But I know, that it sometimes irritates me, when commenters or posters assume, that they are talking only to US citizens.

Re:A humble guide to database schema design by renewiltord on Tuesday April 07, 2020 @11:19PM (#22809734)
I suspect it's usually accidental but I feel very little rancor towards them. You solve things the way you think about them (until yesterday it wouldn't have ever struck me that a currency symbol could be in the middle of the value). And that's how, I suppose, you end up with a bunch of people with US Visas that say FNU (first name unknown) in front because they only have one name.
Re:A humble guide to database schema design by pkulak on Tuesday April 07, 2020 @10:33PM (#22809518)
That's why you store a "name" field, and then spend the rest of your carrier writing parsing logic to answer silly management questions.
Re:A humble guide to database schema design by yla92 on Wednesday April 08, 2020 @07:47AM (#22812034)
A Burmese here and thanks for pointing out! I have to explain to other people that we don't follow the father's name most of the time. Some names the father's name at the end. e.g if my father name is Myint Swe, my name could be Ko Ko Myint Swe.
Re:A humble guide to database schema design by hinkley on Wednesday April 08, 2020 @03:31AM (#22810800)
It is typical to sort such things in multiple columns. You just need to decide if people with no last name sort first or last.