e01.org

Google Cloud Datastore

Google Cloud Datastore was a NoSQL database service provided by Google Cloud Platform. It is now superseded by Firestore which offers a "Datastore compatibility" mode to ensure legacy applications built on Datastore continue operating seamlessly. Google Cloud Datastore API organizes data in entities and properties, where entities are grouped into kinds. This concept is similar to tables in relational databases, however since this is NoSQL database, it is without the schema constraints. Each entity in Datastore is uniquely identified by a key. This key can have a custom user-defined identifier or it can be auto generated key by the system. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

Google Cloud Datastore was a NoSQL database service provided by Google Cloud Platform. It is now superseded by Firestore which offers a "Datastore compatibility" mode to ensure legacy applications built on Datastore continue operating seamlessly. Google Cloud Datastore API organizes data in entities and properties, where entities are grouped into kinds. This concept is similar to tables in relational databases, however since this is NoSQL database, it is without the schema constraints. Each entity in Datastore is uniquely identified by a key. This key can have a custom user-defined identifier or it can be auto generated key by the system. ===Data organization=== Data is organized into entities in Google Cloud Datastore. These are like individual records. These entities are grouped into kinds. This is just like tables in a traditional database. However, unlike relational databases, entities in the same kind do not have to follow a fixed structure (like a pre-defined schema). They can have different sets of properties. ===Entities and properties=== Each entity represents a structured set of properties. Properties are key-value pairs. Examples of values can be strings, numbers, Booleans, timestamps, arrays, and geographic points. The flexible nature of properties allows developers to model complex data structures without a rigid schema. ===Entity keys=== Every entity in Datastore is uniquely identified by a key. A key includes: A project ID (the identifier of the Google Cloud project), An optional namespace (used for multi-tenancy), A kind (defining the entity type), And a name or numeric ID that distinguishes the entity within its kind. Entities can optionally be grouped into entity groups to allow for transactional updates involving multiple entities. ===Data types=== Datastore API supports a range of property data types as shown below: String Integer Float Boolean Timestamp Array (List) Embedded Entity GeoPoint (geographical coordinates) Binary data (Blob) This variety allows modeling of structured and semi-structured data into various datatypes. from google.cloud import datastore client = datastore.Client() step 1 customerkey = client.key("Customer", "C123456") customer = client.get(customerkey) step 2 query = client.query(kind="Order") query.add_filter("customer_id", "=", "C123456") orders = list(query.fetch()) ===Query limitations=== Datastore does not support joins, subqueries, or aggregation operations like those found in relational databases, such as MS SQL and MySQL. Because of this, application design often requires denormalization. It is a process of storing related data together within a single entity or using entity groups to maintain hierarchical relationships. Query filters are required to match existing indexes, and certain combinations of inequality and sort operations may require custom indexes. Datastore's successor, Firestore supports an advanced query pipeline API which supports aggregations, joins and subqueries . ===Language and API support=== Google Cloud Datastore APIs consist of a RESTful interface and a gRPC API. This is quite useful for developers who need to design distributed applications. These APIs offer direct access to Datastore's features such as transactions, queries, and entity management. The client libraries are built on top of these APIs and hide complex details. They make it easier to use different languages such as Python, Java, Go, Node.js, and C# by handling things like connection handling, retries, and serialization. Datastore's API is also optimized for giving high-throughput and low-latency access. This API also supports batch operations, ancestor queries, and strongly consistent reads within entity groups. With the help of such features, developers can build scalable applications without the need of handling complex database infrastructure on their own.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Google Cloud Datastore". 1785931673. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1367838964

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·