XML provides the following two approaches for representing relational data, and consequently, the schemas created to validate each construct are different as well.
- One-to-many relationships are represented as separate tables of rows that are related by common columns. These common columns are defined as keys within the tables, and a relationship is defined between them. The XML Designer provides the Edit Key and Edit Relation dialog boxes for creating keys and relationships respectively.
- Nested relationships are represented hierarchically by parent elements that contain nested child elements.
In This Section
- Tables, Columns, Keys, and Constraints in XML Schemas
- Provides an overview of how database constructs are represented in XML Schemas.
- Nested Relationships in XML
- Provides an overview of how nested relationships are represented in XML Schemas.
- Creating Tables in XML Schemas
- Explains how to create tables with the XML Designer.
- Creating Primary and Unique Keys in XML Schemas
- Explains how to create keys with the XML Designer.
- Deleting Primary Keys and Unique Keys
- Explains how to delete keys with the XML Designer.
- Creating One-to-Many Relationships in XML Schemas and Datasets
- Provides the steps involved in creating a one-to-many relationship with the XML Designer.
- Creating Nested Relationships in XML Schemas
- Explains how to create a nested relationship using the XML Designer.
- Walkthrough: Creating a Dataset with Tables, Keys, and One-to-Many Relationships
- Provides step-by-step instructions for how to create an XML Schema that could validate tables, keys, and keyed relationships.
Related Sections
- Introduction to DataRelation Objects
- Provides an overview of how datasets allow you to specify relationships between tables and how you can take advantage of these relationships.
- Creating DataRelation Objects with the XML Designer
- Explains how to use the XML Designer to add a DataRelation object to a dataset.
- XML Schemas and Data
- Introduces topics and sections that describe how to use the XML Designer to work with XML Schemas and datasets.
- XML Schemas and the XML Designer
- Introduces topics that describe the different elements in XML Schemas and how they are created using the XML Designer.
- Creating XML Schemas and Datasets
- Introduces topics that describe the different ways that schemas and datasets can be created using the XML Designer as well as describing the connection between datasets and schemas.
- XML Files
- Introduces topics that explain how to use the XML Designer when working with XML documents.
- Introduction to Data Access with ADO.NET
- Provides a high level overview of the most important concepts of data access in ADO.NET.
- Introduction to Datasets
- Provides an overview of what ADO.NET datasets are, how they can be typed or untyped, what they are used for, and how they are structured.
- XML in Visual Studio
- Provides links to a variety of topics about XML.
- World Wide Web Consortium (W3C) Web site (http://www.w3.org/)
- Links to the XML Schema primer and other XML info posted by the W3C.
- XML Developer Center on MSDN Online (http://msdn.microsoft.com/xml/default.asp)
- Provides various resources about XML.
- XML Schema Reference (XSD)
- Provides reference topics for schema elements and data types.
- XML Designer
- Provides an overview of the XML Design tool in Visual Studio.