O'Reilly logo

Microsoft® .NET Compact Framework (Core Reference) by Mark Sutton, Rory MacLoed, Robert Burbidge, Stephen Wheelwright, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Multitable DataSet Objects

Few practical applications have just one data table, and often the data in multiple tables is related in some way. The following sections look at the support for relations between multiple tables in ADO.NET using the .NET Compact Framework.

Defining Relations in a Multitable DataSet Object

You can express the data requirements for the packing check list sample application as follows:

"I have more than one suitcase."

"A suitcase can contain one or more items."

"An item cannot be in more than one suitcase at any one time!"

The preceding requirements suggest a one-to-many parent-child relationship between the tables MyBags and PackedItems. This relationship can be expressed in database modeling terms as:

"MyBags contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required