English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is normalization concept in php? how to normalize a table containing three fields namely city, state, country?

2007-07-20 20:47:39 · 2 answers · asked by Dine 1 in Computers & Internet Programming & Design

2 answers

Normalization implemented in database, not in PHP.
Normalization reduce data duplication and opportunities for various kinds of logical inconsistencies that could lead to loss of integrity of the database.
Normalization can be happen for two or more table,
for example :
Table_City with City_ID, City, State, Country column
Table_Employee with Employee_ID, FirstName, LastName, Address, City, State, Country.
to normalize Table_Employee, we drop column City, State and Country then add City_ID column which link to Table_City.

http://en.wikipedia.org/wiki/Database_normalization

instead of typing City, State and Country in each Table_Employee recods , it's better if we created Table_City which didn't have duplicate records for city, state and country records

2007-07-20 21:22:00 · answer #1 · answered by Manzana verde 5 · 0 0

Are you sure the term was in the context of PHP? It sounded like database theory.

Such table is too small to normalize much more than specify primary key (city, state)

That is normalized up to level 3/special.

2007-07-20 21:21:29 · answer #2 · answered by Andy T 7 · 0 0

fedest.com, questions and answers