We are creating a large e-commerce database that needs to allow for data in multiple languages. For example, the product table will need one or more translations for Name, Description, MetaTitle, MetaKeywords, MetaDescription and so on.
There are several ways to accomplish this from a relational database design standpoint. But Entity Framework 4 adds a few constraints and performance is a big concern.
Similar issue as in Multilingual Database Design
Here is an example set of tables we are considering:
[Product]
- Id (PK)
- CreateDate
- NamePhraseId (FK)
- DescriptionPhraseId (FK)
- Price
- ...
[Phrase]
- id (PK)
- Invariant
[Translation]
- id (PK)
- PhraseId (FK)
- LanguageCulture (Example: en-US)
- Translation
We could also add a LanguageCulture lookup table.
This method has it's pros and cons like other methods. We don't want to have to create additional tables for each table column that may require translation (no ProductName, ProductDescription tables for instance) as that would make our data model too large.
In the example above, a Product Name will have zero or one Phrases with one or more translations. As I recall, Entity Framework requires 1 to 1 relationships to have the same primary key on the tables, I don't know if that's the same case with 0 or 1 relationships but that may be a dealbreaker for the method above.
I've had a really hard time finding good information about Entity Framework and Multilingual database/model design guidance. I would greatly appreaciate advice and guidance with emphasis on good design and the best possible performance.
Thanks in advance!