mysql - Several foreign keys in a table -
to design database, have big table contains devices specifications (table : "devices"), there 60 columns.
the value of several features in predefined list (of 3 or 4 values).
they said should not have big tables lot of columns, , necessary separate data small tables. did following:
for feature takes value predefined list, created small table (2 columns : id & specification) lines not update (3 or 4 lines)). small tables have relationship 1 .... n "devices" table. there several specifications of kind.
finally, there several small tables 1 ....n "devices" table.
question: said should not have big tables lot of columns, , necessary separate data smaller tables (as did), have same number of columns, because small tables migrate foreign keys big table ("devices") !
i need help, want understand.
thank much.
some reasons:
- it easier manage data; when specific value changes, have change in 1 place: 'the small table' , not in many records of 'the big table';
- it may possible use data in several places;
- it may take less space;
- it may faster;
are not able reduce number of columns?
if show table example data can better , can give examples , advise.
Comments
Post a Comment