Forward-only navigation Which cursor type allows the application to move only in the forward direction through the recordset (no backward scrolling)?
-
AForward-only cursor.
-
BStatic cursor.
-
CKeyset cursor.
-
DDynamic cursor.
-
EBidirectional cursor.
Answer
Correct Answer: Forward-only cursor.
Explanation
Introduction / Context:Cursors define both visibility and navigation. Some applications need the simplest, most efficient traversal: move to the next row only, without random access or backward movement.
Given Data / Assumptions:
- Requirement: iterate forward sequentially through a result set.
- No need to scroll backward or jump to arbitrary positions.
Concept / Approach:
A forward-only cursor provides minimal navigation capability—FETCH NEXT repeatedly. Because it avoids maintaining bidirectional state, it can be lighter-weight and faster, especially for streaming large results.
Step-by-Step Solution:
1) Map the requirement (only move forward) to cursor types.2) Forward-only cursor exactly matches this constraint.3) Static, keyset, and dynamic speak to visibility; they may support scrolling, so they are not defined by forward-only navigation.4) Bidirectional cursor is the opposite of the requirement.Verification / Alternative check:
Database documentation consistently defines forward-only as a navigation limitation: you can only fetch the next row each time. This fits ETL and stream processing scenarios well.
Why Other Options Are Wrong:
- Static cursor: snapshot property, not inherently forward-only.
- Keyset cursor: membership/visibility semantics, not navigation-only.
- Dynamic cursor: live visibility, not a navigation constraint.
- Bidirectional cursor: allows backward movement, contrary to the requirement.
Common Pitfalls:
- Assuming forward-only implies static visibility; engines may still vary on visibility.
- Choosing bidirectional cursors unnecessarily, increasing overhead.
Final Answer:
Forward-only cursor.