July 2018
Intermediate to advanced
506 pages
16h 2m
English
Cloud Spanner does not support arbitrary foreign key constraints, as doing so would introduce serious hurdles to how data is stored in a highly distributed environment. Instead, it supports the interleaving of data, which provides both a method for implementing relational constraints, as well as a way to collocate related data for better performance.
When a new table is created in Cloud Spanner, it may declare another table to be its parent, forming a hierarchical structure between the tables. A child table must include the parent's primary ID as a component in its own primary key. If the parent's primary key is a composite key, the child table must include all fields of the composite key in its own primary ...