A DataSet is the top-level class for managing multiple DataTable s as a
group, allowing explicit support for master-detail relationships. A DataSet
contains one or more DataTables, one or more DataRelation s, and one or more
DataValue s. Through the DataSet API one has a sort of unified access to all
these elements in a single group. As a canonical example, a single DataSet could
have DataTables for Customers, Orders, and OrderItems, and the relationships
between them.
The DataSet internal structure read from a DataSet XML
schema using the createFromSchema(String) method, which also supports
reading from an InputStream or File . The internal structure
can then be persisted back as an XML schema by retrieving its String form
using getSchema() and then saving that.
Separately, all the data in a DataSet (e.g. rows in the internal DataTables)
can be read ( readXml(String) ) or written ( writeXml() ).
DataSet has standard methods for adding or removing single DataTables,
DataRelationTables, and DataValues. Note that these instances are automatically
tracked, so if their names are changed through their own API, that name change
is reflected automatically in the DataSet.
A DataSet is the top-level class for managing multiple DataTable s as a group, allowing explicit support for master-detail relationships. A DataSet contains one or more DataTables, one or more DataRelation s, and one or more DataValue s. Through the DataSet API one has a sort of unified access to all these elements in a single group. As a canonical example, a single DataSet could have DataTables for Customers, Orders, and OrderItems, and the relationships between them.
The DataSet internal structure read from a DataSet XML schema using the createFromSchema(String) method, which also supports reading from an InputStream or File . The internal structure can then be persisted back as an XML schema by retrieving its String form using getSchema() and then saving that.
Separately, all the data in a DataSet (e.g. rows in the internal DataTables) can be read ( readXml(String) ) or written ( writeXml() ).
DataSet has standard methods for adding or removing single DataTables, DataRelationTables, and DataValues. Note that these instances are automatically tracked, so if their names are changed through their own API, that name change is reflected automatically in the DataSet.