Google AppEngine datastore provides a scalable schemaless object data storage for web application. It performs queries over data objects, known as entities. An entity has one or more properties where one property can be a reference to another entity. Datastore entities are schemaless where two entities of the same kind are not obligated to have the same properties, or use the same value types for the same properties. Each entity also has a key that uniquely identies the entity. The simplest key has a kind and a unique numeric ID provided by the datastore. An application can fetch an entity from the datastore by using its key or by performing a query that matches the entity's properties. A query can return zero or more entities and can return the results sorted by property values. A query does not allow the number of results returned by the datastore to be very large in order to conserve memory and run time.
With the AppEngine datastore, every attempt to create, update or delete an entity happens is a transaction. A transaction ensures that every change made to the entity is saved to the datastore. However, in the case of failure, none of the changes are made. This ensures consistency of data within an entity. The datastore uses optimistic concurrency to manage transactions. The datastore replicates all data to multiple storage locations, so if one storage location fails, the datastore can switch to another and still access the data. To ensure that the view of the data stays consistent as it is being updated, an application uses one location as its primary location and changes to the data on the primary are replicated to the other locations in parallel. An application switches to an alternate location only for large failures. For small failures in primary storage, such as a single machine becoming unavailable temporarily, the datastore waits for primary storage to become available again to complete an interrupted operation. This is necessary to give the application a reasonably consistent view of the data, since alternate locations may not yet have all of the changes made to the primary. In general, an application can choose between two read policies: 1) a read policy of strong consistency which always reads from the primary storage location. 2) a policy of eventual consistency which will read from an alternate location when the primary location is unavailable.
The AppEngine datastore provides a Python interface which includes a rich data modeling API and a SQL-like query language called GQL. A GQL query returns zero or more entities or Keys of the requested kind. In principle, a GQL query cannot perform a SQL-like "join" query. Every GQL query always begins with either SELECT * FROM or SELECT (key) FROM followed by the name of the kind. The optional WHERE clause lters the result set to those entities that meet one or more conditions. Each condition compares a property of the entity with a value using a comparison operator. GQL does not have an OR operator. However, it does have an IN operator which provides a limited form of OR. The optional ORDER BY clause indicates that results should be returned sorted by the given properties in either ascending (ASC) or descending (DESC) order. An optional LIMIT clause causes the query to stop returning results after the rst count entities. The LIMIT can also include an oset to skip that many results to nd the rst result to return. An optional OFFSET clause can specify an oset if no LIMIT clause is present.
There has been error in communication with Booktype server. Not sure right now where is the problem.
You should refresh this page.