Database Reference
In-Depth Information
Fig. 3.5
Basic GQL syntax
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 [ 226 ] 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 [ 24 ]. Figure 3.5
depicts the basic syntax of 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 filters 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 are 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 first count entities. The LIMIT can also include
an offset to skip the specified number of results in order to find the first result to
be returned. An optional OFFSET clause can specify an offset if the no LIMIT
clause is present. Chohan et al. [ 105 ] have presented AppScale as an open source
extension to the Google AppEngine that facilitates distributed execution of its
applications over virtualized cluster resources, including Infrastructure-as-a-Service
(IaaS) cloud systems such as Amazon EC2 and Eucalyptus [ 16 ]. They have used
AppScale to empirically evaluate and compare how well different NoSQL systems
(e.g. Cassandra, HBase, Hypertable, MemcacheDB, MongoDB, Voldemort) map to
the GAE Datastore API [ 89 ].
Google Cloud SQL [ 23 ] is another Google service that provide the capabilities
and functionality of MySQL database servers which are hosted in Google's cloud.
Although there is tight integration of the services with Google App Engine , it allows
the software applications to easily move their data in and out of Google's cloud
without any obstacles. In addition, it offers some automatic administrative tasks,
such as scheduling backups, patching management, and replicating databases.
Search WWH ::




Custom Search