nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #257

You are using Bigtable to persist and serve stock market data for each of the major indices. To serve the trading application, you need to access only the most recent stock prices that are streaming i

The correct answer is B. Create one unique table for all of the indices, and then use a reverse timestamp as the row key design.. Explanation/Reference: If you usually retrieve the most recent records first, you can use a reversed timestamp in the row key by subtracting the timestamp from your programming language's maximum value for long integers (in Java, java.lang.Long.MAX_VALUE). With a reversed timesta

Submitted by neha2k· Mar 30, 2026Designing data processing systems

Question

You are using Bigtable to persist and serve stock market data for each of the major indices. To serve the trading application, you need to access only the most recent stock prices that are streaming in. How should you design your row key and tables to ensure that you can access the data with the simplest query?

Options

  • ACreate one unique table for all of the indices, and then use the index and timestamp as the row key design
  • BCreate one unique table for all of the indices, and then use a reverse timestamp as the row key design.
  • CFor each index, have a separate table and use a timestamp as the row key design
  • DFor each index, have a separate table and use a reverse timestamp as the row key design

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    85% (22)
  • C
    8% (2)
  • D
    4% (1)

Explanation

Explanation/Reference: If you usually retrieve the most recent records first, you can use a reversed timestamp in the row key by subtracting the timestamp from your programming language's maximum value for long integers (in Java, java.lang.Long.MAX_VALUE). With a reversed timestamp, the records will be ordered from most recent to

Topics

#Bigtable#row key design#reverse timestamp#time-series data

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice