29

I am modeling a database that should be used as generic non-functional requisite for all services of the startup company, like persons, users, services and commercial data like coupons, signature packages, etc.

I am thinking about the gender model. In these modern days and with different laws across countries about subjective identity, should I take that into consideration and model my Person entity with more than just the male and female options?

Options are: undefined, not-answered, other, transgender... or any other industry standard that I am unaware of...

Or does this offend LGBT people by saying that they are not truly male or female?

NaN
  • 549

4 Answers4

70

First consider why you need to collect this data. Do not collect it if it is unnecessary. For example:

  • You would like to address the individuals properly. Then, simply ask for their preferred form of address/honorific/title, such as “Mr.” or “Mx.”. This should be a free-form field, not dropdown list. There are more possible forms of address than can be enumerated, especially if you consider clerical, academic, or military forms. There is not necessarily any relation between gender and honorific.

  • You would prefer to analyze behavior by gender. Then you will likely not be interested in genders other than male/female. In that case, offer three choices: female, male, or other/prefer not to say. The last could be a free-form text box that can be left empty.

    Note that collecting and using this kind of data may be subject to privacy laws, so make sure the collection and analysis is legal. E.g. under the GDPR you may have to acquire the user's informed consent first, but that only applies if you or potential users are in the EU.

  • You need to process this data for a specific legal or medical reason. Then, do not guess which information may be needed but find out your actual requirements. E.g. in some jurisdictions only two genders are legally recognized, but the legal gender might be irrelevant in software used for a sexual health clinic.

    You may want to keep your software portable and future-proof, so do not assume that there is a fixed enumeration of genders. Make it possible to update this list e.g. by updating a config file. You may also want to assume the possibility that there is no fixed list. In a database, a VARCHAR field may be appropriate.

Because of these differences in purpose and context, it is difficult to build an universal model for the “gender” concept.

Note: the English word “gender” describes a social role or identity, whereas the term “sex” describes biological aspects such as physiology or genetics. Neither of these concepts is unambiguous. Again, it depends on the context as to which of these concepts is relevant (if at all) and which values are “allowed” in that context.

amon
  • 135,795
26

Sometimes the term gender may be used when sex is meant. Sex is defined by a person's biological traits whereas gender is determined by identity.

The standard for sex is codified by the ISO/IEC 5218 standard [download].

There are four available values

0 = not known,
1 = male,
2 = female,
9 = not applicable

Similar values can be given for gender

male
female
non-binary
prefer not to say
14

As you mentioned Healthcare, it's worth looking at the NHS Data Dictionary for an example, used in the UK as one of the national coding systems for health data (alongside SNOMED).

Depending on whether you want sex or gender, there are two codings: for gender, it's the PERSON STATED GENDER CODE, whilst for sex it's PERSON PHENOTYPIC SEX CLASSIFICATION.

As it turns out both coding schemes are currently identical, but they may diverge. As at time of writing, they are:

  • 1 - Male
  • 2 - Female
  • 9 - Indeterminate

Within the international SNOMED classifications, the concept 365873007 has gender codes for male, female, unknown and transgender; and the UK extensions to international SNOMED have added an option for non-binary. For biological sex, the concept 429019009 has codes for female, male, intersex, indeterminate, and transsexual.

Callie J
  • 259
7

If you do not need the gender, do not ask or store it. As you mentioned laws, nowadays laws in various countries increasingly disourage use of personal information unless it's essentional to the functionality. Snap googling shows that Brazil is not excluded from it. Easies way to stay safe is do not handle the information at all. Do not include this field, or others like it, to the "basic information". Limit it to nickname and email, to recover password, that's it. For rest, provide free-form text area where the person can describe oneself, who wants could write there all their first names and surname, as well as their gender, religion, sexual orientation, what they eat or whatever.

If you do need the gender for some purpose, it should be be defined by the purpose. You said healthcare. For healthcare such matter should be unambiguously defined by relevant regulations. I have not worked with healthcare myself, but those who did say dealing with them is not easily avoided. Also, I would say it should be handled with same security standards as other medical information.

max630
  • 2,605