Search code examples
oracleoracle11g

Database vs tablespace, what's the difference?


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


Solution

  • A little terminology:

    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.

    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)

    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.

    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.