MySQL multiple column relationships between 2 tables -
i have problem in table there 4 columns include terms describing product. want make terms editable (and can add more) in app , there 4 groups of them obviously. created table has these terms altogether product table have create 4 relationships id of terms table.
is solution?
the main reason don't want make 4 different tables terms because there aren't many of them , app progresses might have more different term groups, adding many small tables cluttering database.
any suggestion?
update #1: here current schema http://i.imgur.com/q2a1ldk.png
you try mapping table:
apputamenti(id, ...) term_map (apputamenti_id, term_id) terms (id, text, type)
so can add many terms want.
or if want specify mapping 1 more field, change:
term_map (apputamenti_id, term_id, map_type)
so can use enum map_type
enum(tipologia, feedback, target)
or whatever original fields
Comments
Post a Comment