Computer Knowledge

Database Management Systems

5,543 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 control file was copied before shutting down the instance.

  2. An operating system command was used to copy the control file.

  3. The Oracle server does not know the name of the new control file.

  4. A new control file name was added to the CONTROL_FILES parameter before shutting down the instance.

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

Control files must be copied when the database is completely shut down. Copying a control file while the database is open results in an inconsistent copy because the control file is being actively updated. When you try to mount using this inconsistent copy, Oracle detects the mismatch and fails the mount operation.

Multiple choice
  1. When a backup is taken, the Archiver process is disabled.

  2. The Archiver can only be started by issuing the ALTER DATABASE ARCHIVELOG command.

  3. LOG_ARCHIVE_START is still set to FALSE because the PFILE is not updated when you issue the ALTER SYSTEM command.

  4. The Archiver can only be started by issuing the ALTER SYSTEM ARCHIVE LOG START command each time the database is opened.

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

ALTER SYSTEM commands only affect the running instance's memory (SGA). They do not modify the PFILE (text parameter file) on disk. When you restart with the same PFILE, it still contains LOG_ARCHIVE_START=FALSE, so the Archiver remains disabled. To make the change persistent, you need to update the PFILE manually or use SPFILE.

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 stores the most recently executed SQL statements and the most recently accessed data definitions.

Multiple choice
  1. Write the current redo log to the archived redo log.

  2. Synchronize the modified data blocks in memory with the datafiles on disk.

  3. Ensure database consistency.

  4. Ensure that data blocks are read into memory as quickly as possible.

  5. Keep track of redo entries.

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

A checkpoint synchronizes modified data blocks in the buffer cache with the datafiles on disk, ensuring database consistency and reducing recovery time. During a checkpoint, the database writer (DBWn) processes write dirty blocks to datafiles, and the checkpoint position in redo logs is updated. Options A, C, and D are incorrect because checkpoints don't archive redo logs, don't directly ensure consistency (that's a result of the sync), and don't control data block reading speed.

Multiple choice
  1. The database's disk subsystem utilizes raw disk devices.

  2. Many user trace files exist that are no longer needed.

  3. A read-only database is maintained and used only to look up static information.

  4. A test database is being created and minimum administration effort is desired for the database.

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

Oracle Managed Files (OMF) is most beneficial for test databases or environments where minimal administrative effort is desired. OMF automatically names and manages database files based on the DB_CREATE_FILE_DEST and related parameters, eliminating manual file placement decisions. Options A, B, and C describe scenarios where OMF is either incompatible (raw devices), unnecessary (old trace files), or irrelevant (read-only static databases) respectively.

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

  2. Increase the number of members for all log groups.

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

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

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

When checkpoints frequently fail to complete, it typically indicates DBWn processes cannot write dirty blocks fast enough before the next checkpoint is due. Increasing the number of database writer (DBWn) processes allows more parallel writes, helping checkpoints complete on time. Options A and B are incorrect because ARCn and redo log members affect archiving, not checkpoint writing. Option C is incorrect because LGWR is a single process and cannot be multiplied; it writes to redo logs, not datafiles.

Multiple choice
  1. 90% - 100%; improve the efficiency of the application code.

  2. 80% - 85%; analyze the tables.

  3. 85% - 90%; improve performance by increasing the SHARED_POOL_SIZE.

  4. 90% - 95%; improve performance by increasing the LARGE_POOL_SIZE.

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

For an OLTP application, the Library Cache GETHITRATIO should be 90-100%. This ratio measures how often parsed SQL statements are found in cache without reparsing. Low ratios indicate inefficient application code that doesn't use bind variables or shares SQL properly. The solution is to improve application code, not increase SHARED_POOL_SIZE (which only masks the problem) or LARGE_POOL_SIZE (unrelated to library cache). Option C's 85-90% target is too low for OLTP, and Option D's solution is incorrect.

Multiple choice
  1. rman> RUN 2> CHECK LOGICAL 3> ALLOCATE CHANNEL c1 TYPE DISK; 4> DATAFILE 1 TO '/backup/f1.dbf', 5> DATAFILE 2 TO '/backup/f2.dbf';

  2. rman> RUN 2> ALLOCATE CHANNEL c1 TYPE DISK; 3> COPY LEVEL 0 4> DATAFILE 1 TO '/backup/f1.dbf', 5> DATAFILE 2 TO '/backup/f2.dbf';

  3. rman> RUN 2> ALLOCATE CHANNEL c1 TYPE DISK; 3> DATAFILE 1 TO '/backup/f1.dbf', 4> DATAFILE 2 TO '/backup/f2.dbf';

  4. rman> RUN 2> ALLOCATE CHANNEL c1 TYPE sbt_tape; 3> DATAFILE 1 TO '/backup/f1.dbf', 4> DATAFILE 2 TO '/backup/f2.dbf';

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

The correct RMAN RUN block allocates channel C1 to DISK and uses COPY LEVEL 0 to create image copies of two datafiles. LEVEL 0 creates a base copy usable for incremental backups. CHECK LOGICAL is intentionally omitted because the requirement specifies no logical block corruption detection. Option A is incorrect because CHECK LOGICAL is explicitly not needed. Option C is incorrect because it lacks LEVEL 0 required for incremental backup use. Option D is incorrect because sbt_tape is for tape, not disk backup as specified.

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 should be set to TRUE only when V$LIBRARYCACHE RELOADS is consistently zero or close to zero. This parameter prevents cursor aging out of the shared pool, but if reloads are occurring, it will worsen performance by keeping more cursors in memory while still requiring reloads. Options A, B, and C are incorrect because TIMED_STATISTICS, buffer cache hit ratio, and OPEN_CURSOR settings are unrelated to the CURSOR_SPACE_FOR_TIME decision.

Multiple choice
  1. the place where all deleted records are persisted

  2. the largest logical storage unit ever available for any database block

  3. the smallest logical storage unit for a database object

  4. all of the above

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

In Oracle database architecture, a data block is the smallest logical storage unit - typically 8KB or 16KB. All database data is stored in blocks, which are grouped into extents. Deleted records remain in their blocks until the space is reused.

Multiple choice
  1. The rollback tablespace extends.

  2. Data has not been committed to the database.

  3. Data is written into the log buffer faster than LGWR can write it out.

  4. A transaction has an exclusive lock on a row.

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

Session waits occur when processes must wait for resources. Log buffer waits happen when DML generates redo faster than LGWR (Log Writer) can flush it to disk. When the buffer fills, sessions must wait for space to become available. Rollback extension, uncommitted data, or row locks don't directly cause log buffer waits.

Multiple choice
  1. Host naming

  2. Local naming

  3. Centralized naming

  4. None .

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

Local naming method stores connection descriptors in TNSNAMES.ORA on the client, mapping net service names to connect descriptors. Host naming uses DNS, centralized naming uses Oracle Names or OID. Local naming is the traditional TNSNAMES.ORA approach.

Multiple choice
  1. To access the HR user account, the account should be unlocked first.

  2. All accounts created by the Database Creation Assistant are locked.

  3. All accounts created by the Database Creation Assistant initially have expired passwords.

  4. The SYS and SYSTEM accounts use the same default password as in previous Oracle versions.

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

To access the HR user account, the account should be unlocked first.