In my My-SQL database, I have an article table (with columns article_id, article_name & highlight(need to be discussed in this question)). This column named “Highlight” defines the highlight of an article. I need to store this column in different languages.
1) One way is .. I will take four columns in the same table. Saying Hightlight_en, Highlight_german, Highlight_french and so on.
2) Other way is I will create different Highlight table for each Language.
Please suggest which way I should go for as per a good database design. Your ideas are also welcome.
One More thing..Do I need to do some extra thing in java for storing MultiLingual data (ANY UTF-8 setting). Please let me know.
I recommend against using either of these methods you described. Instead, create a single
highlighttable with 3 columns:Each row links to an article by
article_id, and contains a language version and the relevant text. This allows you to add as many languages as you ever need to, and it doesn’t matter if one is missing for an article – it simply doesn’t appear in the table. It also allows you to use entirely different language sets per article if it ever becomes necessary.Values then look like: