Database Reference
In-Depth Information
create table dbo.ElementCentricTyped
(
ID int not null identity(1,1),
XMLData xml (document ElementCentricSchema) not null,
constraint PK_ElementCentricTyped
primary key clustered(ID)
);
create primary xml index XML_Primary_ElementCentricTyped
on dbo.ElementCentricTyped(XMLData);
create table dbo.AttributeCentricUntyped
(
ID int not null identity(1,1),
XMLData xml not null,
constraint PK_AttributeCentricUntyped
primary key clustered(ID)
);
create primary xml index XML_Primary_AttributeCentricUntyped
on dbo.AttributeCentricUntyped(XMLData);
create table dbo.AttributeCentricTyped
(
ID int not null identity(1,1),
XMLData xml (document AttributeCentricSchema) not null,
constraint PK_AttributeCentricTyped
primary key clustered(ID)
);
create primary xml index XML_Primary_AttributeCentricTyped
on dbo.AttributeCentricTyped(XMLData);
;with N1(C) as (select 0 union all select 0) -- 2 rows
,N2(C) as (select 0 from N1 as T1 CROSS JOIN N1 as T2) -- 4 rows
,N3(C) as (select 0 from N2 as T1 CROSS JOIN N2 as T2) -- 16 rows
,N4(C) as (select 0 from N3 as T1 CROSS JOIN N3 as T2) -- 256 rows
,N5(C) as (select 0 from N4 as T1 CROSS JOIN N4 as T2) -- 65,536 rows
,IDs(ID) as (select row_number() over (order by (select NULL)) from N5)
insert into dbo.ElementCentricUntyped(XMLData)
select '
<Order>
<OrderId>42</OrderId>
<OrderTotal>49.96</OrderTotal>
<CustomerId>123</CustomerId>
<OrderNum>10025</OrderNum>
<OrderDate>2013-07-15T10:05:20</OrderDate>
<OrderLineItems>
<OrderLineItem>
<ArticleId>250</ArticleId>
<Quantity>3</Quantity>
<Price>9.99</Price>
Search WWH ::




Custom Search