标准数据库中立 XSD 来描述关系数据库模式
有人知道供应商中立的 XSD 来描述关系数据库模式吗? 我们的系统需要以独立于供应商的方式获取有关数据库结构的信息:
- 表
- 、列和类型、
- 主键和外键、约束
- 、索引
- 等,
并将其存储在 XML 文件中以供以后处理。
在我们做我们通常做的事情并推出我们自己的产品之前。 我想做一些研究,看看是否存在一个现有的 XSD,人们正在对其进行标准化,我认为这对于建模工具等来说并不是一个不常见的要求。 我在 Google 上没有找到任何非数据库供应商特定的内容。 如果您知道现有的公共标准,我将非常感谢您提供链接。
预先感谢,
特伦斯
Is anyone aware of a vendor neutral XSD to describe a relational database schema? Our system needs to grab information about the structure of a database:
- Tables
- Columns and types
- Primary and Foreign Keys Constraints
- Indexes
- etc
in a vendor independent manner and store it in an XML file for later processing.
Before we do what we typically do and roll our own. I wanted to do some research and see if there was an existing XSD that people are standardizing on for what I assume is not an uncommon requirement for modeling tools and such. I did not find anything on Google that was not database vendor specific. If you know of an existing public standard I would very much appreciate a link.
Thanks in advance,
Terence
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这并不完全是您要寻找的内容,但是 PostgresSQL Wiki 有一个有趣的部分关于 XML 导出,描述了它们如何一起支持 SQL 和 XML。 它显示了关于如何将表导出为 XML 以及支持它的 XSD 的部分,这看起来相当通用。 它可以作为您创建自己的模型。
Wiki 讨论了 ISO/IEC 9075-14:2006 标准的参考,该标准似乎被一些大供应商采用作为基准。 我快速浏览 ISO 网站说:2006 已更新< /a> 到 2008 年。我相信您可以找到一个涵盖的规范,而无需付费下载。
本文还指出了一个有点过时的 SQL/XML 标准 定义,但如果可以满足您的需求,您正在寻找一些基础知识。
This isn't exactly what you're looking for, but the PostgresSQL Wiki has an interesting section on XML exports, that describes how they are supporting SQL and XML together. It displays a section on how a table would be exported as as XML and the XSD that would support it, which looks rather generic. It could serve as a model for you to create your own.
The Wiki talks about reference to a ISO/IEC 9075-14:2006 standard, that appears to be adopted by a few big vendors as a baseline. I quick browse on the ISO site says that :2006 was updated to 2008. I'm sure you can find a covered spec of this that you don't have to pay for to download.
The article also points to a SQL/XML standard definition that is a bit outdated, but could serve your needs if you're looking for some basics.
有趣的问题 - 我不知道有任何标准或工具可以实现这一点。
您几乎必须拥有某种“中和”版本,其中包含您想要定位的每个单独数据库系统的适配器 - 甚至只是映射所有各种数据类型(SQL Server 中的 VARCHAR 和 NVARCHAR、Oracle 中的 VARCHAR2 等) 。
您可能只使用 SQL:2003 标准中定义的类型 - 但即便如此,您可能仍然需要某种特定于供应商的映射/适应。 更不用说对特定于供应商的实现细节的某种支持(例如 SQL Server 中的 IDENTITY 列与 Oracle 等中的 SEQUENCE 列)。
非常有趣的问题! 我希望其他人能够对这个问题有更多的了解,并可能推荐一个现有的工具。
如果没有,并且您决定推出自己的 - 考虑将其在 CodePlex 或 Google Code 上开源! 相信很多人都非常感兴趣!
马克
Interesting problem - I am not aware of any standard or tool to achieve this.
You would almost have to have some kind of a "neutralized" version with adapters for each individual database system you want to target - even just to map all the various data types (VARCHAR and NVARCHAR in SQL Server, VARCHAR2 in Oracle and so on).
You might just use the types defined in the SQL:2003 standard - but even then you'd probably still have to have some kind of a vendor-specific mapping / adaption of sorts. Not to mention some kind of support for vendor-specific implementation details (like IDENTITY columns in SQL Server vs. SEQUENCE in Oracle and others).
Very interesting question! I hope others will be able to shed more light on the issue and maybe recommend an existing tool.
If not, and you decide to roll your own - consider making it open-source on CodePlex or Google Code! I'm sure a lot of folks would be most interested!
MArc
OMG 的 UML 信息管理元模型 (IMM) 规范可能值得一试。
The UML Information Management Metamodel (IMM) Specification from OMG may worth a try.