PCDE Design and implement database schemas Practice Question
A company is migrating a large Oracle database to Cloud Spanner. They need to define the schema for relational tables with foreign keys. Which THREE considerations are important when designing the Spanner schema? (Choose three.)
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use INTERLEAVE tables to model parent-child relationships.
Options B, D, and E are correct. Interleaved tables (B) model parent-child relationships and optimize joins and data locality. Secondary indexes (D) are essential for efficient queries on non-key columns. Cloud Spanner enforces foreign key constraints (E) to maintain referential integrity. Option A is incorrect because primary key columns cannot be NULL. Option C is incorrect because composite primary keys are commonly used in Spanner.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use NULL values in primary key columns to allow optional fields.
Why it's wrong here
Primary key columns cannot be NULL; they must have unique non-null values.
- ✓
Use INTERLEAVE tables to model parent-child relationships.
Why this is correct
Interleaving allows co-locating parent and child rows, reducing read latency.
- ✗
Avoid using composite primary keys; use single-column keys instead.
Why it's wrong here
Composite primary keys are common and recommended in Spanner for data distribution.
- ✓
Define secondary indexes for querying on non-key columns.
Why this is correct
Secondary indexes improve query performance on columns not part of the primary key.
- ✓
Foreign keys are automatically enforced in Cloud Spanner.
Why this is correct
Cloud Spanner supports foreign key constraints with enforcement.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCDE question from scratch — 1,446 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.