Schema with Relationships

If we add relationships to the schema we just created, we can use the schema to create a typed data class to work with our database.

We could do that programmatically by adding constraints and relationships to the dataset, as discussed earlier in the chapter, and then writing out the schema. The DataSchemaXml example does just that. You could also create a schema document by hand or edit the one we generated in the previous example.

The XSD Tool directory has a schema that has been revised to add the relationships between the tables in the AirlineBroker database. The first part of the file, AirlineBroker.xsd, looks like ...

Get Application Development Using Visual Basic® and .NET 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.