关系数据库中的目录和架构之间有什么区别? [英] What's the difference between a catalog and a schema in a relational database?

查看:115
本文介绍了关系数据库中的目录和架构之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前认为架构是数据库本身之前的上包装器对象。
我的意思是 DB.schema。< what_ever_object_name_under_schema>

I used to think schema were the "upper wrapper" object before the database itself. I mean DB.schema.<what_ever_object_name_under_schema>.

好,目录包装器现在很混乱。为什么我们需要目录?出于什么目的,应该使用目录吗?

Well, the catalog "wrapper" is now quite confusing. Why should we need a catalog? For what purpose, precisely should the catalog be used?

推荐答案

从关系的角度来看:


目录是放置所有其他模式(外部,概念,内部)以及所有对应映射(外部/概念性)的地方。 ,概念/内部)。

The catalog is the place where--among other things--all of the various schemas (external, conceptual, internal) and all of the corresponding mappings (external/conceptual, conceptual/internal) are kept.

换句话说,目录包含有关各种对象的详细信息(有时称为描述符信息元数据

In other words, the catalog contains detailed information (sometimes called descriptor information or metadata) regarding the various objects that are of interest to the system itself.

例如,优化器使用有关索引和其他物理存储结构的目录信息以及许多其他信息来帮助系统。决定如何实施用户请求。同样,安全子系统首先使用有关用户和安全约束的目录信息来准予或拒绝此类请求。

For example, the optimizer uses catalog information about indexes and other physical storage structures, as well as much other information, to help it decide how to implement user requests. Likewise, the security subsystem uses catalog information about users and security constraints to grant or deny such requests in the first place.

数据库系统,第7版,CJ日期,第69-70页。



从SQL标准的角度来看:

An Introduction to Database Systems, 7th ed., C.J. Date, p 69-70.


From the SQL standard point of view :


在SQL中,目录被命名为模式的集合。 -环境。
SQL环境包含零个或多个目录。目录包含
一个或多个模式,但始终包含名为
INFORMATION_SCHEMA的模式,该模式包含
信息模式的视图和域。

Catalogs are named collections of schemas in an SQL-environment. An SQL-environment contains zero or more catalogs. A catalog contains one or more schemas, but always contains a schema named INFORMATION_SCHEMA that contains the views and domains of the Information Schema.

数据库语言SQL ,(DIS 9075的建议修订文本),p 45



从SQL的角度来看:

Database Language SQL, (Proposed revised text of DIS 9075), p 45


From the SQL point of view :


目录通常是数据库的同义词。在大多数SQL dbms中,如果查询information_schema视图,则会发现 table_catalog列中的值映射到数据库的名称。

A catalog is often synonymous with database. In most SQL dbms, if you query the information_schema views, you'll find that values in the "table_catalog" column map to the name of a database.

如果找到您的平台使用 catalog 的方式要比这三个定义中的任何一种都广泛,它可能是指比数据库更广泛的内容-数据库集群,服务器或服务器集群。但是我有点怀疑,因为您已经在平台的文档中轻松找到了它。

If you find your platform using catalog in a broader way than any of these three definitions, it might be referring to something broader than a database--a database cluster, a server, or a server cluster. But I kind of doubt that, since you'd have found that easily in your platform's documentation.

这篇关于关系数据库中的目录和架构之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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