Sybase XML manual Generating an annotated schema for Microsoft SQL Server, 217

Models: XML

1 290
Download 290 pages 48.58 Kb
Page 229
Image 229

Chapter 5 Exchanging data with databases supporting XML

Generating an annotated schema for Microsoft SQL Server 2000

Microsoft SQL Server 2000 is an XML-enabled database server. It supports annotations that can be used on XSD or XDR files, to map XML data to relational data.

An annotated schema is an XML-coded file, targeted with an XML language and tagged with specific DBMS annotations, that allows you to store or retrieve data in an XML format, from relational databases supporting XML. An XML model allows you to generate an annotated schema (XSD or XDR) for SQL Server 2000. You need first to map an XML model to a PDM, then to attach the Microsoft SQL Server extended model definition to the mapped XML model. If need be, you can complete the mapping by defining extended attributes to XML objects.

Mapping XML objects to PDM objects

There are several ways to map XML objects to PDM objects:

Using the XML Builder Wizard (See following procedure)

Generating an XML model from a PDM

Generating a PDM from an XML model

Manually

The best way to map an XML model to a PDM is to use the XML Builder

Wizard.

If you do not have a PDM, you can reverse engineer a database into a PDM.

For more information on reverse engineering a database into a PDM, see chapter Reverse engineering in a PDM, in the PDM User’s Guide.

Caution

The following procedure assumes you have a PDM open in the workspace and targeted with Microsoft SQL Server 2000 as DBMS.

If the PDM is not targeted with the proper DBMS, select DatabaseChange Current DBMS.

XSM User's Guide

217

Page 229
Image 229
Sybase manual Generating an annotated schema for Microsoft SQL Server, Mapping XML objects to PDM objects, 217