Schema and data model

The schema and data model of Cloud Spanner is very much similar to any normal RDBMS. Like, it has a database, and the database might contain one or more tables. A table's structure is also very much like RDBMS tables, where we have rows, columns, values, and primary keys.

Giving way to the data-locality relationship between the two independent tables, we can also define a parent-child relationship between the tables for efficient retrieval. Just like an RDBMS, each table mandatorily must have a primary key, and the primary key can be composed of zero or more columns.

The primary key column(s) of the primary table must be the prefix of the primary key of the child table in the parent-child table. The primary key of each ...

Get Cloud Analytics with Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.