Courseiva

PCDE Practice Question: Manage a solution that can span multiple database technologies

You are using Cloud Spanner and need to add a new column to an existing table. The table has millions of rows and must remain fully available for reads and writes during the schema change. What is the correct approach?

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 gcloud spanner databases ddl update with the ALTER TABLE statement; Spanner applies the change online.

Cloud Spanner supports non-blocking schema changes using DDL statements like ALTER TABLE ... ADD COLUMN. These operations are applied online without locking the table. The --async flag is optional for running the command asynchronously. The statement is executed via gcloud spanner databases ddl update.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Export the table using Dataflow, add the column locally, then import the data back.

    Why it's wrong here

    This is unnecessary and causes downtime. Spanner supports online schema changes.

  • Use gcloud spanner instances update to modify the table schema.

    Why it's wrong here

    This command is not for schema changes; it modifies instance configuration. Schema changes use database-level DDL.

  • Take the instance offline, run the ALTER TABLE, then bring it back online.

    Why it's wrong here

    Taking the instance offline is not required and would cause downtime, which is against the requirement.

  • Use gcloud spanner databases ddl update with the ALTER TABLE statement; Spanner applies the change online.

    Why this is correct

    Spanner DDL operations are non-blocking, so the table remains available during schema changes.

About these practice questions

One of 1,446 original PCDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.