Introduction to the Oracle Database 2

Overview of Application Architecture

There are 2 common ways to architect a database: client/server or multitier. As internet computing becomes more prevalent in computing environments, many database management systems are moving to a multitier environment.

Multitier Architecture:Application Servers

A multitier architecture has the following components:

- A client or initiator process that starts an operation

- Oner or more application servers that perform parts of the operation. An application server provides access to the data for the client and performs some of the query processing, thus remoing some of the load from the database server. It can server as an interface between clients and multiple database servers, including providing an additional level of security.

- An end or database server that stores most of the data used in the operation

this architecture enables use of an application server to do the following:

- validate the credentials of a client, such as a Web browser

- Connect to an Oracle database server

- Perform the requested operation on behalf of the client

Overview of Physical Database Structures

The physical database structures of an Oracle database including datafiles, redo log files, and control files.

Datafiles

Every Oracle database has one or more physical datafiles. The datafiles contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the datafiles allocated for a database.

The characteristics of datafiles are:

- A datafile can be associated with only one database.

- Datafiles can have certain characteristics set to let them automatically extend when the database runs out of space.

- One or more datafiles form a logical unit of database storage called a tablespace.

Control Files

Every Oracle database has a control file. Acontrol file contains entries that specify the physical structure of the database. e.g: Database name, Names and locations of datafiles and refo log files, Time stamp of database creation etc.

Redo Log Files

Every Oracle database has a set of 2 or more redo log files. the set of redo log files is collectively know as the redo log for the database. A redo log is made up of redo entries (also called redo records).

The primary function of the redo log is to record all changs made to data. If a failure prevents modified data from being permanently written to the datafiles, then the changes can be obtained from the redo log, so work is never lost.

Archive Log Files

You can enable automatic archiving of the redo log. Oracle automatically archives log files when the database is in ARCHIVELOG mode.

Parameter Files

Parameter files contain a list of configuration parameters for that instance and database.

Oracle recommends that you create a server parameter file (SPFILE) as a dynamic means of maintaining initialization parameters. A SPFILE lets you store and manage your initialization parameters persistently in a server-side disk file.

Alert and Trace Log Files

Each server and background process can write to an associated trace file. When an internal error is detected by a process, it dumps information about the error to its trace file. Some of the information written to a trace file is intended for the database administrator, while other information is for Oracel Support Services. Trace file information is also used to tune applications and instances.

The alert file, or alert log, is a special trace file. The alert log of a database is a chronological log of messages and errors.

Backup Files

To restore a file is to replace it with a backup file. Typically, you restore a file when a media ailure or user error has damaged or deleted the original file.

Overview of Logical Database Structures

The logical storage structures, including data blocks, extents, and segments, enable Oracle to have fine-grained control of disk space use.

Tablespaces

A database is divided into logical storage units called tablespaces, which group related logical structures together. One or more datafiles are explicitly create for each tablespace to physically store the data of all logical structures in a tablespace. Then combined size of the datafiles in a tablespace is the total storage capacity of the tablespace.

Every Oracle database contains a SYSTEM tablespace and a SYSAUX tablespace. Oracle creates them automatically when the database is created. The system default is to create a smallfile tablespace, which is the traditional type of Oracle tablespace.

Oracle Data Blocks

At the finest level of granularity, Oracle database data is stored in data blocks. One datablock corresponds to a specific number of bytes of physical database space on disk. The standard block size is specified by the DB_BLOCK_SIXE initialization parameter. In addition, you can specify up to five other block sizes. A database uses and allocates free database space in Oracle data blocks.

Extents

The next level of logical database space is an extent. An extent is a specific number of contiguous data blocks, obtained in a single allocation, used to store a specific type of information.

Segments

Above extents, the level of logical database storage is a segment.  A segment is a set of extents allocated for acertain logical structure, that including Data segment, Index segment, Temporary segment and Rollback segment.

posted @ 2012-10-26 15:03  南宫元耘  阅读(173)  评论(0编辑  收藏  举报