Posted by: Bob Ngu on: March 1, 2007
My RoR efforts have culminated in JiggyMe, check it out!
One of my first challenge in creating a new model is to decide if I should create a lookup table for one of the columns. As an experiment, I decided to hard code the values for that column instead of creating a lookup table. One of the reason is to avoid a join as joins are usually expensive. However, this could result in code duplication, so I need to keep an eye on this. I might end up creating a lookup table later on, we shall see.
April 2, 2007 at 3:33 pm
lookup tables are a good idea when you have an enumerated domain. The benefits usually outweigh the cost. Here is a link to a site on this subject http://www.tomjewett.com/dbdesign/dbdesign.php?page=enum.php