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 ...
Get Microsoft® .NET Compact Framework (Core Reference) 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.