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 technology databases
  1. A checkpoint defines the highest system change number (SCN)

  2. All redo entries higher or at the SCN are known to be written to the data files.

  3. Only the redo records containing SCNs higher then the checkpoint need to be applied during recovery.

  4. The LOG_CHECKPOINT_INTERVAL initialization paramter specifies the amount of time beteen incremental checkpoints.

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

During recovery, Oracle only needs to apply redo records with SCNs higher than the checkpoint SCN because all changes up to and including the checkpoint SCN are already written to data files. This is the fundamental purpose of checkpoints - they reduce recovery time by establishing a point of consistency. Option A is incomplete - a checkpoint defines the highest SCN that's been written to disk. Option B is incorrect - redo entries at or below the checkpoint are already on disk. Option D confuses LOG_CHECKPOINT_INTERVAL with time-based intervals.

Multiple choice technology databases
  1. Do nothing, the PMON process handles everything.

  2. Shut down the database and restore all the tables the user was updating.

  3. Log in as DBA, clean up the partial updates in those tables, and do another manual backup.

  4. Use LogMiner to find out which records are changed based on the user’s ID, then roll back all those changes.

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

When a user session terminates abnormally (power loss), Oracle automatically rolls back the uncommitted transaction when the database next starts and the rollback segments are accessed. PMON (Process Monitor) handles cleanup of failed processes. The DBA doesn't need to manually restore tables (option B), clean up partial updates (option C), or use LogMiner (option D) - Oracle's transaction integrity guarantees automatic rollback.

Multiple choice technology databases
  1. A text copy of the control file.

  2. A binary copy of the control file.

  3. A file containing a SQL statement which will re-create the database.

  4. A file containing a SQL statement which will re-create the control file.

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

The statement ALTER DATABASE BACKUP CONTROLFILE TO TRACE generates a trace file in the user dump destination containing SQL commands to recreate the control file. This is useful for recovery when you've lost the control file but have the database files. The trace file contains CREATE CONTROLFILE syntax (option D), not the entire database creation (option C). It's text-based (not binary, option B) and contains SQL statements (not just a copy, option A).

Multiple choice technology databases
  1. Each target database requires its own recover catalog.

  2. RMAN scripts can be stored in the recovery catalog or the targer control file.

  3. A channel is a stream of data to a device type and corresponds to one server session.

  4. The RMAN executable interprets server session commands and establishes connections to the target database.

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

In RMAN, a channel represents a stream of data to a specific device type (like disk or tape) and corresponds to one server session. Channels are allocated to perform backup and recovery operations. Option A is incorrect - multiple target databases can share one recovery catalog. Option B is incorrect - RMAN scripts are stored in the recovery catalog, not the control file. Option D incorrectly describes the RMAN client; it's the channel that establishes server sessions.

Multiple choice technology databases
  1. The contents and data files belonging to the IND2 tablespace are dropped.

  2. The statement will only succeed if the IND2 tablespace was built using Oracle-Managed Files (OMF) data files.

  3. The statement will only succeed if the data files belonging to the IND2 tablespace are Oracle Managed Files (OMF) or of the database was created using OMF.

  4. The contents of the tablespace are dropped along with all its data files except those identical with Oracle-Managed Files (OMF) naming convention.

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

The DROP TABLESPACE ... INCLUDING CONTENTS AND DATAFILES command removes the tablespace contents and deletes all associated data files from the operating system. This works regardless of whether files are Oracle Managed Files or manually managed. Options B and C incorrectly state that OMF is required. Option D incorrectly suggests that OMF-named files are excluded - they are deleted along with all other files.

Multiple choice technology databases
  1. The data file needs to be restored by using operating system commands, because a data file movement must take place, and then the database can be recovered from RMAN.

  2. The data file needs to be restored by using operating system commands, since a data file movement must take place, and then the database must be recovered manually.

  3. From RMAN you can issue the commands RESTORE and RECOVER. RMAN automatically restores the data file on DISK 3 to another disk, based upon utilization statistics.

  4. From RMAN you can issue a SET NEWNAME command to update the data file location information in the control file, and then issue the RESTORE and RECOVER commands to recover the database.

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

When a data file is lost in NOARCHIVELOG mode, you can only restore to the point of the last backup. If you need to restore to a different disk location, use SET NEWNAME in RMAN to tell the control file the new location, then RESTORE and RECOVER. Options A and B incorrectly suggest OS commands for restore - RMAN handles this. Option C is incorrect - RMAN doesn't automatically relocate files based on utilization; you must specify the location.

Multiple choice technology databases
  1. Backups will never expire.

  2. It removes any retention policy.

  3. The DELETE OBSOLETE command will fail with an error.

  4. It sets the retention policy to the default of REDUNDANCY 1.

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

RMAN's CONFIGURE ... CLEAR command resets the configuration to its default value. For retention policy, the default configuration is REDUNDANCY 1. It does not remove retention policy entirely (which would be NONE) nor does it cause DELETE OBSOLETE to fail.

Multiple choice technology databases
  1. TNSLSNR

  2. LISTENER

  3. LOCAL_LISTENER

  4. DEFAULT_LSRN

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

When you start the listener with LSNRCTL> START without specifying a listener name, it starts the default listener named LISTENER. The output shows the listener starting but doesn't explicitly name it - you need to know the default. TNSLSNR (option A) is the listener executable name, not the listener instance name. LOCAL_LISTENER and DEFAULT_LSRN (options C and D) are not valid default names.

Multiple choice technology databases
  1. OPEN

  2. IDLE

  3. MOUNT

  4. NOMOUNT

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

When restoring a control file in NOARCHIVELOG mode using RMAN, the database must be in NOMOUNT state. The NOMOUNT state allows RMAN to access the control file without opening the database fully. You cannot restore control files in OPEN, IDLE, or MOUNT states because the database needs to read the control file during startup.

Multiple choice technology databases
  1. PMON

  2. SMON

  3. RECO

  4. ARCn

  5. CKPT

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

The System Monitor (SMON) process performs instance recovery at database startup when the database is reopened after an abnormal shutdown or failure. PMON cleans up failed user processes, and RECO resolves in-doubt distributed transactions.

Multiple choice technology databases
  1. Extent

  2. Segement

  3. Oracle block

  4. Operating system block

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

In a locally managed tablespace with UNIFORM SIZE specified, the extent size is set uniformly. The UNIFORM SIZE 1M clause means each extent allocated in this tablespace will be exactly 1 MB. This is different from segments (which are logical objects like tables or indexes), Oracle blocks (the smallest I/O unit), or operating system blocks (file system level).

Multiple choice technology databases
  1. The index need to be dropped, and then re-created.

  2. The resolution of index fragmentation depends on the type of index.

  3. The index can be rebuilt while users continue working on the table.

  4. The fragmented can be ignored because Oracle resolve index fragmentation by means of a freelist.

  5. The index can be rebuilt, but users will not have access to the index during this time.

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

An index can be rebuilt online using the ALTER INDEX ... REBUILD ONLINE statement. This allows concurrent DML operations on the underlying table during the rebuild, minimizing downtime and fragmentation. Other options incorrectly claim index unavailability or require drops.

Multiple choice technology databases
  1. The oracle server creates no undo tablespace.

  2. The oracle server creates an undo segment in the system tablespace.

  3. The oracle server cerates one undo tablespace with the name SYS_UNDOTBS.

  4. Database creation fails because you did not specify an undo tablespace on the create database statment.

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

When UNDO_MANAGEMENT is AUTO but no UNDO tablespace is specified in CREATE DATABASE, Oracle automatically creates an undo tablespace named SYS_UNDOTBS. This is default behavior to ensure automatic undo management works properly. Oracle does not create undo segments in the SYSTEM tablespace, nor does database creation fail.

Multiple choice technology databases
  1. V$UNDOSTAT
  2. V$TRANSACTION
  3. V$ROLLSTAT
  4. DBA_UNDO_EXTENTS

  5. DBA_ROLLBACK_SEGS

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

V$UNDOSTAT provides statistics on undo tablespace usage including undo blocks written per second. This dynamic performance view contains one row for each 10-minute interval and shows various undo metrics including transaction activity and space consumption. V$TRANSACTION shows active transactions, V$ROLLSTAT shows rollback segment statistics, and DBA_UNDO_EXTENTS shows undo extent information but not the per-second write rate.

Multiple choice technology databases
  1. Using SQL commands.

  2. Using SQL*Plus Commands.

  3. Using operating system commands.

  4. Using Recover Manager commands.

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

In a user-managed backup strategy, the database administrator uses operating system commands (like copy, cp, or tar) to copy the physical database files to a backup location after placing the tablespace in backup mode. SQL commands only manage database state.