Displaying 1 result from an estimated 1 matches for "some_plan".
2005 Dec 16
10
''Code table'' best practices?
...ID int
CATEGORY_ID int
Table: CATEGORIES
ID int
CATEGORY_CODE char(6)
DESCRIPTION varchar(200)
..and I would then need to do:
Plans.find(:all, :conditions => "categories.category_code = ''123456''",
:include => :categories), which would be much slower.
..and then @some_plan.category.description whenever I needed to
display the description text.
In this design, ''PLANS.CATEGORY_ID'' would be a non-semantic synthetic
value. Any find_by_sql queries would be much more tedious to write.
Am I going to run into trouble by having my ''code table'...