PCDE Practice Question: Manage a solution that can span multiple database technologies
A team manages a Cloud Spanner database and needs to perform a schema change to add a new column to an existing table and create a secondary index. They want to avoid downtime and ensure the changes are applied without blocking reads or writes. Which two statements are correct about making these changes in Spanner? (Choose TWO.)
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
✓
The ALTER TABLE statement to add a column is non-blocking and can be executed using gcloud spanner databases ddl update
In Cloud Spanner, both ALTER TABLE (to add columns) and CREATE INDEX are online, non-blocking operations. They can be run via DDL statements in the gcloud CLI or console. Indexes can be created as UNIQUE to enforce uniqueness.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The CREATE INDEX statement will block reads on the table during index creation
Why it's wrong here
Spanner index creation is non-blocking.
- ✗
Indexes can only be created as unique indexes
Why it's wrong here
Indexes can be non-unique as well.
- ✓
The ALTER TABLE statement to add a column is non-blocking and can be executed using gcloud spanner databases ddl update
Why this is correct
Spanner DDL changes are online and non-blocking.
- ✓
Both ALTER TABLE and CREATE INDEX can be submitted together in a single DDL batch
Why this is correct
Multiple DDL statements can be batched in Spanner.
- ✗
To create an index, you must first export and re-import the data
Why it's wrong here
No need to export/import; index creation is online.
Go deeper
Related to this question
About these practice questions
This PCDE question is part of Courseiva's 1,446-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.