Difference between revisions of "Software Design:Categories"
(New page: Software Design issues for the part categories system: database tables in bbdb: '''categories''' Each category has a name and a description. '''part_categories''' Contains a part - cat...) |
|||
(One intermediate revision by the same user not shown) | |||
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 | + | |
+ | *''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? | ||
− | *''issue'': | + | ** ''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. |
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.