R – Google App Engine Datastore reference or not

databasegoogle-app-enginegoogle-cloud-datastorereferenceproperty

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 (that's 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?

What's 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.

Best Answer

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.