开发者

How to create database table in Google App Engine

How to create database table in Google App Engi开发者_Python百科ne


You don't. You create Entities of different kinds. Datastore is not a relational database[*].

If you want to imagine that GAE creates one "table" for each kind, the "columns" of that "table" being the properties of the entities, then you're welcome to do so. But I don't think it helps.

[*] I don't know whether it meets some technical definition, but it certainly doesn't drive like SQL-based databases.


According to http://code.google.com/appengine/docs/python/datastore/

App Engine Datastore is a schemaless object datastore providing robust, scalable storage for your web application, with the following features:

  • No planned downtime
  • Atomic transactions
  • High availability of reads and writes
  • Strong consistency for reads and ancestor queries
  • Eventual consistency for all other queries The Python Datastore interface includes a rich data modeling API and a SQL-like query language called GQL.


In simple words just create you model class, create an object of this class and after first call of put() method for this object the "table"(I think the term here is kind) will be created on the fly. But you definitely have to read the documentation and check some examples. The will help you to understand the specifics of Google Datastore and how it differs from the common RDBMS


In simple words, i would say that with Google BigTable you don't need to create your tables because there are already six Big Tables ready to store whatever you want.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜