The BigTable design rejects many of the philosophies of standard relational models, explicitly preferring denormalization to a big host of tiny tables.

One of the larger areas where this is a problem is in the modelling of many to many joins.

One way to model these joins is to violate first normal form, and put all interesting data in a db.ListProperty(). While this has the ability to be searchable from a query, I have not yet explored the performance implications of searching a list versus pulling another table.

As joins are not possible, it is possible to link tables through RelationshipProperties. Therefore, with enough effort, the standard intersection table (a table with a joint primary key which references both parent tables) can be created. Has anyone explored the performance hits of the various implementations?


While the List of Keys suggested in the documentation is indeed one way to do it, I'm interested in the performance and anomaly rates of that and other implementations. Is there utility in creating mutual lists of keys? Is the effort involved in the repeated gets worth the price? Is there a better way to do it?

2 Answers 2


I'm also working with the GAE datastore right now, you should check this article if you haven't already. If you have found something useful, please update your question.


I found this today, check it out.


In my experience on GAE, you should use table queries sparingly. Adding a "join" table would just slow things down even more. For example, if you have tables A and B which share a many-to-many relationship, and you create a "join" table J with RelationshipProperty fields to both A and B, you will have to query J every time you want to find related records (entities).

It would be much faster to have the List of Keys in A or B (or both if necessary) because they will be included when you fetch that record/entity. As long as you don't have too many keys in the list (that is, the entity isn't too large), this is the way to go.

I've started using ndb on my applications and there are some significant benefits to using keys when fetching entities. If the entity is already cached, it will pull it from memory or memcache first. So if there is significant overlap in your Lists of Keys, the fetches will be much faster for those entities already fetched.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.