数据库模式与数据库表空间? [英] A database schema vs a database tablespace?

查看:148
本文介绍了数据库模式与数据库表空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在读取时正在读取数据库...

Doing my databases reading when I read...

模式:是对象的容器

表空间:对象的逻辑存储单元

Tablespace: A logical storage unit for objects

谁能解释它们之间的区别?

Can anyone explain the difference between these?

推荐答案

模式是名称空间-逻辑上的事情。它用于组织数据库对象的名称。它与数据的存储方式无关。

A schema is a namespace - a logical thing. It is used to organize the names of database objects. It has nothing to do with the way the data is stored.

表空间是物理的东西。它是数据的容器,与数据库对象的逻辑组织无关。

A tablespace is a physical thing. It's a container for data and has nothing to do with the logical organization of the database objects.

单个对象(例如一个表)可以分布在多个表空间中(取决于所使用的DBMS),但只能在单个模式中定义。与 schema_2.table_1 相比,表 schema_1.table_1 不同的表-尽管 纯名称相同,完全限定名称不同,因此它们是两个不同的表。

A single object (e.g. a table) could be spread across multiple tablespaces (depending on the DBMS being used) but it can only be defined in a single schema. The table schema_1.table_1 is a different table than schema_2.table_1 - although the "plain" name is the same, the fully qualified name is different and therefore those are two different tables.

以相同模式组织的对象不一定存储在相同的表空间中。一个表空间可以包含来自不同架构的对象。

Objects that are organized in the same schema are not necessarily stored in the same tablespace. And a single tablespace can contain objects from different schemas.

模式(和目录,这是命名空间的另一层)是SQL语言的一部分,并在SQL标准中定义。

Schemas (and catalogs, which are another level of namespace) are part of the SQL language and are defined in the SQL standard.

表空间是物理存储的一部分,并且是特定于DBMS的(尽管几乎所有DBMS都支持这样的概念),而不是SQL查询语言(已定义)的一部分按照SQL标准)。但是,它们是通过特定于供应商的SQL / DDL语句定义和管理的。

Tablespaces are part of the physical storage and are DBMS-specific (although nearly all DBMS support a concept like that) and are not part of the SQL query language (as defined by the SQL standard). They are, however, defined and managed through vendor-specific SQL/DDL statements.

这篇关于数据库模式与数据库表空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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