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?

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
NaN
  • 549
  • 4
  • 10
  • 57
    Simple solution: don't ask the question. – Philip Kendall Nov 17 '18 at 13:26
  • 8
    It is not a solution, as some of the services created involve health care, where it is important to know the gender of the person. – NaN Nov 17 '18 at 13:45
  • 29
    If it involves health care, gender doesn't help. You need specific information, as both primary and secondary sexual characteristics vary within genders. You need a free-form text field where detailed confidential information can be filled in. – Jasmijn Nov 17 '18 at 14:01
  • 3
    Maybe there is a mistake on the term gender. I am from Brazil. In Portuguese the gender means the sexual definition of the person. – NaN Nov 17 '18 at 14:04
  • 1
    @Robin the dorm field will be specific of a service model. I am interested in basic information for the generic model first. – NaN Nov 17 '18 at 14:06
  • 2
    @paparazzo Open fields makes it more difficult to create reports on it. – NaN Nov 17 '18 at 15:13
  • 1
    Even Google asks for gender when we create a Google Account... – NaN Nov 17 '18 at 15:19
  • 28
    If this is about health care, then you need a field for "sex" not "gender". This will allow you to store it as male or female. – Clay07g Nov 17 '18 at 18:17
  • 2
    there are also more than 2 sexes, even in strictly medical terms. there are many intersex variations that can be very important to be aware of in a medical context. – user371366 Nov 18 '18 at 01:53
  • 3
    @Clay07g: That's also false. – R.. GitHub STOP HELPING ICE Nov 18 '18 at 02:41
  • 4
    @dn3s The vast, vast majority of medical work is not concerned with your **exact** combination of sex characteristics. That's why medical forms have you choose. Even the majority of intersex individuals have a primary sex, normally referring to their chromosomes rather than sexual organs, which is enough to serve the majority of medical situations that don't involve specialist work (which I doubt this is). However, if it's bound to hurt someone's feelings, I suppose giving the user the option of "other" isn't going to hurt anything (except unless the user confuses the field for gender....) – Clay07g Nov 18 '18 at 03:03
  • The moral of the story here is: **collect the information you need, nothing more, nothing less** – Clay07g Nov 18 '18 at 03:07
  • 6
    "Or does this offend LGBT people by saying that they are not truly male or female" is such a weird phrasing; there are plenty of LGBT folks who are absolutely truly male or female, and there are plenty of LGBT folks who are not and would absolutely bristle at the implication that to not be considered such is somehow "lesser." – fluffy Nov 18 '18 at 03:41
  • 2
    No health service on the planet wants to know the gender of the patient if the gender of the patient doesn't equate to the sex of the patient. Why would they want to know your weight if you can choose it yourself at any point in time? – insidesin Nov 18 '18 at 23:30
  • 1
    I think we are loosing the focus on data model engenheering. What I ask is if it would be strange to ask different kinds of gender from the two gender standard way. And I guess that it there are good ideas here. Please just don't go deep on the discussion to the point of offend or get offended, that was not what I meant when opening this question. – NaN Nov 18 '18 at 23:42
  • It would be strange to ask any question that isn't actually needed. Gender isn't needed for health services, sex is. – insidesin Nov 18 '18 at 23:46
  • Male/female/other is pretty typical. – user253751 Nov 18 '18 at 23:55
  • 2
    @insidesin You are completely incorrect. Medical professionals absolutely care about a person's stated gender and if you make it known to your primary care provider, pyschiatrist, or clinical therapist then it will absolutely be recorded on the persons medical file. It does matter for a number of reasons, eg. higher risk of certain conditions like depression, being a victim of sexual assault, and increased risk factors for suicide just to cherry pick a few. These are all important data points that may greatly impact what medical decisions are made. Please do research before stating opinions. – maple_shaft Nov 26 '18 at 20:12
  • Nope. I am correct. They need your age too, but if you can claim it is anything between 0 and 150, then they don't really need it. Good thing people aren't dumb enough to make age subjective. – insidesin Nov 26 '18 at 23:57

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
  • 132,749
  • 27
  • 279
  • 375
  • 1
    Even Google asks for gender when we create a Google Account... – NaN Nov 17 '18 at 15:19
  • 11
    @PSyLoCKe Google also lets you leave the gender unspecified and also allows user-specified genders. They use it to determine suitable pronouns (e.g. “him” or “her”) and to tailor ads. → https://support.google.com/accounts/answer/27442?hl=en#gender – amon Nov 17 '18 at 15:24
  • That's a good model. – NaN Nov 17 '18 at 16:00
  • 10
    Not just a "sexual health clinic," *any* health facility is going to want info about your biology. It affects what medicines you can use, what problems you're at risk for, and the likelihood of different outcomes. Given the modern debates around all this, I'd hesitate to use the term "gender" for a question asking for your biological details, as I don't know how a transgender person would respond to that inquiry. I don't know how you *can* ask for that info in a medical setting now, since the terminology has been so confused. – jpmc26 Nov 17 '18 at 21:52
  • "In a database, a VARCHAR field may be appropriate" - I hope you mean `Gender(ID: Int, Description: VARCHAR)` and not `Person(..., Gender: VARCHAR)`. – NotThatGuy Nov 17 '18 at 22:24
  • @NotThatGuy Either may be a valid model, depending on your assumptions. I see no strong reason why a separate table would be necessary if that value is effectively a free-form field. That's just going to make queries more complicated because you get to do one extra join. – amon Nov 17 '18 at 22:34
  • 5
    @PSyLoCKe: *"That's a good model"* - for Google. But your application is has probably different requirements. – Doc Brown Nov 17 '18 at 23:04
  • 2
    That's good advice about not collecting unless you need it. The question is inherently personal and likely to alienate at least a few users who were on the fence about using your product. – Owen Nov 18 '18 at 03:00
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
Wes Toleman
  • 972
  • 7
  • 9
  • 5
    While there may be such a standard, it's out of touch with reality and should not be used. – R.. GitHub STOP HELPING ICE Nov 18 '18 at 02:43
  • 7
    @R.. - What about it is outdated, and any suggestions on better ones? – Malady Nov 18 '18 at 03:50
  • 2
    There's no single property that is "sex", only various sex characteristics that are correlated across populations but not equivalent. – R.. GitHub STOP HELPING ICE Nov 18 '18 at 03:59
  • 7
    And "out of touch with reality" doesn't mean "outdated". It was no more correct in the past. – R.. GitHub STOP HELPING ICE Nov 18 '18 at 04:01
  • It also depends on the level of abstraction or specificity you need. In my RPG, for example, gender is modeled as a collection of traits, with the ability to define new genders for players that want to. Whereas in a website with real-world personal info, you'd ideally want to limit how much you store, and possibly not store sex or gender *at all* if it wasn't strictly necessary, as some of these answers have noted. –  Nov 18 '18 at 04:52
  • 8
    @R.. Could you explain how this is "out of touch with reality"? It sounds like you are mixing _gender_ (what someone identifies as) and _sex_ (what someone is born as, determined via genitalia). The ISO/IEC standard is only for sex, not gender. – n_b Nov 18 '18 at 06:16
  • 5
    @n_b A small percentage of people are born without a clearly determined sex, see [Intersex](https://en.wikipedia.org/wiki/Intersex). Some athletes don't find out until later in life when they are banned from competing as a female because they have abnormal chromosomes. – Carl Walsh Nov 18 '18 at 20:16
  • 2
    I haven't read through this completely, but here's a more recent proposal for gender identity and sex classifications in EMRs: https://digitalcommons.ohsu.edu/cgi/viewcontent.cgi?article=16727&context=etd – Carl Walsh Nov 18 '18 at 20:19
  • @CarlWalsh That's a pretty good paper! It suggests asking for current gender, assigned sex at birth, and pronouns separately (see p. 21) while noting that listing which organs are present would be even more useful for providing optimal care. It mentions that outside of a healthcare context, Facebook's solution of providing an extensive list of genders is pretty good, as they developed that list in cooperation with LGBT+ organizations in each country. – amon Nov 18 '18 at 22:39
  • **Please use comments to clarify, discuss or improve the above answer provided. This is not a discussion board for debate about the differences and viewpoints regarding sex and gender.** – maple_shaft Nov 26 '18 at 19:52
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.

Chris J
  • 259
  • 1
  • 9
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,543
  • 1
  • 11
  • 15