Skip to content

Instantly share code, notes, and snippets.

@ststeiger
Created April 11, 2025 15:41
Show Gist options
  • Save ststeiger/eb96eaa077fe2ee14b02970198a97cc8 to your computer and use it in GitHub Desktop.
Save ststeiger/eb96eaa077fe2ee14b02970198a97cc8 to your computer and use it in GitHub Desktop.
SQL Normal Forms
https://www.perplexity.ai/search/can-you-find-me-information-re-Kv6Kcel1R..clYeGhwa6xg
OK, so to put this down to the Level of an intelligent 12year old:
First normal form is violated if
A) cells have multiple values inside the same cell (e.g. separated by separator)
or
B) there are repeating columns for the same thing, e.g. Tel1, Tel2, Tel3,
Second normal for is violated if
A) first normal form is violated
B) when you have composite primary keys on a table, and a column/cell has a value that does only depend on a part of the primary key, not the entire primary key
Third normal form is violated if
A) any preceding normal forms are violated
B) If the value of a column/cell (that is not part of the key) depends (directly or indirectly) on the value of a column/cell that is also not part of the key
The BCNF normal form is violated if
A) any preceding normal forms are violated
B) You cannot include a field (such as employee Name) if you already included the Primary key from which that field's value can be infered (employee Name can be inferred from employeeID)
4th normal form is violated if (note: this is apparently wrong)
A) any preceding normal forms are violated
B) when values in the same columns repeat in different rows (so that they should be in a different table)
B should be
"When values in one column are paired with multiple independent sets of values in other columns, and these pairings repeat across rows, the table violates 4NF because these independent sets should be stored in separate tables."
whatever that is supposed to mean
5th normal form is violated if
A) any preceding normal forms are violated
B) when a table can be split into two or more smaller tables and then recombined (joined) without losing any information.
6th normal form is violated if
A) any preceding normal forms are violated
B) if in a table where values depend on an interval, all non-key values depend on the interval non-independently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment