I am currently working on project whose main task is to read data stored in SQL database and to display them in user-friendly form. Programming language used is C++. I am working in Borland C++ Builder 6 environment. But I think question posed in title is independent from programming language or libraries. When reading data from db i am quite frequently meeting with these terms in class names without knowing exactly what they represent. I understand that they behave as interface to data stored in db. But why there is need to use two interface classes instead of one?
Share
DataSource= How you connect to your databaseDataSet= Structure of your database in memoryMore in details (from the Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4 book):
DataSource This is the primary property to which you assign your data. You can
assign anything that implements the IList, IListSource, IBindingList, or IBindingListView
interface. Some examples of items that can be assigned to the DataSource property are
arrays (IList), lists (IList), data tables (IListSource), and data sets (IListSource).
DataSet is a memory-based, tabular, relational representation of data and is the primary disconnected data object. Conceptually, think of DataSet as an in-memory relational database, but it’s simply cached data and doesn’t provide any of the transactional properties (atomicity, consistency, isolation, durability) that are essential to today’s relational databases. DataSet contains a collection of DataTable and DataRelation objects