views:

255

answers:

1

hi,

i am filling up a big table with text items from different countries. My question is: Should i use a referencePropery to link to languages in another table?. Thats the way i would do it in a normal mysql relational database.

or just go redundant and specify the language for each text in the table?

Whats better? redundancy & increase in storage use or more queries & more cpu usage

When my database is finished i need to query the database to get different lists with text items from each country.

A: 

If you use a Reference Property, you should be ok if all you want to do is find text items for a certain language. When your text item is stored, the reference property will be stored as the key of your language object. You will then be able to write queries that say "give me all languages where the language property matches this key.

What you won't be able to do is write a query that joins the two "tables" and find items based on some property of your language entity. For example, if your language entity had a property called alphabet, you would not be able to find all text items whose language has a Latin alphabet. You would need to do it in two steps - first find the keys of all languages which have a Latin alphabet, then find all text items that have one of those keys for their language property.

Peter Recore