Courseiva

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

A company is designing a Cloud Bigtable schema for time-series data. The data is written by millions of devices every second. The query patterns are: (1) retrieve the most recent reading for a specific device, (2) retrieve all readings for a device in a time range. Which TWO row key design techniques should the team use to optimize for these patterns? (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

Use field promotion: put device_id as the first component of the row key

Using a reverse timestamp allows the most recent data to be at the beginning of the row key, making scans for the latest reading efficient. Field promotion ensures that device_id comes first in the row key, enabling efficient prefix scans for all readings of a device. Salting is not needed because device_id already distributes writes if there are many devices.

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 salting (hash prefix) to distribute writes

    Why it's wrong here

    Salting would break the natural ordering needed for prefix scans by device_id.

  • Use field promotion: put device_id as the first component of the row key

    Why this is correct

    Field promotion ensures that queries for all readings of a device can use a prefix scan.

  • Use a reverse timestamp (e.g., MAX_TIMESTAMP - timestamp) as part of the row key

    Why this is correct

    Reverse timestamp brings the most recent data to the top, making 'latest reading' queries fast via a limit scan.

  • Use a monotonically increasing timestamp as the first part of the row key

    Why it's wrong here

    This would cause hotspots and make recent data inefficient to query.

  • Store the entire row as a single column family to reduce overhead

    Why it's wrong here

    Column families are for organization, not for optimizing read patterns.

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.