I've got a group of XSDs that I generate data access classes, saved methods and much more.
Things I do not have is a method to generate database table from all of these - it is possible to tool which will create the DDL claims for me personally?
This really is different then Create DB table from dataset table, as I don't have dataset tables, but XSDs.
There's an order-line tool known as XSD2DB, that creates database from xsd-files, offered at sourceforge.
Commercial Product: Altova's XML Spy.
Observe that there is no general means to fix this. An XSD can certainly describe something that doesn't map to some relational database.
While you can test to "automate" this, your XSD's should be made with a relational database in your mind, or it will not exercise well.
When the XSD's have features that do not map well you will need to (1) design a mapping of some type after which (2) write your personal application to translate the XSD's into DDL.
Had the experience, done that. Work with hire -- no free available.
XML Schemas describe hierarchial data models and could not map well to some relational data model. Mapping XSD's to database tables is extremely similar mapping objects to database tables, actually you could utilize a framework like Castor that does both, it enables you to definitely have a XML schema and generate classes, database tables, and data access code. I guess you will find now many tools which do exactly the same factor, but you will see a learning curve and also the default mappings will probab 't be what you would like, so you've to spend some time designing whatever tool you utilize.
XSLT may be the quickest method to generate precisely the code that you would like. If it's a little schema hardcoding it may be faster than evaluating and learing a lot of technology.
I personally use XSLT to achieve that. Write down your XSD then pass your computer data models via a hands written XSLT that results SQL instructions. Writing an XSLT is much faster and multiple-use than the usual custom program /script you might write.
A minimum of thats the way i get it done at the office, and because of which i got time for you to spend time on SO :)
Produce a Java Model using Axis wsdl2java (which could consume .xsd files).
Make use of a database generation tool for Java that can take inside a Java Model. Surely something similar to Hibernate can perform this? I authored my very own tool (takes a few days, also creates CRUD code in Java too) in order to save myself time at the office, maybe this is a pleasant personal project?
Or simply get it done by hand to ensure that you should check things are correct and good! Database tools are great enough now you can zip through creating tables for any model without a lot of problems.
Might have a look in the XSD tool in visual studio 2k8... I've produced a relational dataset from an xsd also it may help your out in some way.
hyperjaxb (versions 2 and three) really creates hibernate mapping files and related entity objects as well as does a round trip test for any given XSD and sample XML file. You are able to capture the log output and find out the DDL claims on your own. I needed to tweak them a bit, but it offers a superior a fundamental blue print to begin with.
Here you'll find outside assistance to parse an xsd file: