Computer Knowledge

Database Management Systems

5,344 Questions

Database Management Systems (DBMS) form the core framework for data storage, retrieval, and security in modern software applications. Concepts such as the E-R model, backup planning, SQL integration, and big data architecture are essential for computer knowledge sections. This hub offers a comprehensive set of practice questions to master DBMS fundamentals and advanced database operations.

E-R Model ConceptsBackup and RecoverySQL Server UpgradesJDBC and ODBCBig Data CharacteristicsData VirtualizationOracle Database

Database Management Systems Questions

Multiple choice
  1. The TIMED_STATISTICS parameter is set to TRUE.

  2. The hit percentage in the buffer cache is at least 95%.

  3. The OPEN_CURSOR parameter is set to at least twice the default value.

  4. The value in the RELOADS column of V$LIBRARYCACHE is consistently zero or close to zero.
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

CURSOR_SPACE_FOR_TIME set to TRUE tells Oracle to keep cursors in the shared SQL area even after they're closed, trading memory for faster execution. This only makes sense if cursors are being frequently re-executed without needing reload. The V$LIBRARYCACHE view's RELOADS column shows how many times library cache pins had to be reloaded - if this is consistently zero or close to zero, it means the current cache size is sufficient and there's no benefit to changing this parameter. The other options are unrelated to cursor caching behavior.

Multiple choice
  1. one table

  2. one or more tables

  3. two or more tables

  4. atleast two tables

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Oracle, a cluster is a schema object that stores data from two or more tables that share one or more common columns. Tables in a cluster are physically stored together based on the shared cluster key, which improves performance for joins between these tables. A single table cannot form a cluster, and 'at least two' is less precise than 'two or more'.

Multiple choice
  1. SGA

  2. SQL Area

  3. Library Cache

  4. PGA

  5. Shared Pool

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The PGA (Program Global Area) is a memory region that stores session-specific information and variables for each user session when NOT running in MTS (Multi-Threaded Server) mode. It contains private SQL areas, session variables, and other session-specific data structures. The SGA is shared across all sessions, while the PGA is exclusive to each session.

Multiple choice
  1. Database Buffer Cache

  2. PGA

  3. Redo Log Buffer

  4. Shared Pool

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The Shared Pool in the SGA (System Global Area) caches data dictionary information, including table definitions, user privileges, and other metadata. This cache is frequently accessed by SQL parsing and execution. The Database Buffer Cache stores actual data blocks, PGA is for session-specific memory, and the Redo Log Buffer holds transaction log entries before they're written to redo log files.

Multiple choice
  1. Sort Area

  2. System Change Number (SCN)

  3. Session Information

  4. Cursor state

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The System Change Number (SCN) is stored in the SGA's control files and data headers, not in the PGA. The PGA contains session-specific memory areas like the Sort Area (for sorting operations), Session Information (user session data), and Cursor State (information about open cursors). The SCN is a database-wide mechanism for tracking changes and maintaining consistency, not session-specific.

Multiple choice
  1. Shut down the instance, restore all of the Oracle files from the most recent backup, and restart the instance

  2. Manually restore and recover the two corrupt data files from the most recent backup

  3. Shut down the instance, restore the two corrupt data files from the most recent backup, and restart the instance

  4. Shut down the instance, restore all of the Oracle files from the most recent backup, restart the instance, and open the database using the 'ALTER DATABASE OPEN RESETLOGS' statement

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In NOARCHIVELOG mode, no archived redo logs are maintained, making point-in-time recovery impossible. When media failure occurs, you can only restore from the last whole closed backup - you cannot apply incremental changes. Restoring only corrupt files won't work because the database would be in an inconsistent state. RESETLOGS is for archived log recovery scenarios. The only option is to restore all files from backup, accepting data loss since the last backup.

Multiple choice
  1. Increase the number of archiver (ARCn) processes

  2. Increasing the number of members for all log groups

  3. Increasing the number of log writer (LGWR) processes

  4. Increasing the number of database writer (DBWn) processes

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Increasing the number of database writer (DBWn) processes

Multiple choice
  1. is a value that is incremented whenever a dirty read occurs

  2. is incremented whenever a deadlock occurs

  3. is a value that keeps track of explicit locks

  4. is a value that is incremented whenever database changes are made

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Oracle SCN (System Change Number) is a logical timestamp that increments whenever database changes are made. It's used for data consistency, recovery, and tracking the order of transactions. It is NOT related to dirty reads, deadlocks, or explicit locks.

Multiple choice
  1. The TIMED_STATISTICS parameter is set to TRUE.

  2. The hit percentage in the buffer cache is at least 95%.

  3. The OPEN_CURSOR parameter is set to at least twice the default value.

  4. The value in the RELOADS column of V$LIBRARYCACHE is consistently zero or close to zero.
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

CURSOR_SPACE_FOR_TIME=TRUE keeps cursors in memory to reduce reparsing. Before setting it, confirm V$LIBRARYCACHE shows RELOADS at or near zero, indicating cursors aren't being reloaded. This prevents wasting memory if the cache is already ineffective.

Multiple choice
  1. Using the Oracle Database Configuration Assistant.

  2. Using the Oracle-supplied database creation procedures.

  3. Using the SQL CREATE DATABASE command.

  4. None of the above is correct.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Oracle Database Configuration Assistant (DBCA) is a GUI tool that automates database creation with wizards and templates. It handles all complex setup steps including parameter files, password files, and initialization parameters. Manual methods require deep expertise and are error-prone. DBCA is Oracle's recommended approach for most production and development environments.

Multiple choice
  1. The shared pool CANNOT be dynamically resized.

  2. The shared pool contains only fixed structures.

  3. The shared pool consists of the library cache and buffer cache.

  4. The shared pool stores the most recently executed SQL statements and the most recently accessed data definitions.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The shared pool is a memory structure in the SGA that caches parsed SQL statements, PL/SQL code, and data dictionary definitions. It consists of the library cache and dictionary cache, NOT the buffer cache (which stores actual data blocks). This caching eliminates the need to re-parse frequently executed statements, significantly improving performance.

Multiple choice
  1. DBA

  2. SYSDBA

  3. SYSOPER

  4. RESOURCE

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Creating an Oracle database requires SYSDBA privilege, which is the highest administrative privilege. DBA is a role that grants database administration permissions but does NOT include database creation authority. SYSOPER provides startup/shutdown and basic operations but cannot create databases. RESOURCE is a schema-level role for object creation with no database creation rights.

Multiple choice
  1. Control

  2. Alert

  3. Registry

  4. Parameter

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The control file contains the database's physical structure metadata including all data file names and locations. When you execute ALTER DATABASE RENAME FILE, Oracle automatically updates the control file to reflect the new path. Alert log entries are chronological records, parameter files are manual configs, and Registry stores Oracle software metadata - none auto-update from rename operations.

Multiple choice
  1. The Oracle server maintains the server parameter file.

  2. The server parameter file is created automatically when the instance is started.

  3. Changes can be made in memory and/or in the SPFILE with the ALTER SYSTEM command.

  4. The use of SPFILE provides the ability to make changes persistent across shut down and start up.

  5. The Oracle server keeps the server parameter file and the text initialization parameter file synchronized.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The server parameter file (SPFILE) is a binary file maintained by the Oracle server, providing persistent storage and automatic synchronization of initialization parameters. While ALTER SYSTEM can update both memory and SPFILE, and changes persist across restarts, option A captures the core advantage - Oracle actively manages the SPFILE, preventing human edit errors and ensuring consistency.

Multiple choice
  1. Index

  2. Table

  3. Temporary

  4. Boot strap

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Index segments store sorted copies of indexed columns, allowing Oracle to locate rows without scanning entire tables. This dramatically improves query performance, especially for large tables with selective WHERE clauses. Tables store actual data, temporary segments hold intermediate query results, and bootstrap segments contain internal metadata - none exist primarily for query performance enhancement.