24.02.2015, 14:14
I am assuming that the first table you posted only contains unique models. So in that case you should probably remove the "ID" column and use "model" as the primary key. Then you can link the components table using a foreign key. Use natural keys when they're available.
One particularly nice feature I recently discovered in phpMyAdmin is this:
So when you have relations set up correctly it will show like this:
Putting multiple values in one column, however, is simply not done. You could probably create a view to denormalize the tables to recreate the structure you currently use. http://stackoverflow.com/questions/2...into-one-field
One particularly nice feature I recently discovered in phpMyAdmin is this:
So when you have relations set up correctly it will show like this:
Putting multiple values in one column, however, is simply not done. You could probably create a view to denormalize the tables to recreate the structure you currently use. http://stackoverflow.com/questions/2...into-one-field