PHP 5/MySQL Programming- P78:computer programming has often been seen as a difficult and arcane skill. Programming languages are difficult and complicated, out of the typical person’s reach. However, the advent of the World Wide Web has changed that to some extent. It’s reasonably easy to build and post a Web page for the entire world to see. The language of the Web is reasonably simple, and numerous applications are available to assist in the preparation of static pages | My favorite combination is explosives and flower arranging. Fields with lists in them can be problematic. It s much harder to figure out what size to make a field that may contain several entities. If your most talented spy has 10 different skills you need enough room to store all 10 skills in every spy s record. Searching on fields that contain lists of data can be difficult. You might be tempted to insert several different skill fields maybe a skilll skill2 and skill3 field for example but this doesn t completely solve the problem. It is better to have a more flexible system that can accommodate any number of skills. The flat file system in this badSpy database is not capable of that kind of versatility. Designing a Better Data Structure The spy master database isn t complicated but the badSpy database shows a number of ways even a simple database can go wrong. This database is being used to save the free world so it deserves a little more thought. Fortunately data developers have come up with a number of ways to think about data structure. It is usually best to back away from the computer and think carefully about how data is used before you write a single line of code. Chapter 11 Data Normalization Defining Rules for a Good Data Design Data developers have come up with a list of rules for creating well-behaved databases Break your data into multiple tables. Make no field with a list of entries. Do not duplicate data. Make each table describe only one entity. Create a single primary key field for each table. A database that follows all these rules will avoid most of the problems evident in the badSpy database. Fortunately there are some well-known procedures for improving a database so it can follow all these rules. Normalizing Your Data Data programmers try to prevent the problems evident in the badSpy database through a process called data normalization. The basic concept of normalization 364 PHP 5 MySQL Programming for the Absolute Beginner is to break down