pros and cons of db and ndb in google app engine

雨燕双飞 提交于 2019-11-29 16:55:19

问题


I have seen a little of this in stack overflow but I am wondering if there is any reason to use the DB entity model and what the specific pros and cons of using on or the other are.

I have read the ndb is a little faster and that it helps with caching. They have a good bit of info in the docs but don't really straight out say that ndb is better. At least I haven't found that yet.


回答1:


As far as I can tell ndb is an evolution of db, kept seperate to maintain compatability.

Have a look at the cheat sheet, it details the main differences

https://docs.google.com/document/d/1AefylbadN456_Z7BZOpZEXDq8cR8LYu7QgI7bt5V0Iw/mobilebasic

But it does not mention the other features such as computed properties.

If you are starting a new project I see no reason not to use ndb and every reason to.

EDIT: Alt link for document: https://docs.google.com/document/d/1AefylbadN456_Z7BZOpZEXDq8cR8LYu7QgI7bt5V0Iw/edit#



来源:https://stackoverflow.com/questions/12852442/pros-and-cons-of-db-and-ndb-in-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!