Manage a solution that can span multiple database technologies →mediumMultiple SelectObjective-mapped
PCDE Practice Question: Manage a solution that can span multiple database technologies
A gaming company uses Cloud Spanner for a global leaderboard. They need to add a column to an existing table and create a secondary index on that column. The database must remain fully available during these changes. Which THREE statements are true?
⚠ Common exam trap
A common misconception is that schema changes in distributed databases require downtime or blocking, but Cloud Spanner's online DDL operations are designed to maintain full availability during both ALTER TABLE and CREATE INDEX.
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 new column must have a default value if it is defined as NOT NULL.
In Cloud Spanner, when adding a NOT NULL column to an existing table, the column must have a DEFAULT value. This ensures that existing rows, which will be populated with the default value, satisfy the NOT NULL constraint without requiring a full table scan or blocking writes.
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 new column cannot be added if the table has existing data.
Why it's wrong here
Spanner allows adding columns to tables with data.
- ✓
The new column must have a default value if it is defined as NOT NULL.
Why this is correct
Adding a NOT NULL column without default requires a table lock; with a default it is online.
- ✗
CREATE INDEX will block writes on the table until the index is built.
Why it's wrong here
CREATE INDEX is non-blocking in Spanner.
- ✓
ALTER TABLE can be executed while the database is serving traffic.
Why this is correct
Schema changes are online and non-blocking.
- ✓
The DDL statements can be submitted together in a single ALTER DATABASE statement.
Why this is correct
Multiple DDL statements can be batched in a single request.
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.