BIT352 · 2080 · 10 marks
What do you mean by database management system? Mention the clear architecture of oracle database.
What do you mean by database management system? Mention the clear architecture of oracle database.[10]
Quick answer
A Database Management System (DBMS) is a collection of interrelated data and a set of programs to access and manage that data. It is software that acts as an interface between the user and the database, allowing users to create, retrieve, update, and delete data in an organized and efficient manner.
Database Management System (DBMS) and Oracle Database Architecture
What is a Database Management System (DBMS)?
Key Characteristics of DBMS:
- Data Abstraction: Hides the complexity of data storage from users
- Data Independence: Changes in data structure do not affect application programs
- Data Integrity: Ensures accuracy and consistency of data
- Data Security: Provides access control and authorization mechanisms
- Concurrent Access: Allows multiple users to access data simultaneously
- Backup and Recovery: Provides mechanisms to recover data after failures
Examples:
Oracle, MySQL, PostgreSQL, Microsoft SQL Server, MongoDB
Oracle Database Architecture
Oracle Database has a well-defined architecture consisting of two major components:
Oracle Database = Instance + Database (Physical Files)
1. Oracle Instance
An Oracle Instance is a combination of Memory Structures and Background Processes that manage database files. It exists in RAM and is created when the database is started.
A. Memory Structures (SGA - System Global Area)
The System Global Area (SGA) is a shared memory region allocated when an Oracle instance starts. It contains:
| Component | Description |
|---|---|
| Database Buffer Cache | Stores copies of data blocks read from datafiles; reduces disk I/O |
| Shared Pool | Contains Library Cache (parsed SQL, execution plans) and Data Dictionary Cache |
| Redo Log Buffer | Records all changes made to the database before writing to redo log files |
| Large Pool | Optional area for large memory allocations (backup, parallel queries) |
| Java Pool | Used for Java code and data in the JVM |
| Streams Pool | Used by Oracle Streams for data replication |
Additionally, each user session has a PGA (Program Global Area) - a private memory area for individual server processes.
B. Background Processes
Oracle uses several background processes to manage the database:
| Process | Full Name | Function |
|---|---|---|
| SMON | System Monitor | Performs instance recovery at startup; cleans temporary segments |
| PMON | Process Monitor | Cleans up failed user processes; releases locks and resources |
| DBWn | Database Writer | Writes modified (dirty) blocks from buffer cache to datafiles |
| LGWR | Log Writer | Writes redo log buffer entries to redo log files |
| CKPT | Checkpoint | Updates datafile headers and control files at checkpoints |
| ARCn | Archiver | Copies filled redo log files to archive log destination |
| RECO | Recoverer | Resolves distributed transaction failures |
2. Oracle Database (Physical Storage Structures)
The physical database consists of OS files stored on disk:
A. Datafiles (.dbf)
- Store the actual data (tables, indexes, etc.)
- Each database has one or more datafiles
- Belong to a tablespace
B. Control Files
- Small binary files that record the physical structure of the database
- Contain database name, datafile locations, redo log file locations, and checkpoint information
- Critical for database startup and recovery
C. Redo Log Files
- Record all changes made to the database
- Used for database recovery in case of failure
- Oracle writes to redo log files in a circular fashion
- At least two redo log groups are required
D. Archive Log Files (Optional)
- Archived copies of filled redo log files
- Used for complete media recovery
- Required when database runs in ARCHIVELOG mode
E. Parameter File (SPFILE / PFILE)
- Contains initialization parameters for the Oracle instance
- Defines SGA size, number of processes, database name, etc.
F. Password File
- Stores passwords for privileged users (SYSDBA, SYSOPER)
3. Logical Storage Structures
Oracle also has logical structures that map to physical storage:
Database
└── Tablespace (SYSTEM, SYSAUX, USERS, TEMP, UNDO)
└── Segment (Table Segment, Index Segment)
└── Extent (collection of contiguous blocks)
└── Data Block (smallest unit, e.g., 8KB)
Oracle Architecture Diagram (Simplified)
+--------------------------------------------------+
| ORACLE INSTANCE (RAM) |
| +--------------------+ +--------------------+ |
| | SGA | | Background | |
| | - Buffer Cache | | Processes: | |
| | - Shared Pool | | SMON, PMON, DBWn | |
| | - Redo Log Buffer | | LGWR, CKPT, ARCn | |
| | - Large Pool | | | |
| +--------------------+ +--------------------+ |
+--------------------------------------------------+
| |
v v
+--------------------------------------------------+
| ORACLE DATABASE (DISK) |
| Datafiles | Control Files | Redo Log Files |
| Archive Logs | Parameter File | Password File |
+--------------------------------------------------+
Summary
| Component | Location | Purpose |
|---|---|---|
| SGA | Memory (RAM) | Shared data and SQL caching |
| PGA | Memory (RAM) | Per-session private data |
| Background Processes | CPU | Automate database management tasks |
| Datafiles | Disk | Persistent data storage |
| Control Files | Disk | Database structure metadata |
| Redo Log Files | Disk | Change records for recovery |
Note: The separation of Instance (memory + processes) and Database (disk files) is the fundamental design principle of Oracle, enabling features like crash recovery, high availability, and Oracle RAC (Real Application Clusters).
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.