Database Reference
In-Depth Information
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>';
create xml schema collection AttributeCentricSchema as
'<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Order">
<xs:complexType>
<xs:sequence>
<xs:element name="OrderLineItem" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:int" name="ArticleId" use="optional"/>
<xs:attribute type="xs:int" name="Quantity" use="optional"/>
<xs:attribute type="xs:float" name="Price" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:int" name="OrderId"/>
<xs:attribute type="xs:float" name="OrderTotal"/>
<xs:attribute type="xs:int" name="CustomerId"/>
<xs:attribute type="xs:string" name="OrderNum"/>
<xs:attribute type="xs:dateTime" name="OrderDate"/>
</xs:complexType>
</xs:element>
</xs:schema>';
create table dbo.ElementCentricUntyped
(
ID int not null identity(1,1),
XMLData xml not null,
constraint PK_ElementCentricUntyped
primary key clustered(ID)
);
create primary xml index XML_Primary_ElementCentricUntyped
on dbo.ElementCentricUntyped(XMLData);
Search WWH ::




Custom Search