Concepts that must be mastered before the Oracle architecture for beginners, before learning about the Oracle architecture, you must master the following two basic concepts: databases and instances. 1. database is a collection of data. Whether the database adopts a relational structure or an object-oriented structure, the oracle database stores the data in the data file. Internally, the logical ing of database structure data to files enables separate storage of different data. These logical partitions are called tablespaces. Table space and file Introduction: 1: Table space is the logical division of the database. Each database has at least one table space, called the system table space ). A tablespace can belong to only one database. Each tablespace is composed of one or more files on the same disk. These files are called data files. Table space features: (1) control database data disk allocation (2) restrict the disk space that users can use in the table space (3) The table space has online, offline, readonly, readwrite attribute: SQL> alter tablespace table space name attribute; query table space status: SQL> select tablespace_name, status from dba_tablespaces; Note: system, undo, the temp tablespace cannot be set as the offline attribute. (4) Completing backup and recovery of some databases (5) Expanding the tablespace through data files. The tablespace size is equal to the sum of the data files that make up the tablespace. Query the ing between a table space and a data file: SQL> select tablespace_name, bytes, file_name from dba_data_files; operations based on the tablespace: (1) query the user's default tablespace: SQL> select username, default_tablespace from dba_users; (2) query and store the table's tablespace: SQL> select table_name, tablespace_name from user_tables; (3) modify the user's default tablespace: SQL> alter user username default tablespace tablespace_name; (4) move data from one tablespace to another: SQL> alter table table_name move tablespace tablespace_name; 2. Each tablespace in a data file is composed of one or more files on the same disk. These files are called data files. data files can only belong to one tablespace. The data file size can be changed after being created. To create a new tablespace, you must create a new data file. Once a data file is added to a tablespace, it cannot be moved from the tablespace or be associated with other tablespaces. The three types of files required by the database are data file, control file, and redolog file. Other files prameter file, password file, and archived log files are not required by the database. They only support the database. View the physical file composition of the database: (1) view the data file: SQL> select * from v $ datafile; (2) view the control file: SQL> select * from v $ controlfile; (3) view log files: SQL> select * from v $ logfile; 2. An instance is a common means of operating the oracle database. A database instance is also called a server. It is used to access the storage structure of the database file set and the collection of background processes. A database can be accessed by multiple instances (called the true application cluster option ). Parameters that determine the size and composition of an instance can be stored in the initialization file named init. ora or hidden in the server parameter file inside the database. Use spfile to reference this file, which is stored in the spfile. ora file. When the instance starts, it reads the initialization file. The database system administrator can modify the file. Modifications to the initialization file are only valid at the next startup. The Instance is divided into two parts: 1: memory structure (memory structure) memory structure is divided into two parts: the SGA (System Global Area) Area is the memory Area used to store database information, this information is shared by the database process. It contains data and control information of the Oracle server. It is allocated in the actual memory of the computer where the Oracle server resides. If the actual memory is insufficient, it is written into the virtual memory. Including :. share pool. datafase buffer cache. redo log buffer. the other structures PGA (Program Global Area) Area contains data and control information of a single server process or a single background process, opposite to the SGA shared by several processes, PGA is only used by one process. PGA is allocated when a process is created and recycled when the process is terminated. 2: background process (background process) includes :. PMON is responsible for clearing resources when an Oracle process fails. if necessary, SMON checks Database Consistency and starts database recovery when the database is opened. DBWR is responsible for writing changed data from the database buffer cache to the data file. LGWR writes changes in the redo log buffer to the online redo log file. CKPT updates the database status information in the control file and data file whenever changes in the buffer cache are permanently recorded in the database.