Wednesday, March 28, 2012

relationship between xml in xml data type column

How would i express a relation between different kinds of XML segments
in the same table with an XML datatype column.
Further, can i do this using dataset designer? Do you know where I can
get more information on how to use the dataset designer, or how to
write xsd for sql server 2005?
thanks,
JoyceIf the relationship is between elements in the same instance (i.e. same "cel
l"
in your table) then you can write an XML schema and make use of types xsd:I
D
anjd xsd:IDREF. If the relationship is between XML fragments stored in diffe
rent
rows or columns then this won't work.
Here's a link to the Books On Line page about creating an XML schema collect
ion:
http://msdn2.microsoft.com/en-us/library/ms176009.aspx
If you can post more information on what you're trying to accomplish I'd be
glad
to help.
Denis Ruckebusch
http://blogs.msdn.com/denisruc
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169140712.945912.315860@.q2g2000cwa.googlegroups.com...
> How would i express a relation between different kinds of XML segments
> in the same table with an XML datatype column.
> Further, can i do this using dataset designer? Do you know where I can
> get more information on how to use the dataset designer, or how to
> write xsd for sql server 2005?
> thanks,
> Joyce
>|||hi Denis
This is a helpful start. If I would like to relate between elements in
different row, but in the same column, is there a way to do that?
I'm looking at using Visual Studio dataset designer, and writing out
some queries that can perhaps write the schema out for me.
thanks,
Joyce
Denis Ruckebusch [MSFT] wrote:
> If the relationship is between elements in the same instance (i.e. same "c
ell"
> in your table) then you can write an XML schema and make use of types xsd
:ID
> anjd xsd:IDREF. If the relationship is between XML fragments stored in dif
ferent
> rows or columns then this won't work.
> Here's a link to the Books On Line page about creating an XML schema colle
ction:
> http://msdn2.microsoft.com/en-us/library/ms176009.aspx
> If you can post more information on what you're trying to accomplish I'd b
e glad
> to help.
>
> Denis Ruckebusch
> http://blogs.msdn.com/denisruc
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> "joyce chan" <joyceschan@.fastmail.fm> wrote in message
> news:1169140712.945912.315860@.q2g2000cwa.googlegroups.com...|||I'm not familiar with the dataset designer.
I'd look at using relational mechanisms such as id columns to express the
dependency.
Denis Ruckebusch
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169218663.655366.182930@.v45g2000cwv.googlegroups.com...
> hi Denis
> This is a helpful start. If I would like to relate between elements in
> different row, but in the same column, is there a way to do that?
> I'm looking at using Visual Studio dataset designer, and writing out
> some queries that can perhaps write the schema out for me.
> thanks,
> Joyce
> Denis Ruckebusch [MSFT] wrote:
>|||Hello joyce,
No thats not possible. Schema validation is only on an individual cell.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> hi Denis
> This is a helpful start. If I would like to relate between elements
> in different row, but in the same column, is there a way to do that?
> I'm looking at using Visual Studio dataset designer, and writing out
> some queries that can perhaps write the schema out for me.
> thanks,
> Joyce
> Denis Ruckebusch [MSFT] wrote:
>sql

No comments:

Post a Comment