开发者

Google App Engine and database "Views"

I'm developing an application for GAE that has a fairly complex data model.

Based on my understanding, a good way to handle a complex data model using a noSQL database, especially GAE, is to use de-normalized "views" of data. If the browser-client wants to update some data, the server performs a write on some core data, returns "200 OK" so the client can continue, then uses the task que to update any "views" that the written data may have affected.

Then whenever the client wants to query for some objects that would normally require a SQL-join, it can instead query a "view" where all the data it needs is right there in the same "row" (or entity, in app engine's case).

The problem I am having is that all this creating an开发者_Go百科d updating of views seems to be something that a library should be doing, not something I should be doing manually. Is there a tool that works with GAE where you can specify some views of your data and then expect that they will be created and handled appropriately? I believe CouchDB does this...


Views are more usually an RDBMS feature than a nonrel one. What you're describing sounds like materialized views, though, and while they're a valid solution, they're not a common one, and thus there aren't any libraries for App Engine (that I'm aware of) that do this.

More common is to simply store your data denormalized in a fashion that facilitates efficient reading, and update the data directly at write time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜