I've been working with mapping-schemas and I wonder if and why it is
necessary to use the sql:relationship annotation when there is already the
mechanism KEY and KEY-REF within XML Schemas...
We are using annotated Biztalk schemas with the Xpath Query/Schemas feature
in SQL Server 2000 to return a populated CommonAdvanceShipNotice.XML (Ships
with BizTalk) We have a few questions about this.
1. Check out the stub below from the CommonAdvanceShipNotice.XML. In our
freight system the attributes of ShipmentDetail and CarrierWeight Detail
come from a single row of a single table. Seemingly there is no way to make
this happen other than "SELF JOINS" accomplished by referencing multiple
views of the same table with the sql:relationship annotation. This seems
needlessly complex and query analyzer shows this to be grossly inefficient.
2. All movements in our systems are in pounds by default. We want to fill
in the WeightQualifier attribute of the CarrierWeightDetail with a Default
Value of LB for pounds. We want to do this directly in the schema by using
the Default Value attribute. We do not want to use a computed field in a
view, nor do we want to do futher XSLT processing.
3. In general it seems that unless there is a FLAT and one to one
co-correspondence between SQL tables and XML elements, and SQL columns and
XML attributes, XPATH queries against schemas are not useful. In order to
fill in the common XML Biztalk Schemas using XPATH queries against SQL2000
we need to figure out a way around these issues.