In your case, I would recommend using two tables.
In your case, I would recommend using two tables: Product ------------------------------- ProductID | Price | Stock ------------------------------- 10 | 10 | 15 ProductLoc ----------------------------------------------- ProductID | Lang | Name | Description ----------------------------------------------- 10 | EN | Bike | Excellent Bike 10 | ES | Bicicleta | Excelente bici This way you can use: SELECT * FROM Product LEFT JOIN ProductLoc ON Product. ProductID = ProductLoc. ProductID AND ProductLoc.
Lang = @CurrentLang (Left join just in case there is no record for the current lang in the ProductLoc table).
Great idea, I think this will work well. Thank you very much for your response. – philwilks Sep 18 '09 at 9:05.
It's not good idea just to add new columns to existing table. It will be really hard to add a new language in the feature. The lookup table is much more better but I think you can have problem with performance because number of translated records.
I think best solution is to have a shared table: products: id, categoryid, and same tables for every language products_en, products_de: product_id (fk), title, price, description, ... You will just select from the shared one and join table with your language. The advantage is that you can localize even the price, category, ...
With about 20 tables that would need translation, so that would increase to around 120 tables with five languages. – philwilks Sep 17 '09 at 11:44 Thanks for the suggestion though, I'm not being ungrateful, I'm just sure that this can't be the best solution. – philwilks Sep 17 '09 at 11:45 It's ok.
I think there is not 'best solution'. Everything has some pros/cons. Here you will have better performance then the lookup solution.
Lookup solution is good if you will need more columns to the table and you will not have many records. The number of tables is not problem and you can have a skript which will add new column to each table. If you will have 20 tranlatable columns and 1m reccords, the lookup will be slow.
But it's nothing wrong about to use it. – martin. Malek Sep 17 '09 at 11:52.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.