Tuesday, January 27, 2009

Oracle Architecture -- Physical Database Structures

The Physical structure of a database contains the operating system files. Information in the Oracle database is stored in the tablespace in the form of the Physical structures which occupy the disk space available to store data. These structures include:
  • Password file, which contain the password information for all users.
  • Parameter file, which contains all the important information necessary to start a database. The parameter file is called init.ora , which you can find in the operating system.
  • Datafiles, which contain the application data being stored, as well as any data necessary to store user-IDs, passwords, and privileges.
  • Redo log files, which store all the transactions made to the database. These files are also called transaction log files.
  • Control files, which store information specifying the structure of the database, such as the name and time of creation of the database and the name and location of the datafiles.

Password File

Since the tasks performed by the database administrator (DBA), are critical and should not be done by any other user, there needs to be a more secure method to safeguard his password.

To authenticate a user logging in as the DBA, two methods can be used. Either an operating system authentication, power can be employed or a password file can be used.

A password file is a file that contains the passwords of the DBA. The password file authenticates the user logging in as the DBA. When a user is granted the privileges of a DBA, his username is automatically added in the password file. The password file contains the passwords in encrypted form.

Parameter File

When you start an Oracle database instance, the start-up process checks for the status of certain parameters. The parameter file, init.ora, is the most important part of a database. Some of the parameters identified by the parameter file include:
  • the amount of system memory area that can be used by an instance
  • the name of the database
  • the maximum number of licensed users
  • the names of the control files
  • the amount of memory space that can be used by the redo log files
  • the frequency with which the redo log is updated

Datafiles

The Oracle database requires one or more datafiles to store the application data. The tablespace is composed of the datafiles. Every datafile is associated with just one tablespace, whereas a tablespace can contain more than one datafile. The data stored in datafiles include:


  1. The data for an application, for example, employee information (first name, last name, address, phone, salary, and department) and product information (product name, unit-price, and supplier-name);
  2. The information that the database needs to manage user-data (for example, since the salary of an employee must contain only numbers, the system datafiles will ensure that characters are not stored.);
  3. The information to the database need to determine the validity of your username and password when you log on to the Oracle database.

Redo Log Files

The Oracle database has a set of two or more redo log files. The main purpose of the redo log is to keep track of changes made to the application data. Any change made to the data is not immediately made permanent in the database. The changes are first stored in the systems' redo log and later made permanent. This makes having redo logs a useful feature because if the system fails (which usually happens when you least expect it), you can restore the changes from the redo log, a fact which means you don't have to lose your work! More precisely, if you have an unexpected power outage that shuts your system down, you will lose all transactions stored in the RAM. However, using the automatically maintained redo log, you can apply the changes made recently and restore all information up to the time of the power failure. Oracle allows you to protect the redo log itself by allowing for multiplexed redo log files that back up the data from the original redo log files in different disks simultaneously.

Control Files

The Oracle database has a control file that contains information about the Physical structure of the database. The information may include:
  • the name of the database;
  • the name and location of the datafiles;
  • the name and location of the redo log;
  • the time when the database was created.

The control file is used every time an instance of an Oracle database is started, to identify the database and determine the redo log that must be opened to start the database. The control file is automatically modified when the database is changed; for example, when a new datafile is created or when the redo log changes. Oracle allows multiplexed control files; that is, you can have many control files in different disks that will be updated simultaneously. The information stored in the control files are also used for database recovery, to identify which redo log must be accessed. The control file always contains the last change number of the last change to the database.

No comments:

Post a Comment