I have recently started using enums to more efficiently store information in a database. I was wondering if there is some way to use them to store multiple true values. To elaborate, in a enum such as GenderEnum
I would store male as 0, female as 1, OtherUnclear as 3 in the database.
public enum GenderEnum : short
{
Male,
Female,
OtherUnclear
}
But what if I wanted to store multiple true values? For race for example somebody could be multiracial. How would I store somebody who was, say, Black and White efficiently in a database?
public enum RaceEnum : short
{
White,
Black,
Hispanic,
Asian,
Native,
Unclear
}