Skip to main content
NOSQL-DATABASES5 MIN READ

Build an Order Timeline Key

Construct partition and sort keys for a time-ordered NoSQL order timeline.

Design keys for show newest 50 order-related events for account A without joining three services at read time. Group by the read boundary and sort by the order the screen needs. Do not start with event type if the first screen is account-scoped; that scatters the timeline. Orders, refunds, and shipments are fetched separately and sorted in application memory. Timeline events are written under the account partition with sortable event keys. Name the query For account A, return newest 50 order-related events. The query tells you the grouping and order before any key is chosen. Choose partition PK = ACCOUNT#…

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us