Normalisation Demonstration
Why Stack Overflow recommends it
Stack Overflow users link it when answering database design questions where someone needs a quick, visual walkthrough of normal forms and splitting tables.
Recommended by 2 people across 2 different months, 2011 to 2015.
What it is
A short screencast by Adam McNicol that walks through normalising a sample data set to third normal form (3NF) step by step. It uses an interactive teaching resource, linked in the description, as the example data.
What people said
Recommends Francis Rodgers · 2011-08 · Stack Overflow · on “'Many to two' relationship”
This question shows that you don't fully understand entity relationships (no rudeness intended). Of which there are four (technically only 3) types below: One to One One to Many Many to One Many to Many One to One (1:1): In this case a table has been broken up into two parts for purposes of complying with normalisation, or more usually the open closed principle. Normalisation [this video] compliance: You might have a business rule that each customer has only one account. Technically, you could in this case say customer and account could all be in the same table, but this breaks the rules of normalisation, so you split them and make a 1:1. Open-Close principle [LINK] compliance: A customer table,
Recommends Sean H Jenkins · 2011-12 · Stack Overflow · on “Register - Login Database Scheme”
If you're using PHP then when you insert a record you can instantly retrieve the ID created using mysql_insert_id(). You then use this to create other records as your foreign key. With regards to redirects, I'd simply get the user type from the database and then check the type of user and redirect to page required. Generally though the tables you have created do not correlate properly. Remember the defining thing about the people using the system is that they are a person, and shouldn't be deined by their job role. They should have a account_type_id linking to another table. Otherwise you have three tables essentially holding the same information. For example you should have your tables like
Cites Piotr Sobiegraj · 2015-02 · Stack Overflow · on “Handling 300+ Columns with MySQL or Sql Server Experss”
Please read about normal forms. There are plethora of materials on the internet about this. For example this poster [LINK] seems to be good overview. Or this videos: Normalisation Demonstration [this video] , Database Normalization - Explained with Examples [LINK] Generally speaking one table should be 'about' one entity such as address, person, business unit etc. For example in this dataset columns Provider Organization Name (Legal Business Name), Provider Last Name (Legal Name), Provider First Name, Provider Middle Name, Provider Name Prefix Text, Provider Name Suffix Text, Provider Credential Text, seems to be about one entity (provider?). Columns Provider Other Organization Name, Provider Oth
Cites Kurt Ludikovsky · 2015-05 · Stack Overflow · on “How do I structure a Database with a Sales Table MySql”
M:N means that you have N sales persons and M Products. This is something you can't represent directly in a relation. In D-design you should normalize your data. See link [LINK] . I also found a video here link [this video] .
Cites Jo Douglass · 2015-06 · Stack Overflow · on “Difficulty in database table normalization (2NF)”
Simplifying the updates and deletions First off, since you're using surrogate primary keys, your foreign keys should point to those, not to the unique keys that your surrogate keys are standing in for. One of the benefits of using surrogate keys is precisely that it makes life a lot easier when you have a unique key where one or more of the columns is likely to change; you won't need to cascade updates anymore, because the fields are only held in one place. You already have suitable unique constraints to manage the data quality. Remove the cicd9 and cdesc columns from dx . Add a column called something like idc9_recid . Change the unique constraint in dx to take account of this change. Ideal