Google News
logo
ADO.NET - Interview Questions
Explain the difference between DataTable and DataSet.
DataTable DataSet
DataTable consists of a single database table that is placed within a memory. DataSet consists of a collection of multiple database tables which is placed within a memory.
It has a row and column collection. It has a database table collection.
It allows fetching only a single TableRow at a time. It allows fetching multiple TableRows at a time.
It is a single database table, so there will not be any relation with other tables. It represents a collection of DataTable objects, so there might be a relation between them to obtain a particular result.
In this, DataSource objects are not serialized. In this, DataSource objects are serialized.
UniqueConstraint and ForeignKeyConstraint objects are not available enforcing data integrity. UniqueConstraint and ForeignKeyConstraint objects are available for enforcing data integrity.
Advertisement