oracle 数据库 vs 表空间,有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17409862/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Database vs tablespace, what's the difference?
提问by 001
In oracle what's the differences between a database and a table space?
在oracle中,数据库和表空间有什么区别?
回答by Simon
A little terminology:
一个小术语:
Oracle defines a databaseas 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 系统上找到的一组文件。这意味着您的 Oracle 系统中的所有数据都在这些数据库文件中,通常称为“数据文件”。数据库中还有其他文件,例如参数文件和重做日志。
On the other hand, an instanceconsists of the processes and memory areas that Oracle database uses. Together, a databaseand an instancemake up a database system. (For more information, see the Oracle Concept guide)
另一方面,实例由 Oracle 数据库使用的进程和内存区域组成。总之,一个数据库和实例组成一个数据库系统。(有关更多信息,请参阅 Oracle 概念指南)
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 概念指南)。一个表空间通常由一个或多个数据文件组成。当您使用 CREATE TABLE 定义表时,您可以指定应在哪个表空间中创建该表。例如,这允许您在同一数据库系统上分离不同的应用程序。
The Oracle Concepts guide is an excellent source of information for questions like these. See this pictureon how data files and tablespaces are composed.
Oracle 概念指南是解决此类问题的绝佳信息来源。请参阅此图片了解数据文件和表空间的组成方式。
回答by Rishabh Gupta
DATABASES's data are stored in logical storage units called TABLESPACES. A database may contain "one or more" tablespaces. A tablespace may contain one or more datafiles.
DATABASES 的数据存储在称为 TABLESPACES 的逻辑存储单元中。一个数据库可能包含“一个或多个”表空间。一个表空间可能包含一个或多个数据文件。
A database's data is collectively stored in the datafiles that constitute each tablespace of the database.
数据库的数据共同存储在构成数据库的每个表空间的数据文件中。
Example: the simplest database may have one tablespace and one datafile. On the other hande another database can have 5 tablespaces which may contain two datafiles each (On a total of 10 files)
示例:最简单的数据库可能有一个表空间和一个数据文件。另一方面,另一个数据库可以有 5 个表空间,每个表空间可能包含两个数据文件(总共 10 个文件)
回答by sushant gosavi
Let's consider an example of an Ocean consist of lots of water. Now you want that water. For this what you do is collect water in barrel for better usage and better storage purpose. Same here Ocean is databasehaving lots of Data files here data file means waterand for better usage and handling you put that into barrel you can relate barrel as Tablespace
让我们考虑一个由大量水组成的海洋的例子。现在你想要那些水。为此,您要做的是在桶中收集水,以便更好地使用和更好地储存。同样在这里,Ocean 是具有大量数据文件的数据库,这里数据文件意味着水,为了更好地使用和处理,您可以将其放入桶中,您可以将桶关联为表空间
An Oracle database consists of one or more logical storage units called tablespaces, which collectively store all of the database's data.
Oracle 数据库由一个或多个称为表空间的逻辑存储单元组成,这些单元共同存储数据库的所有数据。
Databases, tablespaces, and datafiles are closely related, but they have important differences:
数据库、表空间和数据文件密切相关,但它们有重要区别:
Each tablespace in an Oracle database consists of one or more files called datafiles, which are physical structures that conform to the operating system in which Oracle is running.
A database's data is collectively stored in the datafiles that constitute each tablespace of the database. For example, the simplest Oracle database would have one tablespace and one datafile. Another database can have three tablespaces, each consisting of two datafiles (for a total of six datafiles).
Oracle 数据库中的每个表空间由一个或多个称为数据文件的文件组成,这些文件是符合运行 Oracle 的操作系统的物理结构。
数据库的数据共同存储在构成数据库的每个表空间的数据文件中。例如,最简单的 Oracle 数据库将有一个表空间和一个数据文件。另一个数据库可以有三个表空间,每个表空间由两个数据文件组成(总共六个数据文件)。
回答by Mohamed Azizi
database is contained in one or more tablespace.
数据库包含在一个或多个表空间中。