DataReaders
DataReaders are a programming concept used to access data from a data source in a forward-only, read-only fashion. They provide a streaming view of query results, allowing applications to read one row at a time without buffering the entire result set in memory. This makes data readers efficient for large result sets or when low memory usage is important, in contrast to data structures that cache all results.
In many environments, the data reader interface exposes core capabilities such as advancing to the next row,
A common realization of this concept is the DataReader found in .NET data access libraries. The System.Data.IDataReader
Beyond .NET, many database drivers and data processing libraries provide analogous streaming readers for CSV, JSON,
Limitations include the inability to navigate backward, the need for an open connection, and potential performance