Courseiva
Question 223 of 1,446

PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions

A team is designing a Cloud Spanner schema for an e-commerce platform. They have 'Customer' and 'Order' tables and want to ensure that queries for all orders of a specific customer are efficient. Which schema design approach should they use?

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

Interleave the 'Order' table under the 'Customer' table with CustomerID as the first part of Orders' primary key

Spanner supports interleaving tables, where child rows are stored physically near the parent row. Interleaving Orders under Customers using the CustomerID as the first part of the primary key in Orders makes queries for all orders of a customer efficient by colocating related data.

Answer analysis

Option-by-option breakdown

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

  • Interleave the 'Order' table under the 'Customer' table with CustomerID as the first part of Orders' primary key

    Why this is correct

    Interleaving colocates orders with their customer, making queries for a customer's orders very efficient.

  • Use a single table with denormalized customer and order data

    Why it's wrong here

    Denormalization leads to data redundancy and update anomalies, and is not the recommended approach in Spanner.

  • Use a secondary index on CustomerID in the Order table

    Why it's wrong here

    A secondary index improves lookup but does not provide data locality like interleaving.

  • Create a separate 'Order' table with a foreign key to Customer

    Why it's wrong here

    A foreign key does not guarantee data locality; queries may require distributed joins, which are less efficient.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.