1. 程式人生 > >Oracle 資料庫/表空間/資料檔案之間的關係

Oracle 資料庫/表空間/資料檔案之間的關係

Databases, tablespaces, and datafiles are closely related, but they have important differences:

  • An Oracle database consists of one or more logical storage units called tablespaces, which collectively store all of the database's data.
  • 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資料庫是由一個或多個表空間(tablespace)的邏輯儲存單位構成的,這些表空間共同來儲存資料庫的資料
  • Oracle資料庫的每個表空間由一個或多個被稱為資料檔案(datafile)的物理檔案構成,這些檔案由Oracle所在的作業系統管理。
  • 資料庫的資料實際儲存在構成各個表空間的資料檔案中。例如,一個最簡單的Oracle資料庫至少包含一個表空間及一個數據檔案。再例如,一個數據庫可能含有三個表空間,每個表空間由兩個資料檔案構成(即總共有六個資料檔案)。
資料庫是由一個或多個被稱為表空間(tablespace)的邏輯儲存單位構成。表空間內的邏輯儲存單位為
(segment),段又可以繼續劃分為資料擴充套件(extent)。而資料擴充套件是由一組連續的資料塊(data block)構成。