Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Creating One-to-Many Relationships in XML Schemas and Datasets

Visual Studio .NET 2003

You create a schema with one-to-many relationships when XML files contain related elements that are hierarchically at the same level. For more information, see Tables, Columns, Keys, and Constraints in XML Schemas.

Tip   If you have access to an XML file (.xml) that contains the structured data that your application needs to validate, see Creating XML Schemas from XML Files.

There are three main steps involved in creating an XML Schema that will be used to validate data that is structured in a one-to-many relationship.

To create a schema that represents a one-to-many relationship

  1. Create the tables that will represent your applications data structure.
  2. Create the primary keys, unique keys, and keyrefs.
  3. Create the relationships between the tables.
    For instructions onSee
    Constructing TablesCreating Tables in XML Schemas
    Defining KeysCreating Primary and Unique Keys in XML Schemas
    Defining Relationships (keyrefs)Creating DataRelation Objects with the XML Designer

See Also

Relational Data in XML Schemas | Tables, Columns, Keys, and Constraints in XML Schemas | Nested Relationships in XML | XML Schemas and Data | XML Schemas and the XML Designer | Creating XML Schemas and Datasets | XML Files | Introduction to Data Access with ADO.NET | Introduction to Datasets

Show:
© 2015 Microsoft