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. 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. NOMOUNT allows instance initialization and control file access without opening the data files. OPEN state would require a valid control file already, MOUNT needs the control file to be accessible, and IDLE is not a valid Oracle state. The NOMOUNT state enables control file restoration before mounting.

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

Rebuilding an index online (REBUILD ONLINE) allows users to perform DML operations on the underlying table during the rebuild process, ensuring zero downtime. Dropping and recreating the index or rebuilding it offline restricts user access, which violates the requirement of continuous 24/7 availability. Freelists do not automatically resolve index fragmentation.

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 set to AUTO and you omit the UNDO tablespace clause in CREATE DATABASE, Oracle automatically creates a default undo tablespace named SYS_UNDOTBS. This is the expected behavior in automatic undo management mode. Options A and D are incorrect because the database creation succeeds and Oracle does create an undo tablespace automatically. Option B is wrong because undo segments are not placed in the SYSTEM tablespace when using automatic undo management.

Multiple choice technology databases
  1. Only the EMPLOYEES table.

  2. Only the EMPLOYEES table and its corresponding primary key index.

  3. The EMPLOYEES table and partition P1.

  4. The EMPLOYEES table, IPK_EMP index, and the SALES table.

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

Specifying tablespace-mode export (tablespace=SAMPLE) exports all tables located in that tablespace (EMPLOYEES), their indexes regardless of tablespace (IPK_EMP), and any table partitions located in that tablespace (SALES partition P1).

Multiple choice technology databases
  1. User the DROP DATAFILE command.

  2. Use the DROP TABLESPACE command.

  3. Ensure that all database files are Oracle Managed Files(OMF) before using the DROP TABLESPACE command.

  4. Ensure that the DB_FILE_CREATE_DEST initialization parameter is set before using the DROP TABLESPACE command.

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

The DROP TABLESPACE command drops the tablespace. In modern Oracle versions, adding the 'INCLUDING CONTENTS AND DATAFILES' clause deletes the datafiles, but the basic command to initiate this is DROP TABLESPACE.

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 statement with INCLUDING CONTENTS AND DATAFILES removes the tablespace, all its contents (segments/data), and the associated data files from the operating system. This is the complete cleanup option. Option B and C incorrectly suggest Oracle-Managed Files (OMF) is required, but this clause works for both OMF and non-OMF data files. Option D is wrong because the AND DATAFILES clause removes all data files regardless of naming convention.

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 client machine loses power during a transaction, Oracle's PMON (Process Monitor) background process automatically detects the interrupted session and rolls back the uncommitted changes. This ensures database consistency and atomicity. Option B is incorrect because you don't need to restore - the transaction was never committed. Option C is unnecessary as PMON handles cleanup. Option D is overly complex when automatic rollback occurs.

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 and you need to restore it to a different location, use RMAN's SET NEWNAME command to tell the control file the new location, then RESTORE and RECOVER. This is necessary because the original disk (DISK 3) is unavailable. Options A and B are incorrect because you don't use operating system commands to move data files in RMAN recovery. Option C is wrong because RMAN doesn't automatically select a new disk based on utilization - you must explicitly specify it with SET NEWNAME.

Multiple choice technology databases
  1. All of the data files must be from a backup taken prior to the point in time to which you want to recover.

  2. Only the data files belonging from the SYSTEM tablespace must be from a backup taken prior to the point in time to which you want to recover.

  3. Only the data files that need recovery must be from a backup taken prior to the point in time which you want to recover.

  4. Only the data files belonging to the SYSTEM tablespace and the data files that need recovery must be from a backup taken prior to the point in time to which you want to recover.

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

For an incomplete database recovery, all restored data files must be from backups taken prior to the target point-in-time to allow the recovery process to roll forward to the desired state.

Multiple choice technology databases
  1. Set the LOG_ARCHIVE_START parameter to TRUE in the initialization parameter file.

  2. Automatic archive is the default when ARCHIVELOG mode is set. No further actions are required.

  3. Set the LOG_ARCHIVE_MAX_PROCESSES parameter to n (where n is the number of Archiver process) in the initialization parameter file.

  4. Immediately after setting the database in ARCHIVELOG mode, in SQL*Plus select automatic archiving using the syntax : ALTER DATABASE SET LOG_ARCHIVE_START=TRUE

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

The LOG_ARCHIVE_START parameter controls automatic archiving at instance startup. Setting it to TRUE in the initialization parameter file enables automatic archiving when the instance starts. Option B is incorrect because automatic archiving is not the default - you must explicitly enable it. Option C sets the number of archiver processes but doesn't enable automatic archiving. Option D is incorrect because LOG_ARCHIVE_START is an initialization parameter, not set dynamically with ALTER DATABASE.

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

ALTER DATABASE BACKUP CONTROLFILE TO TRACE generates a trace file in the user_dump_dest directory containing SQL commands to recreate the control file. This is useful for recovery or documentation purposes. Option A is incorrect because it's not a direct text copy of the control file - it's SQL to recreate it. Option B is wrong because it's not a binary copy. Option C is incorrect because it recreates the control file, not the entire database.

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

An RMAN channel represents a stream of data to a device type and corresponds to one server session on the target database instance. Other options are incorrect because target databases do not require individual catalogs, and scripts cannot be stored in the control file.

Multiple choice technology databases
  1. ABORT

  2. NORMAL

  3. IMMEDIATE

  4. TRANSACTIONAL

Reveal answer Fill a bubble to check yourself
B,C,D Correct answer
Explanation

For a consistent closed database backup using OS commands, use NORMAL, IMMEDIATE, or TRANSACTIONAL shutdown options. These ensure all transactions are complete and the database is cleanly closed. NORMAL waits for all users to disconnect. IMMEDIATE rolls back active transactions and disconnects users. TRANSACTIONAL waits for active transactions to finish. ABORT is unsafe for backup as it doesn't cleanly close the database - it's equivalent to pulling the plug.

Multiple choice technology databases
  1. SYNC or ASYNC to identify the network transmission mode.

  2. LGWR or ARCH to identify the primary database process responsible for sending redo information to the standby.

  3. AFFIRM or NOAFFIRM to control whether log archiving disk write operations are to be performed synchronously or asynchronously.

  4. PROTECTED or UNPROTECTED to control the degree of divergence and data loss at the standby database.

Reveal answer Fill a bubble to check yourself
A,B,C Correct answer
Explanation

The LOG_ARCHIVE_DEST_n parameters use SYNC/ASYNC for network transmission mode (synchronous or asynchronous), LGWR/ARCH to specify which primary process sends redo (LGWR for real-time, ARCH for archiver), and AFFIRM/NOAFFIRM to control whether disk writes are synchronous (AFFIRM) or asynchronous (NOAFFIRM). These three attributes directly control data availability and protection modes in Data Guard. Option D mentions PROTECTED/UNPROTECTED which are high-level availability modes, not individual parameters.