Oracle Database learning-Basic Structure

Source: Internet
Author: User


Oracle Database learning-basic structure popularize basic knowledge of oracle. To sum up, oracle is composed of instances and databases. The structure is as follows: www.2cto.com the oracle database consists of instances and databases: * The database consists of data files (including oracle Data, indexes, table structures, and other data) and control files (including the operation information of each table) log Files (SQL statements for data operations), parameter files, password files, and log archive files (in archive mode) (used for log recovery when the server crashes or the hard disk is damaged) * An instance consists of a memory structure (memory strutct) and background processor. Memory Structure: * PGA: Processor Global Area. Each client accesses an oracle server with a PGA, which is used to save information about the customer's ticket * SGA: system Global Area: the Global area of the System. It is mainly used for oracle instances, including the shared pool, data buffer Area, and redo log buffer. shared pool: * includes the library cache and data directory cache. The library cache mainly stores the latest SQL check, compilation, and execution plans. When the same statement comes in next time, this can be reused to avoid repeated checks for compilation execution plans. Data directory cache stores the field definitions and indexes of database data tables. The size of the shared pool directly affects the database performance. Data buffer area: This area stores user data modification and query operations. The size of the memory area directly affects the database performance. Redo log buffer area: stores the Operation Records of recent users on the database. This size has little impact on the database performance. The background processes required for oracle include: PMON, SMON, DBWR, LOGWR, CKPT, and others. Each function is as follows: * PMON monitors the health of PGA, releases dead PGA, and recycles resources, manage PGA lifecycle * SMON monitoring SGA health status, collecting SGA fragment memory, monitor instance health status * DBWR maintains data buffer area and physical table data consistency * LGWR maintains redo log buffer area Memory data and log file consistency * CKPT sets checkpoints, when an oracle instance encounters a problem, it can be restored to the condition before the instance fails. The oracle memory structure consists of blocks, zones, segments, and tablespaces. A block is the minimum structure of oracle in the memory. The zones, segments, and tablespaces are the top-up memory structure of oracle. Fast, too small data management, too large, and a large amount of data fragments. Analyze the specific situation. A tablespace is the largest logical unit in oracle. A tablespace can belong to only one database. A database can contain multiple tablespaces, but by default it contains one system tablespace. Syntax for creating a TABLESPACE: Java code create tablespace name DATAFILE path [SIZE interger M | K] LOGFILE path [autoextend on | OFF]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.