How to save a username in a records table

Introduction

Damn, this is harder than I thought.

Some people have camel-case camel case names such as McDonald or O'Ferncher , and some don't have a two-line name, but the hyphen name is similar to Bowes-Lyon . ] or just a name like Honovi Hohnihhohkaiyohos (Strong wolf with a high back). In some cultural spaces, such as:

  • In Portuguese, you have more than 1 last name and more than 1 name (default).
  • In Russia, you have a middle name ( middle name ), that is, necessarily .

In some places, you have gender inequality, and for a formal appeal to a person you need to use a prefix , for example: Sir (where gender can be male, female and intermediate). And yes, the prefix changes depending on the personโ€™s age.

As if this is not enough - people can and will marry (this happens quite often) (this can be done several times), and this is the standard user setting for at least one partner to change their last name . In most places, people can change their name, or at least the name. alt text

More details

It doesnโ€™t matter if you want to answer a question, just give a hint what I'm trying to do.

The tables in which I want to store the names are in the xml and appengine datastore with the twig object storage interface (among other things, I use twig because it allows me to compile the schema). The data itself can come from different places, and there is probably a case where the old name is used (that is, multiple names are stored).

My best guess:

 @XmlAttribute @Key protected Long id; @XmlElement(required = true) final protected List<String> lastName; @XmlElement(required = false) protected String middleName; @XmlElement(required = true) final protected List<String> firstName; @XmlElement(required = true) protected Boolean isMale; @XmlElement(required = true) protected Date birthday; //+locale for naming? 

Writing a function or prerequisites for the compareTo method just makes my day ... I'm seriously considering zero fault tolerance. Yes, the meaning of the existence or absence of apostrophes, spaces and other characters or case differences can lead to different results. (And for cynical bastards, it's not homework.)

The question was: How to store the names of people in the records table?

+5
source share
1 answer

If you are looking for a simple universal solution, I think you will find that it does not. Read this blog post and cry.

And when you finish crying, look at this document , which is trying to model names for an American American audience. Obviously, he makes many simplifying assumptions, which are probably invalid.

+4
source

All Articles