如何从 XSD 文件创建数据库表? [英] How can I create database tables from XSD files?

查看:55
本文介绍了如何从 XSD 文件创建数据库表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组 XSD,我可以从中生成数据访问类、存储过程等.

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

我没有从这些生成数据库表的方法 - 有没有工具可以为我生成 DDL 语句?

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?

这与从数据集表创建数据库表不同,因为我没有数据集表,但有 XSD.

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

推荐答案

商业产品:Altova 的 XML Spy.

Commercial Product: Altova's XML Spy.

请注意,对此没有通用的解决方案.XSD 可以轻松描述未映射到关系数据库的内容.

Note that there's no general solution to this. An XSD can easily describe something that does not map to a relational database.

虽然您可以尝试自动化"此操作,但您的 XSD 必须在设计时考虑到关系数据库,否则效果不佳.

While you can try to "automate" this, your XSD's must be designed with a relational database in mind, or it won't work out well.

如果 XSD 的功能不能很好地映射,您将必须 (1) 设计某种映射,然后 (2) 编写您自己的应用程序以将 XSD 转换为 DDL.

If the XSD's have features that don't map well you'll have to (1) design a mapping of some kind and then (2) write your own application to translate the XSD's into DDL.

去过那里,做到了.招聘工作 - 没有可用的开源.

Been there, done that. Work for hire -- no open source available.

这篇关于如何从 XSD 文件创建数据库表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆