Design innovative, scalable, and highly available cloud database solutions →mediumMultiple ChoiceObjective-mapped
PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions
A company is designing a schema for Cloud Bigtable to store user sessions. Access patterns: (1) read all sessions for a given user ID, and (2) read a specific session by session ID. The row key should support both patterns efficiently. Which row key design is MOST appropriate?
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 user_id#session_id as the row key
Using 'user_id#session_id' as the row key allows prefix scans on user_id to retrieve all sessions for a user, and exact lookups on the full key for a specific session. This is a common pattern for Bigtable.
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 user_id#session_id as the row key
Why this is correct
This allows scanning by user_id prefix and point lookup by full key, supporting both access patterns.
- ✗
Use session_id as the row key and store user_id as a column
Why it's wrong here
This makes it efficient to find a specific session but requires a full table scan to find all sessions for a user.
- ✗
Use a hash of user_id as row key prefix and session_id as suffix
Why it's wrong here
This distributes writes but prevents scanning all sessions for a user unless the hash is known.
- ✗
Use user_id as the row key and store multiple session columns
Why it's wrong here
Bigtable rows have a limit on size; storing all sessions in one row can exceed size limits and cause hotspots.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCDE question from scratch — 1,446 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.