Whenever you're ready, walk me through how you'd approach this.
How would you fetch data from a database using pagination and also save it in memory?
Explain how you would choose the pagination strategy, maintain deterministic results, handle changes during retrieval, and prevent excessive memory usage. Discuss any trade-offs between offset-based pagination, keyset pagination, and streaming.