.NET Interview Question - How does “Dataset” differ from a “Data Reader”?
• “Dataset” is a disconnected architecture, while “Data Reader” has live connection while reading data. If we want to cache data and pass to a different tier “Dataset” forms the best choice and it has decent XML support.
• When application needs to access data from more than one table “Dataset” forms the best choice.
• If we need to move back while reading records, “data reader” does not support this functionality.
• However, one of the biggest drawbacks of Dataset is speed. As “Dataset” carry considerable overhead because of relations, multiple table’s etc speed is slower than “Data Reader”. Use “Data Reader” when you want to quickly read and display records on a screen.
Click here for more 22 top .NET Interview Questions
Post a Comment