Question

I have been going through the Google App Engine documentation (Python) now and found two different types of storage.

  1. NDB Datastore
  2. DB Datastore

Both quota limits (free) seem to be same, and their database design too. However NDB automatically cache data in Memcache!

I am actually wondering when to use which storage? What are the general practices regarding this?

Can I completely rely on NDB and ignore DB? How should it be done?

I have been using Django for a while and read that in Django-nonrel the JOIN operations can be somehow done in NDB! and rest of the storage is used in DB! Why is that? Both storages are schemaless and pretty well use same design.. How is that someone can tweak JOIN in NDB and not in DB?

Was it helpful?

Solution

In simple words these are two versions of datastore . db being the older version and ndb the newer one. The difference is in the models, in the datastore these are the same thing. NDB provides advantages like handling caching (memcache) itself. and ndb is faster than db. so you should definitely go with ndb. to use ndb datastore just use ndb.Model while defining your models

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top