数据库 vs 表空间,有什么区别?

2021-12-30 00:00:00 oracle11g oracle

在oracle中,数据库和表空间有什么区别?

In oracle what's the differences between a database and a table space?

推荐答案

一些术语:

Oracle 将数据库定义为您在 Oracle 系统上找到的文件集.这意味着您的 Oracle 系统中的所有数据都在这些数据库文件中,通常称为数据文件".数据库中还有其他文件,如参数文件和重做日志.

Oracle defines a database as the set of files that you find on your Oracle system. This means all data in your Oracle system is in these database files, commonly known as "data files". There are other files in the database such as parameter files and redo logs.

另一方面,实例由 Oracle 数据库使用的进程和内存区域组成.数据库和实例共同构成了一个数据库系统.(有关详细信息,请参阅 Oracle 概念指南)

On the other hand, an instance consists of the processes and memory areas that Oracle database uses. Together, a database and an instance make up a database system. (For more information, see the Oracle Concept guide)

从逻辑上讲,您需要在该数据库中定义不同的空间.这是通过表空间完成的(参见Oracle 概念指南).一个表空间通常由一个或多个数据文件组成.当您使用 CREATE TABLE 定义表时,您可以指定应在哪个表空间中创建该表.例如,这允许您在同一数据库系统上分离不同的应用程序.

Logically, you will want to define different spaces within that database. This is done via tablespaces (see Oracle Concept guide). A tablespace usually consists of one or more data files. When you define a table with CREATE TABLE, you can specify in which tablespace the table should be created. This allows you to seperate different applications on the same database system, for example.

Oracle 概念指南是解决此类问题的绝佳信息来源.查看这张图片,了解数据文件和表空间如何组成.

The Oracle Concepts guide is an excellent source of information for questions like these. See this picture on how data files and tablespaces are composed.

相关文章