oracle9i server: an overview
The oracle server consists of two major components---the database and the instance. Database is a confusing term that is often used to represent different things on different platforms; the only commonality is that is something to do with data. In oracle, the term database represents the physical files that store data. An instance comprises the memory structures and background processes used to access(from the physical database files). Each database should have at least one instance associated with it. It is possible for multiple instances to access a single database; this is known as the Real Application Cluster configuration.
You use the oracle database,which is a collection of data,to store and retrieve information. The database consists of logical structures and physical structures. Logical structures represent the components that you can in the oracle database( such as tables,indexes, and so on), and physical structures represent the method of storage that oracle uses internally ( the physical files), so that the logical structures can be defined identically across different hardware and operating system platforms.
Logical storage structures
oracle logically divides the database into smaller units to manage,store, and retrieve data effeciently. the following paragraphs give you an overview of the logical structures;
Tablespaces The database is logically divided into smaller units at the highest level called tablespaces. A tablespace commonly groups related logical structures together. For example, you might group data specific to an application or a function together in one or more tablespaces. This logical division helps to administer a portion of the database without affecting rest of it. Each database should have one or more tablespaces. When you create a database, oracle creates system tablespace as a minimum requirements.
Blocks A block is the smallest unit of storage in oracle. A block is usually a multiple of the operating system block size. A data block corresponds to a specific number of bytes of storage space. The block size is based on the parameter DB_BLOCK_SIZE and is determined when the database is created.
Extents An extent is the next level of logical grouping, it is a grouping of contiguous blocks, allocated in one chunk.
Segments A segment is a set of extents allocated for logical structures such as tables,indexes, clusters and so on. Whenever you create a logical structure, oracle allocates a segment, which contains at least one extent, which in turn has at least one block. A segment can be associated to only one tablespace.
There are four types of segments:
Data segments Store the table(or cluster) data. Every table created will have a segment allocated.
Index segments Store the index data. Every index created will have an index segment allocated.
Temporary segments Are created when oracle needs a temporary work area, such as sorting, during a query, and to complete execution of SQL statement. These segments are freed when the execution completes.
Undo segments Store undo information.When you roll back the changes made to the database, undo records in the undo tablespace are used to undo the changes.
A schema is a logical structures that groups the database objects. A schema is not directly related to a tablepace or any other logical structure. The objects that belong to a schema can reside in different tablespaces, and a tablespace can have objects that belong to multiple schemas. Schema objects include structures such as tables, indexes, synonyms, procedures, triggers, database links and so on.
Oracle physical storage structures
the physical database structure consists of three types of physical files:
#datafiles
#redo log files
#control files
Datafiles contain all the database data. every oracle database should have one or more datafiles. each data file is associated with one and only one tablespace. A tablespace can consist of one or more datafiles.
Redo log files record all changes made to data. Every oracle database should have two or more redolog files, because oracle writes to the redo log files in a circular fashion. If a failure prevents a database change from being written to a datafile, you can obtain the changes from the redo log files; therefore changes are never lost. Redo logs are critical for database operation and recovery from a failure. Oracle allows you to have multiple copies of the redo log files(preferably on different disks). This feature is known as multiplexing of redologs, a process in which oracle treats the redolog and its copies as a group identified with an integer, known as redo log group.
Control files Every oracle database has at lieast one control file. It maintains information about the physical structure of the database. The control file can be multiplexed, so that oracle maintains multiple copies. It is critical to the database. The control file contains the database name and timestamp of database creation as well as the name and location of every datafile and redolog file.
Oracle Memory Structures
The memory structures are used to cache application data, data dictionary information ( metadata--information about the objects, logical structures, schemas, privileges, and so on, Structured Query Language(SQL) commands, PL/SQL and Java program units, transaction information, data required for exection and individual database requests, and other control information. Memory structures are allocated to the oracle instance when the instance is started. The major memory stuctures are known as the System Global Area( also called the Shared Global Area) and the Program Global Area ( also called Private Global Area or the Process Global Area).
reference: OCA/OCP Oracle 9i DBA Fundamentals I study guide by Biju Thomas and Bob Bryla, BPB Publications.
Wednesday, April 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment