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. 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.

Multiple choice
  1. Control file

  2. Data file

  3. OnLine ReDo file

  4. Offline ReDo file

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

Data files in Oracle contain the actual user data and system data. Control files contain metadata about the database structure. Redo log files (online and offline) contain transaction records for recovery, not the actual data.

Multiple choice
  1. An improved version of multithreaded server configuration

  2. A connection pooling configuration where several clients are connected to the same server process

  3. Two more database servers, which share data by means of database links; the client software is unaware to which server it is connected

  4. A configuration of Real Application Cluster where the client connection is routed to the least busy instance

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

Oracle Shared Server is the evolution of the multithreaded server architecture, improving resource utilization through connection pooling and dispatcher processes. Options B and C describe different concepts - B describes basic connection pooling without mentioning dispatcher processes, while C describes Real Application Clusters (RAC). Option D refers to RAC load balancing, not Shared Server.

Multiple choice
  1. True

  2. False

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

PMON (Process Monitor) performs process monitoring and recovery, but it does NOT perform ALL system monitoring functions. That statement is an overstatement - other background processes like SMON (System Monitor), CKPT (Checkpoint), and archiving processes handle different aspects of system monitoring. PMON specifically monitors failed processes, cleans up their resources, and rolls back their transactions.

Multiple choice
  1. The reading of data from external datafiles into external tables REMAP_SCHEMA=source_schema:targer_schema

  2. The writing of data from Oracle tables to external datafiles REMAP_TABLESPACE=source_tablespace:target_tablespace

  3. The writing of data from external datafiles into external tables FROMUSER TOUSER

  4. The reading of data from Oracle tables into external datafilesREMAP_TABLESPACE=source_tablespace:source_tablespace

Reveal answer Fill a bubble to check yourself
A Correct answer