When storing a user’s religion in a “User Table”, so that if you look down a column you would see “Christian” many times, “Muslim” many times, etc considered a failure of a normal form? Which form?
The way I see it:
-
1nf: There are no repeating columns.
-
2nf: There is no concatenated primary key, so this does not apply.
-
3nf: There is no dependency on a nonkey attribute.
Storing user religion this way does not seem to fail any normal form, however it seems very inefficient. Comments?
Your design supports all normal forms. It’s fine that your attribute has a string value. The size of the data type is irrelevant for normalization.
The goal of normalization is not physical storage efficiency — the goal is to prevent anomalies. And to support logical efficiency, i.e. store a given fact only once. In this case, the fact that the user on a given row is Christian.