I'm new to SQLXML extenions and I'm curious if SQL Server
can handle what I need.
I need to store a tree data structure and I need to query
the children within a particular or multiple branches of
this tree. For example:
<Root>
<Branch Id=0,State=GA,Level=SpecialLevel/>
<Child Id=1,State=FL,Level=Grant/>
<Child Id=2,State=CA,Level=Denied/>
<Branch Id=3,State=WY,Level=NONE/>
<Child Id=4,State=TN,Level=Basic/>
<Root/>
My goal would like something like this I guess:
{
SELECT Id, State, Level
FROM RootTable
WHERE Root.Branch.Id = 0
}
I of course need to support the basics too:
- Create new tree
- Create new branch within existing tree
- Add/Update/Delete children and branches independent of
the other nodes
I can implement all of these features in C++ using a
standard DOM library. But, I'd love to get the powerful
querying capabilities of SQL along with the easy and
reliable admin functions.
I'm essentially hanging my decision to use a hand-coded
C++ XML server vs using SQL with XML extensions on the
querying capabilities that I need. From what I've read so
far, it seems pretty doable that SQLXML can handle the
insert, modify and delete operations. But, I'm not sure
about the querying capability.
Any help would be Greatly Appreciated !!
Chris
Depending on the shaping/filtering requirement you can either use XPath
against annotated schema or you can use FOR XML on the relational form (and
OpenXML or annotated schemas to store and update).
HTH
Michael
"ChrisD" <christopher_douglass@.deletethis.yahooDOTcom> wrote in message
news:1bce01c5056f$700cc140$a401280a@.phx.gbl...
> I'm new to SQLXML extenions and I'm curious if SQL Server
> can handle what I need.
> I need to store a tree data structure and I need to query
> the children within a particular or multiple branches of
> this tree. For example:
> <Root>
> <Branch Id=0,State=GA,Level=SpecialLevel/>
> <Child Id=1,State=FL,Level=Grant/>
> <Child Id=2,State=CA,Level=Denied/>
> <Branch Id=3,State=WY,Level=NONE/>
> <Child Id=4,State=TN,Level=Basic/>
> <Root/>
> My goal would like something like this I guess:
> {
> SELECT Id, State, Level
> FROM RootTable
> WHERE Root.Branch.Id = 0
> }
> I of course need to support the basics too:
> - Create new tree
> - Create new branch within existing tree
> - Add/Update/Delete children and branches independent of
> the other nodes
> I can implement all of these features in C++ using a
> standard DOM library. But, I'd love to get the powerful
> querying capabilities of SQL along with the easy and
> reliable admin functions.
> I'm essentially hanging my decision to use a hand-coded
> C++ XML server vs using SQL with XML extensions on the
> querying capabilities that I need. From what I've read so
> far, it seems pretty doable that SQLXML can handle the
> insert, modify and delete operations. But, I'm not sure
> about the querying capability.
> Any help would be Greatly Appreciated !!
> Chris
|||Where do I find query examples using either or both
methods? Thanks!
>--Original Message--
>Depending on the shaping/filtering requirement you can
either use XPath
>against annotated schema or you can use FOR XML on the
relational form (and
>OpenXML or annotated schemas to store and update).
>HTH
>Michael
>"ChrisD" <christopher_douglass@.deletethis.yahooDOTcom>
wrote in message[vbcol=seagreen]
>news:1bce01c5056f$700cc140$a401280a@.phx.gbl...
Server[vbcol=seagreen]
query[vbcol=seagreen]
so
>
>.
>
|||Books Online (the SQL Server documentation) or www.sqlxml.org are two good
places to start.
Best regards
Michael
"Chris Douglass" <anonymous@.discussions.microsoft.com> wrote in message
news:1f4b01c5061f$19d99590$a401280a@.phx.gbl...[vbcol=seagreen]
> Where do I find query examples using either or both
> methods? Thanks!
> either use XPath
> relational form (and
> wrote in message
> Server
> query
> so
Sunday, February 19, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment