8 ms·
So what is the solution now? Have a single full Unicode 'name' field which is over 200 characters long? What is even the longest possible name? The ex german
by LordHeini 8y ago
So what is the solution now?
Have a single full Unicode 'name' field which is over 200 characters long?
What is even the longest possible name?
The ex german minister of defence has 108 characters in his ridiculous name.
- mauricioc 8y agoPortuguese-origin names can be a bit ridiculous in this sense as well. Famously around here, the first emperor of Brazil was named "Pedro de Alcântara Francisco António João Carlos Xavier de Paula Miguel Rafael Joaquim José Gonzaga Pascoal Cipriano Serafim" [1]. That's 128 characters, beating Picasso's example! The tradition of long names persists to this day, although not to this extreme. [1] https://en.wikipedia.org/wiki/Pedro_I_of_Brazil#Birth https://en.wikipedia.org/wiki/Pedro_I_of_Brazil#Birth
- posterboy 8y agoRelevant stackexchange answer [1]: > one second-century consul was named Quintus Pompeius Senecio Roscius Murena Coelius Sextus Iulius Frontinus Silius Decianus Gaius Iulius Eurycles Herculaneus Lucius Vibullius Pius Augustanus Alpinus Bellicius Sollers Iulius Aper Ducenius Proculus Rutilianus Rufinus Silius Valens Valerius Niger Claudius Fuscus Saxa Amyntianus Sosius Priscus. > The ex german minister of defence That would be "Dr. Copy Paste" a.k.a. Karl-Theodor Maria Nikolaus Johann Jacob Philipp Franz Joseph Sylvester Buhl-Freiherr von und zu Guttenberg [2]. [1] What linguistic impact, if any, has the the Roman three name naming system left on modern Romance and European languages? https://linguistics.stackexchange.com/a/29277 https://linguistics.stackexchange.com/a/29277 [2] https://de.m.wikipedia.org/wiki/Karl-Theodor_zu_Guttenberg https://de.m.wikipedia.org/wiki/Karl-Theodor_zu_Guttenberg
- JetSetWilly 8y agoThat still violates point 11: "People’s names are all mapped in Unicode code points." It seems like it is impossible to address all these points. Obviously there's no way for me to allow people to enter their names which don't have any known code point. So at some point you're always going to be saying "tough luck, you must adapt your name - or come up with something - that confirms to these constraints." And I am sure people are clever enough to do so.
- gvx 8y agoThat point and point 40 ("People have names") can't be solved by technical means. There are two options here: - You can make name fields optional for people without (representable) names - You can loosen what the field stands for to "what you want us to call you": for people who don't have a (representable) name, they can choose an alternative, without implying the user's (lack of) name is Wrong.
- Piskvorrr 8y agoThis is not a design requirement - just something to keep in mind when designing a system. Otherwise, you're going to have a tough time requiring a `tussenvoegsel` form field in cultures where nobody knows what that is (spoiler: it's the Dutch "van " prefix; been there), or requiring that everyone has a middle name (USA), or a second surname (Mexico). In other words, the usual problem is not "how do I fulfill all of these things?", but "how do I convince the USians that ASCII is not just insufficient, but that not even using Latin-1 won't do?"
- raverbashing 8y agoYes, you can't solve all cases but I'm betting someone will find a workaround for the sub 0.1% of those cases. Much more rare than your system breaking because it chokes on the apostrophe in O'Donnels or something similar.
- ZiiS 8y agoYou could just allow them to draw/upload an image.
- gvx 8y agoThere is no single solution. In terms of complexity required, I would suggest: - Not having a field, if you don't need it. - Having a single Unicode variable width field for "how would you like us to call you" (so not necessarily a full or formal name), with a maximum length of at least 1K characters. - Having two such fields for "given name" and "full name", with the understanding that neither may match the legal name because of practical limitations. Which field you use depends on the formality required by the specific use. If your business is related to certain government, healthcare, legal, etc. stuff you'll probably have domain specific requirements, but I could imagine you might need to be able to have several names connected to a single person. One scheme that might be useful in such a situation might be: - Having a set of (description, name) Unicode string tuples (variable length, generous max length). For example, one might have: {("Given name", "John"), ("Birth name", "Vera de la Cruz"), ("Legal name", "John Quincy de la Cruz-Stevens")}
- naravara 8y ago>- Not having a field, if you don't need it. - Having a single Unicode variable width field for "how would you like us to call you" (so not necessarily a full or formal name), with a maximum length of at least 1K characters. - Having two such fields for "given name" and "full name", with the understanding that neither may match the legal name because of practical limitations. Which field you use depends on the formality required by the specific use. I look forward to being in line to check into a hotel room while the clerk tries to puzzle out how to lookup the reservation for a guy whose name is just a string of emoji.
- masklinn 8y ago> Have a single 'name' field which is over 200 characters long? Or, as postgresql calls it, "varchar": > The storage requirement for a short string (up to 126 bytes) is 1 byte plus the actual string, which includes the space padding in the case of character. Longer strings have 4 bytes of overhead instead of 1. Long strings are compressed by the system automatically, so the physical requirement on disk might be less. Very long values are also stored in background tables so that they do not interfere with rapid access to shorter column values. In any case, the longest possible character string that can be stored is about 1 GB.
- JessicaTG 8y agoOr just use "text" :-) There's no storage advantage using varchar in PostgreSQL. Just the length constraint checking.
- masklinn 8y ago> There's no storage advantage using varchar in PostgreSQL. Just the length constraint checking. Contrariwise there's no advantage to using text either.
- throwaway2048 8y agoLonger than 200 characters?
- masklinn 8y agoMakes no difference to postgres. The one and only difference is that you can limit the length of a varchar when you define the column but that aside the storage mechanism is the one I quoted above for both, and for char as well: > There is no performance difference among these three types (nb: varchar, char and text), apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead. And for applications which introspect the schema and display different field types depending on the column type, well you may not want a textarea for a name field.
- Piskvorrr 8y agoWell...there's Monty Python's John Gambolputty. https://www.youtube.com/watch?v=UDPqB9i1ScY https://www.youtube.com/watch?v=UDPqB9i1ScY While a comical exaggeration, there simply isn't a hard limit - just somebody drawing the line and saying "640 kB should be enough for anybody." As for "ridiculous" - having many names is apparently a nobility custom, even if most people don't insist on using the full name in everyday matters: https://en.wikipedia.org/wiki/Karel_Schwarzenberg https://en.wikipedia.org/wiki/Karel_Schwarzenberg is also Karl Johannes Nepomuk Josef Norbert Friedrich Antonius Wratislaw Menas Fürst zu Schwarzenberg and Karel Jan Nepomuk Josef Norbert Bedřich Antonín Vratislav Menas kníže ze Schwarzenbergu (oh look, several non-equivalent but canonical names!)
- cabalamat 8y ago> So what is the solution now? The solution on Machine-Readable Passport is that everyone has a surname and one or more given names, using only A-Z characters, for a total of 39 characters. https://en.wikipedia.org/wiki/Machine-readable_passport https://en.wikipedia.org/wiki/Machine-readable_passport Everyone who travels internationally has a name in this format, even if they have other names for other purposes as well. I would suggest for a lot of software, the name in Machine-Readable Passport format, plus another field "How would you like to be addressed" allowing any unicode characters, would satisfy most requirements.
- isbvhodnvemrwvn 8y agoNow you assume everyone travels internationally (and that assumes they travel with a passport, not necessarily true for instance in the EU), or even remembers how their name was botched by this format.
- cabalamat 8y ago> Now you assume everyone travels internationally I'm not making that assumption. I'm saying that in terms of all the directions that name-processing and name-recording software are pulled in, it's a compromise that works for many purposes. It isn't perfect, and I'm sure some people can come up with edge cases where other data formats might work better.
- JustSomeNobody 8y agoFirst of all, there should be no artificial limitations. This is something that always comes back to bite developers.
- logfromblammo 8y agoName field is a blob that can contain a vector graphic with animation capability, or an audio file. Each individual can have 0 to n names. For each name, allocate a canvas for the image and scale the name image into it, or present audio controls. A person with no name may be identified by pronouns. If someone manages to change their name to a taste, smell, or tactile sensation, you may need to revise your system again. A deaf person may consider their name to be a series of hand movements. A mariachi may identify by their signature grito. A luchador may be known mainly by the pattern on their mask. A corporation has its logo, trademarks, and audio marks ("by Mennen", Meow Mix jingle, etc.). A tiny purple musician could switch to an unpronounceable symbol, to protest something in their recording contract. Clowns are identified by their egg. If your name is a million Unicode characters long, you might need zooming and panning capability for your name canvas.