Oracle, Relational Database Management System ( RDBMS ) is a collection of related information and allows access to these information simultaneously. This comprises database and the instance. The information domiciles in the database. The instance which is the combination of background processes and system memory is used to access the data in the database.
Architecture of Database :
The architecture of the database can be represented in terms of logical structure and physical structure. Since the logical and physical structures are separate, the physical data storage can be changed without affecting the access to logical structure.
Logical Structure :
The logical structure of the database includes the following elements.
  • Tablespace
  • Schema
  • Tablespace
    A database is divided into one or more storage units known as tablespaces. Tablespace groups related data together. The tablespace can be used to control database data allocation in disk space. Every Oracle database has at least one tablespace which is created automatically called the SYSTEM tablespace. It is highly recommended to create a separate tablespace for the user data even though this SYSTEM tablespace can include a small database. The SYSTEM tablespace is used to store information like the data dictionary. The data dictionary is used to store data about data, metadata. This contains information about keys, table access permissions etc.
  • Data Blocks
  • In database, data is stored in data blocks which is also called logical blocks, pages or ORACLE blocks. The block size is specified by the initialization parameter DB_BLOCK_SIZE
  • Extents
  • An extent is a specific number of connected data blocks. These are allocated for the storage of specific type of information.
  • Segments
  • A segment is a collection of extents which are allocated for a specific type of data structure. These are stored in the same tablespace. ie the data in each table is kept in its data segment and each index’s data is kept in its own index segment. Space is allocated for segments in extents. Hence ORACLE dynamically allocates another extent for a segment when the present extents of the segment are full.
    Schema
    The schema defines the way we see the data in the database and the level of access for the users. It is a aggregation of logical structure objects which are known as schema objects and refers to the database’s data. It is owned by the user and will have the same name as the user. The schema includes the following structures
    1. Tables
    2. Indexes
    3. Views
    4. Clusters
    5. Triggers
    6. Stored Procedures
    7. Sequences
    Physical Structure :
  • One or more Datafiles
  • Two or more redo log files
  • One or more control files
  • Datafiles
    Datafiles are used to store the information in the database. Every database has one or more datafiles. The oracle parameter MAXDATAFILES specifies the maximum number of datafiles. A datafile can be related to only one database. The data in the datafile is stored in the memory cache and is read during normal database operation. If a user wants to access the data in a table and if the requested data is not in the memory cache for that database, then it is read from the datafile. It is not necessary that the new or modified data is written to the datafile immediately. In order to increase the performance and to decrease the amount of disk access, these data is pooled in memory and will be written to the datafiles all at once. This is determined by the background process, database writer process.
    Redo Log Files
    The transactions against the database are recorded in files called Redo Log Files. A redo log consists of redo records. Its main purpose is to record the changes made to the data. When database transaction occurs, it is entered in redo log buffers. If system failure occurs the information saved in the redo files can be used for recovery. We cannot recover the system if the redo log file is lost. There are at least three or more log files in Oracle.
    Data is written in the redo log file in a cyclical manner, ie one after the other. When all the files are filled, Oracle returns to the first log file and overwrites its content.
    Control Files
    As the name indicates, control files stores the control information about all the files. It contains database’s name, name and location of redo log files and datafiles and timestamp of database creation.
    Oracle automatically modifies the control file when a new datafile or redo file is created. This file is also used in database recovery.
    Oracle database is a flexible and cost effective way to manage information. It also provides effective solutions in failure recovery and provides unauthorized access.