How can I create database tables from XSD files? [

2019-01-04 00:38发布

I have a set of XSDs from which I generate data access classes, stored procedures and more.

What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me?

This is not the same as Create DB table from dataset table, as I do not have dataset tables, but XSDs.

8条回答
三岁会撩人
2楼-- · 2019-01-04 00:54

There is a command-line tool called XSD2DB, that generates database from xsd-files, available at sourceforge.

查看更多
Explosion°爆炸
3楼-- · 2019-01-04 00:59

hyperjaxb (versions 2 and 3) actually generates hibernate mapping files and related entity objects and also does a round trip test for a given XSD and sample XML file. You can capture the log output and see the DDL statements for yourself. I had to tweak them a little bit, but it gives you a basic blue print to start with.

查看更多
登录 后发表回答