Store XML in database - newbie question

J

JezB

I'm not sure which group to post this in, so forgive me if I post to a few,
hoping that someone can point me in the right direction.

In a .NET project (probably ASP.NET but could also be rich client), I want
to save some XML data to a database (sql-server but could also be Oracle).
How can I do this ? I certainly cant see XmlDocument as a type available for
columns in a database table, but perhaps it could be converted to/from a
Binary or Text column ?
 
G

Guest

If you are using Oracle you can define a column as an XMLType this will allow
you store and retrieve the XML as a column. In order to utilise this it is
necessary to download an addition ODP toolkit from Oracle to access it in
..Net. There is also the possibilty of storing the XML as part of the
relational database within Oracle although I haven't used that option yet.
 
M

Michael Rys [MSFT]

In SQL Server 2000, you can:

1. shred it into relations easily either using a mapping schema or OpenXML.
Works best for structured data.
2. Store it as IMAGE or NTEXT (preserves the original form). Need to check
for XML well-formedness on midtier before.

In SQL Server 2005, you can use an XML datatype.

Best regards
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top