Single-table-inheritance or two tables?

nutradiction

New Member
Suppose I have a table with the following columns (a list of words):\[code\]word: varcharcontributor: integer (FK)\[/code\]Now, suppose I wanted to have translations for each "word". What would be best? Having a second table?\[code\]word: integer (FK)translation: varcharcontributor: integer (FK)lang: integer (FK)\[/code\]Or all in the same table?\[code\]word: varchartranslation_for: integer (FK - to the same table)contributor: integer (FK)lang: integer (FK)\[/code\]Suppose two scenarios, (1) where I need to pull a translated word along with the original word it was translated from, (2) where I need to pull only the translated word. On both scenarios, I'd be using the "original" words far more heavily (both SELECTing and UPDATEing/INSERTing).So, what approach would be best for each scenario, or in general? I'm inclined towards the first approach, since then my "default" SELECTs won't have to be qualified by the lang column. What do you think?Thanks!
 
Top