Pagination, Filtering and Sorting — Concept Check
Questions on Pagination, Filtering and Sorting. Offset pagination is simple and drifts under writes; cursor pagination is stable and cannot jump to page seven. Both need the same discipline about what the client is allowed to ask for.
Questions in this quiz
8 questions on Pagination, Filtering and Sorting — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A user reports that when they refresh the page, they sometimes see duplicate items in their list. Which pagination method is likely causing this issue?
- AOffset pagination
- BCursor pagination
- CKeyset pagination
- DHash-based pagination
2.A developer wants to implement pagination for a large dataset with millions of rows. Which method should they choose for efficient performance?
- AOffset pagination
- BCursor pagination
- CRandom pagination
- DPage number pagination
3.When using offset pagination, what happens if a new row is inserted at the top of the dataset?
- AThe new row is skipped
- BThe new row appears on the next page
- CThe new row causes an error
- DThe new row appears on the current page
4.A client application issues a request with an unvalidated sort parameter directly interpolated into SQL. What risk does this pose?
- ASQL injection
- BPerformance improvement
- CIncreased security
- DData loss
5.A user wants to jump directly to page 7 of a list. Which pagination method does not support this functionality?
- ASegmented pagination
- BOffset pagination
- CPage number pagination
- DCursor pagination
6.A developer uses cursor pagination but notices inconsistent results when changing the sort order mid-pagination. What might be the cause?
- ACursor is not base64 encoded
- BCursor is missing a tiebreaker
- CCursor is too short
- DCursor does not encode the sort order
7.Why is it important to cap the page size in pagination requests?
- ATo enhance security measures
- BTo prevent excessive load on the server
- CTo improve user interface design
- DTo ensure data accuracy
8.A user reports that after applying multiple filters, they see an empty list but expect results. What should be checked first?
- AThe client's JavaScript code
- BWhether the filters are applied server-side
- CThe user's internet connection
- DThe database connection