Understanding 3rd Normal Form Violation in Database Normalization

normalization

I've got a photo review type of application, where the customer wants to have an option for the user to flag issues with the photos. So, for instance, a photo could be tagged as "fuzzy," "grainy," or "other." If "Other" is selected, a brief text description is required.

I am thinking I should create one table with all the issue types. Another table, will have foreign key relationships to the photo id, and the issue type id. I am thinking this table should also have a text type column for the "other" text if "other" is selected, otherwise that column will be null.

My dilemma, is, will this be a violation of normalization rules? If the "Other" text column is not null, then the assumption can be made that the issue type id will always be the one for "Other." So, that would be a transitive dependency, right? Any ideas on how to implement this without violating 3rd normal form?

Best Answer

If the column OtherText is null, you do not know the value of the column IssueType. It could be fuzzy or grainy. So IssueType is not dependent on OtherText.

Your design is not a 3NF violation.