View Single Post
Old 12-11-2007, 12:07 PM   #10 (permalink)
bdm
The Acquainted
Good Samaritan 
 
Join Date: Nov 2007
Posts: 127
Thanks: 14
bdm is on a distinguished road
Default

The reason I suggested using lookup tables is, what if you decide to add another rank or status? What if you wish to change the name of a rank or status?

Here are a few advantages of using a lookup table:
- No data duplication
- You can easily fetch all ranks and status' with a simple query
- You can easily add or edit the ranks or status' without messing in the code

And actually, if you use an 'unsigned tinyint', you can go up all the way to 255.

Code:
Through the process of database normalization we bring our schema's tables into conformance with progressive normal forms. As a result our tables each represent a single entity (a book, an author, a subject, etc) and we benefit from decreased redundancy, fewer anomalies and improved efficiency.

- Mike Hillyer
Here's an interesting article you may find interesting. http://dev.mysql.com/tech-resources/...alization.html
bdm is offline  
Reply With Quote