G
G
goodw842016-11-17 04:25:20
PostgreSQL
goodw84, 2016-11-17 04:25:20

What type of data to choose for floor storage?

Table of users, you need to store the gender of the person.
Options:
1. Bitfield
2. Boolean
3. Char(1) / Varchar(1)
4. Enum ("m", "f")
Question: what type to choose? Filtering data on this field will be.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kuznetsov, 2016-11-17
@DarkRaven

If there is a need to make the floor optional, then you can make an enum by adding a value for indefinite (unfilled) there, or use boolean, allowing NULL there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question