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.
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.
> 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
[2] https://de.m.wikipedia.org/wiki/Karl-Theodor_zu_Guttenberg
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
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.
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.
- 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")}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.
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.
There's no storage advantage using varchar in PostgreSQL. Just the length constraint checking.
Contrariwise there's no advantage to using text either.
> 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.
"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.
- 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.
Much more rare than your system breaking because it chokes on the apostrophe in O'Donnels or something similar.
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?"
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 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!)
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.