views:

591

answers:

5

My DB schema has matured a lot. The XSD had increased in size and hence using Visual Studio 2008 designer is getting difficult. Is there a way i can automate the XSD generation?

A: 

Assuming you are talking about datasets, cant you just drag everything onto the designer surface?

leppie
No, the DB schema is huge and my visual studio hangs once i try to open the XSD. I suggested a simple solution to my boss, to increase Dev machine RAMs..lol
Amol
A: 

Altova XmlSpy has build-in functionality to convert a database structure to a kind of XSD. It might not be what you need, though.

Workshop Alex
A: 

I have done this in previous lives using the catalog stored procedures that would list all tables, columns and indices, and run the resulting dataset against a templating engine (homebrewed at the time, but Codesmith would fit the bill 100%, or a clever xslt transform).

Here are the stored procs you can use : http://msdn.microsoft.com/en-us/library/ms182764.aspx

You can then either do the transform in-process or export the whole dataset to xml.

Cheers!

Florian Doyon
A: 

Found this tool while trying to solve a different problem.

Download: http://sourceforge.net/projects/mygeneration/

XSD Template: http://www.mygenerationsoftware.com/TemplateLibrary/Archive/?guid=59a03408-c96f-4baf-8171-b6bfe8725dab

Fairly simple.

Amol