TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

You Win, Broken Database Schemas

43 pointsby ggooover 3 years ago

14 comments

mulmenover 3 years ago
What&#x27;s the proper solution here? Just a &quot;name&quot; field? Maybe formal_name and informal_name so you can do things like &quot;Howdy ${informal_name}&quot; without awkwardly using a last name?<p>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&#x27;t it M01 D10 Y2022?
评论 #29885785 未加载
评论 #29885593 未加载
评论 #29886218 未加载
评论 #29885655 未加载
评论 #29885473 未加载
评论 #29885408 未加载
评论 #29885739 未加载
评论 #29885360 未加载
评论 #29885621 未加载
评论 #29885628 未加载
Zababaover 3 years ago
&gt; Anyone who claims to have their identity figured out is either in denial or stopped digging into it for the time being. The rabbit hole truly never ends.<p>I agree with that part, but I also think that often giving a name isn&#x27;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&#x27;m saying &quot;put what I want in a box, I&#x27;ll handle it from here&quot;. I feel the same for names. It&#x27;s not about expressing who I am deeply, it&#x27;s about giving something to people that they can use.<p>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&#x27;s enough. They can put the information that they want to transmit to me in a box, and I&#x27;ll take a look.
评论 #29885654 未加载
评论 #29885706 未加载
kibwenover 3 years ago
Software makes processes more efficient. But it does so at the cost of hardcoding assumptions. These days, effecting social change requires not just convincing people (already quite a tall order), but also changing the software that automatically encodes the assumptions made under the previous societal context. As an example, consider abolishing daylight savings time: nowadays you not only have to convince people that it&#x27;s a good idea, but you also either need to convince them that all the broken software that assumes DST is either worth fixing or worth putting up with forever. Or consider spelling: in the past spelling reform was a thing that actually ever happened, but these days any attempt at spelling reform would be crushed by the inertia of automatic spellcheck (on the flip side, it might be easier to convince Google and Apple to change their spellcheck dictionaries than to convince people to change their spelling on their own); sadly, English will be stuck with the tragedy of &quot;ough&quot; forever.
mslaover 3 years ago
Sadly, it isn&#x27;t always up to the people who design the schemas.<p>For example, Iceland has very restrictive naming laws:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Naming_law" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Naming_law</a><p>&gt; Parents are limited to choosing children&#x27;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.<p>Israel apparently demands first and last names:<p>&gt; 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).<p>Finland is, apparently, worse than Iceland:<p>&gt; 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&#x27;s birth. The name may be chosen freely, but it must not be<p>&gt; a name used primarily by persons of the other sex<p>&gt; a name foreign to the naming tradition in Finland<p>&gt; a surname, except a patronymic as last given name<p>&gt; a name already used by a sibling, if this is to be the only given name.
评论 #29885892 未加载
评论 #29885536 未加载
评论 #29885606 未加载
评论 #29885569 未加载
评论 #29885790 未加载
shooover 3 years ago
&gt; The invention of permanent, inherited patronyms was, after the ad­ministrative simplification of nature (for example, the forest) and space (for example, land tenure), the last step in establishing the necessary preconditions of modern statecraft. In almost every case it was a state project, designed to allow officials to identity, unambiguously, the ma­jority of its citizens. When successful, it went far to create a legible peo­ple. Tax and tithe rolls, property rolls, conscription lists, censuses, and property deeds recognized in law were inconceivable without some means of fixing an individual&#x27;s identity and linking him or her to a kingroup. Campaigns to assign permanent patronyms have typically taken place, as one might expect, in the context of a state&#x27;s exertions to put its fiscal system on a sounder and more lucrative footing. Fearing, with good reason, that an effort to enumerate and register them could be a prelude to some new tax burden or conscription, local officials and the population at large often resisted such campaigns.<p>-- James C Scott, Seeing Like a State: How Certain Schemes to Improve the Human Condition Have Failed
noizejoyover 3 years ago
Language is incredibly contextual. Database schemas are mostly rough approximations, generally driven by the principle “close enough to be useful” rather than “a one-to-one model of reality”.<p>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.
Edman274over 3 years ago
A riddle that stumps 3rd graders:<p>Q: &quot;What belongs to you but others use it more than you do?&quot;<p>A: &quot;Your name.&quot;<p>Given that your name is going to be used by other people a lot more frequently than you&#x27;re going to use it yourself, it would make sense to make sure that your name is convenient for others to use.<p>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&#x27;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&#x27;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&#x27;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.<p>There will be other restrictions. There always are. An example: the restriction that people using a website are literate. I think you&#x27;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.
评论 #29886092 未加载
评论 #29885893 未加载
评论 #29885846 未加载
geraldyoover 3 years ago
We&#x27;re currently making an effort to restructure our databases so that we can accommodate mononyms. Nice to see at least one person might find that cool lol
oogetyboogetyover 3 years ago
&quot;As with many falsehoods that programmers believe, names have surprising complexity. Although Americans often assume users will have a single “first” and “last” name separated by a space character, this is by no means true around the world. Some last names (“van Hardenberg”) include spaces, as do some first names (“Sher Minn”). Some people have a single name (“Madonna”). In Japan, family names are written first, then given names. For an in-depth treatment of how to correctly handle names, we recommend this enjoyably written W3C guide, but our brief recommendation is that you ask your users how they like to be addressed, and what to call them in a formal context.&quot; <a href="https:&#x2F;&#x2F;www.w3.org&#x2F;International&#x2F;questions&#x2F;qa-personal-names" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;International&#x2F;questions&#x2F;qa-personal-names</a> <a href="https:&#x2F;&#x2F;www.inkandswitch.com&#x2F;cambria&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.inkandswitch.com&#x2F;cambria&#x2F;</a>
lmmover 3 years ago
We live in a society and names are tools for relating to other people with. I think it&#x27;s fine to expect people to either conform to local cultural conventions or accept responsibility for any consequences themselves. I changed the name I go by when I immigrated to one that fits better with the people around me (and would have changed it more thoroughly if I&#x27;d known before the current form of it got entrenched in this country&#x27;s bureaucracy). Expecting the world to bend to your arbitrary naming whims (and it is explicitly a personal whim in this case) instead feels pretty entitled.
评论 #29887903 未加载
Orouover 3 years ago
This makes me really curious about how people with legal mononyms (Ye, Cher, etc.) have their taxes filed or medical forms filled out.
评论 #29885997 未加载
评论 #29886098 未加载
paiuteover 3 years ago
oh please, shouldn&#x27;t it xe. website not Christine. I have 4 names and it doesn&#x27;t always work out. It&#x27;s not a big deal to not accommodate xe and Socrates perfectly either.
l0b0over 3 years ago
The solution really is simple: `preferred_name TEXT NOT NULL`<p>If it <i>must</i> 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.
njkleinerover 3 years ago
While on the topic of names, could we discuss the difference between given name(s) and middle names and the implications this has on anglocentric software&#x2F;database design?<p>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.<p>Here is a simplified version of how it works in Germany:<p>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).<p>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.<p>This means that a person with the given names Foo Bar and the family name FizzBuzz may use any of the following names:<p>- Foo FizzBuzz<p>- Bar FizzBuzz<p>- Foo Bar FizzBuzz<p>Note that it is perfectly legal for this person to go by Bar FizzBuzz even though &quot;Bar&quot; is not their first name (of the given names).<p>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).<p>TL;DR<p>Do:<p>- Allow people to enter multiple given names, even if you also ask for middle names separately<p>- 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)<p>Don&#x27;t:<p>- Prompt for the full name (including all given&#x2F;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<p>- Omit any of the multiple given names because &quot;middle names are optional&quot; or &quot;not part of the legal name&quot;<p>- Forcibly abbreviate the remaining given names after the first given name<p>- Drop any part of a given or family name if the name consists of multiple components separated by a dash