CREATE TABLE Players (
PlayerId INT64 NOT NULL,
PlayerName STRING(2048) NOT NULL,
) PRIMARY KEY(PlayerId);
CREATE TABLE Scores (
PlayerId INT64 NOT NULL,
Score INT64 NOT NULL,
Timestamp TIMESTAMP NOT NULL OPTIONS (
allow_commit_timestamp = true
),
) PRIMARY KEY(PlayerId, Timestamp),
INTERLEAVE IN PARENT Players ON DELETE NO ACTION
If there are multiple data stores, we prefer spanner over BigTable.