所有 RDBMS 都具有可与 Oracle 相媲美的数据字典吗?
是否可以
- 来检索以下信息:表、
- 索引及其列、它们
- 对每个表中的列进行索引以及它们的类型
- 约束(例如唯一键、外键、非空 ..)
使用所有(主要)RDBMS 中的 sql
?我知道这对甲骨文来说是可能的,并且假设对大多数其他人来说也是可能的。这有什么重要的例外吗?
Is it possible to retrieve information like:
- the tables
- the indexes with the columns they index
- the columns in each table along with their types
- constraints like unique keys, foreign keys, not null ..
using sql from all (major) RDBMSs?
I know it is possible for oracle and assume it is possible for most others. Are there any important exceptions to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于许多数据库,您可以使用 INFORMATION_SCHEMA 表:
以及类似的选择来获取其他信息,例如索引和关系。
根据 此链接:
For many databases you can make use of the INFORMATION_SCHEMA tables:
and similar selects for other info such as indexes and relationships.
According to this link:
这可能是可能的,但是如何执行此操作的细节会因 RDBMS 的不同而有所不同。您最好的选择可能是阅读您正在使用的系统的手册。
It is probably possible but the details of how to do it will vary from one RDBMS to another. Your best bet is probably to read the manual for the system you're working with.
当 Codd 制定了他著名的 12 条规则时,这些规则旨在作为“衡量某些给定 DBMS 系统的关系性”的尺度,其中一条规则是(类似的)“元数据信息应该可供用户精确地使用与用于查询数据本身的设施相同的设施”。
现在已经是大约 30 年前的事了,所以很难想象,如果一个系统不符合这个“规定”,那么今天它实际上敢于称自己为“关系型”系统,尤其是因为它是一个根本不难实现的系统。见面。
When Codd formulated his famous 12 rules, which were intended as a yardstick to 'measure the relationality' of some given DBMS system, one of those rules was (something of the ilk) that "metadata information should be queryable for the user using exactly the same facilities as those that are used for querying the data itself".
That is now around some 30 years ago, so it is hard to imagine that a system would actually dare call itself 'relational' today if it doesn't meet that "prescription", especially as it is one that is not difficult at all to meet.