views:

159

answers:

2

I'd like to be able generate an xsd of my MSSQL database's structure. Are there any tools or libraries that help me to this?

The VS designer for typed datasets come's close, but I'm looking for a programmatic approach.

+1  A: 

Since there's no standard approach that works for exporting relational data into XML documents, there's also no one approach for generating an XSD for that data.

However... I got past a similar roadblock a while back by creating a small model of the database using Access, and then exporting from Access into XML data and XSD schema files. (I don't remember the exact menu commands for this; they weren't obvious, but they do exist.) The generated XML and XSD weren't suitable for my application, but just having that example to work with was enough to get me started.

I hope this helps.

Dan Breslau
+1  A: 
Jacob Proffitt