TAILIEUCHUNG - Beginning PHP6, Apache, MySQL Web Development- P11

Beginning PHP6, Apache, MySQL Web Development- P11:Welcome to Beginning PHP6, Apache, MySQL Web Development , your new trusty resource for assistance in creating your own dynamic web sites. There are a lot of technologies available that can be used to deliver great web sites, and we ’ re glad you chose the Apache/MySQL/PHP (sometimes referred to simply as AMP) approach. You may or may not have had a taste of these three components in the past, but either way we ’ re confident that you will be impressed with the power that lies within them | Chapter 10 Building Databases And just like that you have created your database design. Congratulations You now have a map that will help you create your database tables on the server. Not only that but you just normalized your database design as well by modifying your database table structure so that dependencies make sense and there is no redundant data. In fact you have actually gone through the proper normalization steps of First Second and Third Normal Form. WhatS So Normal about These Forms Remember we told you to call the first table zero That s called zero form. It is basically the raw data and is usually a very flat structure with lots of repeated data. You see data like this sometimes when a small company keeps records of its customers in a spreadsheet. The first pass through the table which you called pass one was the first step of normalization called First Normal Form commonly abbreviated as 1NF. This step requires that you eliminate all repeating data in columns which you did with the power column create separate rows for each group of related data and identify each record with a primary key. The first step satisfies the requirements of 1NF You can see where we re going with this can t you The Second Normal Form 2NF requirements state that you must place subsets of data in multiple rows in separate tables. You did that by separating the power data into its own table. Second Normal Form also requires that you create a relationship with the original table by creating a foreign key. You did that in pass two when you satisfied the requirements for 2NF. On your third pass you removed all the columns not directly related to the primary key city and state and used the zip code as the foreign key to the new city_state table. Third Normal Form 3NF is then satisfied. Congratulations You normalized a database just like the pros do. There are further requirements for database normalization but Third Normal Form 3NF is generally accepted as being good enough for .