模式和数据字典有什么区别? [英] What is the difference between schema and data dictionary?

查看:45
本文介绍了模式和数据字典有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

推荐答案

这些定义来自我的经验(20 多年的程序员,7 年的咨询经验,一段时间作为独立承包商).天啊.

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.

这篇关于模式和数据字典有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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