且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

数据源和数据集的区别

更新时间:2021-07-11 02:19:16

DataSource = 你如何连接到你的数据库DataSet = 内存中数据库的结构

DataSource = How you connect to your database DataSet = Structure of your database in memory

更多详细信息(来自考试 70-516:TS:使用 Microsoft .NET Framework 4 访问数据一书):

More in details (from the Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4 book):

DataSource 这是您分配数据的主要属性.你可以分配实现 IList、IListSource、IBindingList 或 IBindingListView 的任何内容界面.可以分配给 DataSource 属性的项目的一些示例是数组 (IList)、列表 (IList)、数据表 (IListSource) 和数据集 (IListSource).

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 是数据的基于内存的表格关系表示,并且是主要的断开连接的数据对象.从概念上讲,将 DataSet 视为内存中的关系数据库,但它只是缓存数据,不提供当今关系数据库必不可少的任何事务属性(原子性、一致性、隔离性、持久性).DataSet 包含 DataTable 和 DataRelation 对象的集合

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