架构和数据字典有什么区别?

发布于 2024-09-07 03:33:37 字数 109 浏览 0 评论 0原文

模式的定义是数据库中数据的逻辑结构。它由用户拥有并与数据库用户同名。模式包含表的名称,它的列类型是什么等。数据字典也仅包含元数据(当然它是在数据库级别而不是用户级别)。模式和数据字典之间的确切区别是什么?

The definition of schema is logical structure of data in database. It is owned by a user and has the same name as the database user. The schema contains name of table, what is it's column type etc. And the data dictionary also contains metadata only (offcourse it is at database level and not at user level). What is the exact difference between schema and data dictionary?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩起发的微风 2024-09-14 03:33:37

这些定义来自我的经验(20 多年的程序员经验,7 年的咨询经验,有一段时间担任独立承包商)。 YMMV。

“模式”描述结构。它可能包括描述结构各方面的元数据。

“数据字典”将上下文与结构的元素相关联。它还可能包括描述关系各个方面的元数据。

例如,“人”可能由常用字段描述 - 姓氏、名字、敬语等。如果与另一个人 - 父亲、丈夫等 - 存在关系 - 这些值可能被视为“模式数据”,因为这些关系受特定值的约束。

“人”是“学生”、“老师”或“囚犯”等——由特定系统的数据字典定义。

These definitions are from my experience (programmer for 20+ years, 7 years in consulting, some time as an independent contractor). YMMV.

"Schema" describes structure. It might include metadata that describes aspects of the structure.

A "data dictionary" associates context with elements of the structure. It also might include metadata that describes aspects of relationships.

For example, A 'person' might be described by the usual fields - last_name, first_name, honorific, etc. If there is a relationship to another person - father, husband, etc - those values might be considered "schema data" because the relationships are constrained by specific values.

That the 'person' is a 'student' or a 'teacher' or a 'prisoner' etc - that is defined by the data dictionary for the particular system.

小红帽 2024-09-14 03:33:37

通常“模式”意味着“RDBMS 内部”。这通常意味着一些最低限度的技术。也许补充一个“评论”字段。

数据字典通常意味着“RDBMS 之外”。这通常意味着一些更大、更复杂的结构,不限于 RDBMS 表/列技术。

如果您有两个特定模式(例如 Oracle)的特定示例和一个特定数据字典来进行比较,那么您将获得“精确”差异。

Usually "schema" means "inside the RDBMS". This generally means some technical minimum. Perhaps supplemented with one "comment" field.

Data Dictionary usually means "outside the RDBMS". This generally means some larger and more complex structure that is not limited to RDBMS table/column technology.

If you had two specific examples of a specific schema (e.g. Oracle) and a specific data dictionary against which to compare, you'd have an "exact" difference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文