The DataRelation Object

As you've seen in Hour 2, “Working with DataSets and DataTables,” the ADO.NET DataSet object can almost precisely mirror data returned from the data source. This includes all the data relations and constraints present in the database as well as the data itself!

In other words, within the DataSet itself, you can create relationships, just like the ones you saw earlier inside SQL Server. After the relationships are set up, you can retrieve relationship-based information without having to write a database query.

New Functionality with the DataSet!

In addition to giving you great power and flexibility when working with data retrieved ...

Get Sams Teach Yourself ADO.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.