I re-doing a website for a restaurant. The old datatabase is kind of a mess. For example there is a table menu_items, holding the different menus. The structure is like this
where the diffrent description_(s) represent the different receipes in the menu. The problem is though that some menu_items only use the first 2 two descriptions (description_dut, description_eng) other menu_items use the first 4 (description_dut, description_eng, description_dut2, description_eng2) and so on. I am sure that this is not really very good practice. What would be a better sollution? Having the different descriptions in a separate table? Any suggestion would be more that helpful.
When you first are remodeling the database, I would recommend taking the separation one step further.
CREATE TABLE recipes
( item_id INT NOT NULL,
, language_iso CHAR(2) NOT NULL
, description TEXT
PRIMARY KEY(item_id, language_iso)
);
This will make it much easier adding another language to the menu in the future. If this step is something that is needed, is another question, but doing it is a good practice for a future project where you will need this. Time wise handling it this way, should not take more time programming.