Introduction to Oracle Database
About Relational Databases
Every organization has information that it must store and manage to meet its requirements. This information must be available to those who need it. Most companies today use a database to automate their information systems. A database is an organized collection of information treated as a unit. The purpose of a database is to collect, store, and retrieve related information for use by database applications.
Database Management System (DBMS)
A database management system (DBMS) is software that controls the storage, organization, and retrieval of data. Typically, a DBMS has the following elements:
■Kernel code – This code manages memory and storage for the DBMS.
■Repository of metadata – This repository is usually called a data dictionary.
Oracle Database Architecture
Database and Instance
An Oracle database server consists of a database and at least one database instance (commonly referred to as simply an instance). Because an instance and a database a rest closely connected, the term Oracle database is sometimes used to refer to both instance and database. In the strictest sense the terms have the following meanings:
■Database – A database is a set of files, located on disk, that store data. These files can exist independently of a database instance.
■Database instance – An instance is a set of memory structures that manage database files. The instance consists of a shared memory area, called the system global area (SGA), and a set off background processes. An instance can exist independently of database files.
A database can be considered from both a physical and logical perspective. Physical data is data view able at the operating system level. For example, operating system utilities such as the Linux ls and p scan list database files and processes. Logical data such as a table is meaningful only for the database. A SQL statement can list the tables in an Oracle database, but an operating system utility cannot. The database has physical structures and logical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting access to logical storage structures. For example, renaming a physical database file does not rename the tables whose data is stored in this file.
Physical Storage Structures
The physical database structures are the files that store the data. When you execute the SQL command CREATE DATABASE, the following files are created:
Every Oracle database has one or more physical data files, which contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the data files.
Every Oracle database has a control file. A control file contains meta data specifying the physical structure of the database, including the database name and the names and locations of the database files.
■Online redo log files
Every Oracle Database has an online redo log, which is a set of two or more online redo log files. An online redo log is made up of redo entries (also called redo records), which record all changes made to data.
Many other files are important for the functioning of an Oracle database server. These files include parameter files and diagnostic files. Backup files and archived redo log files are offline files important for backup and recovery.
Logical Storage Structures
The following logical storage structures enable Oracle Database to have fine-grained control of disk space use:
At the finest level of granularity, Oracle Database data is stored in data blocks. One data block corresponds to a specific number of bytes on disk.
An extent is a specific number of logically contiguous data blocks, obtained in a single allocation, used to store a specific type of information.
A segment is a set of extents allocated for a user object (for example, a table or index), undo data, or temporary data.
A database is divided into logical storage units called table spaces. A table space is the logical container for a segment. Each table space contains at least one data file.