Difference between revisions of "Software Design:Categories"

 
Line 5: Line 5:
 
'''categories'''
 
'''categories'''
 
Each category has a name and a description.  
 
Each category has a name and a description.  
 +
Columns: id, name, comment, c_date, user_id;
 +
  
 
'''part_categories'''
 
'''part_categories'''
 
Contains a part - category binding.
 
Contains a part - category binding.
 +
Columns: id, part_id, category_id, c_date, user_id;
 +
  
*''issue'': Is the category a number indexed into bbdb.categories of the text name of the category?
+
*''issue'': Is the category a number indexed into bbdb.categories or the text name of the category?
 
*''issue'': Would this design be better if the categories were in a u_list?
 
*''issue'': Would this design be better if the categories were in a u_list?
 
** ''answer'': Perhaps if we were using the category numbers above.
 
** ''answer'': Perhaps if we were using the category numbers above.

Latest revision as of 19:30, 13 April 2009

Software Design issues for the part categories system:

database tables in bbdb:

categories Each category has a name and a description. Columns: id, name, comment, c_date, user_id;


part_categories Contains a part - category binding. Columns: id, part_id, category_id, c_date, user_id;


  • issue: Is the category a number indexed into bbdb.categories or the text name of the category?
  • issue: Would this design be better if the categories were in a u_list?
    • answer: Perhaps if we were using the category numbers above.
  • issue: Why not use the mysql 'set' type?
    • answer: The set datatype requires that all the possible values be defined at table creation.