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. 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, the database must be shut down cleanly ensuring all data is written to disk. NORMAL waits for users to disconnect, IMMEDIATE/TRANSACTIONAL prevent new connections and rollback active transactions. ABORT is inconsistent - it doesn't roll back transactions, leaving database in an unrecoverable state for backup purposes.

Multiple choice technology databases
  1. CREATE USER

  2. CREATE SESSION

  3. CREATE ANY TABLE

  4. IMP_FULL_DATABASE

  5. EXP_FULL_DATABASE

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

To export tables owned by another user: CREATE SESSION is required to connect to the database, and EXP_FULL_DATABASE privilege grants authority to export objects owned by any user. CREATE USER is for creating users (not exporting), CREATE ANY TABLE is for DDL (not export), IMP_FULL_DATABASE is for import (not export).

Multiple choice technology databases
  1. Oracle Managed Files used for this instance.

  2. The USER_DATA tablespace in managed using FET$/UET$ tables.
  3. The COMPATIBLE intialization paramter must be 9.0.0 or higer.

  4. Space within segments is the USER_DATA tablespace is managed with freelists.

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

Locally managed tablespaces with automatic segment space management require: Oracle Managed Files (OMF) for automatic file handling, and COMPATIBLE parameter set to 9.0.0 or higher for LMT + ASSM support. FET$/UET$ are used in DICTIONARY-managed tablespaces (not locally managed), and freelists are manual segment management (not automatic).

Multiple choice technology databases
  1. The control file can grow in size.

  2. The control file can store RMAN scripts.

  3. CONTROL_FILE_RECORD_KEEP_TIME determine retention time for RMAN records.

  4. The RMAN catalog can exist solely in the control file of the target database.

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

The CONTROL_FILE_RECORD_KEEP_TIME parameter indeed determines how long RMAN records are retained in the control file before they can be overwritten. RMAN can use the control file as its catalog repository instead of a separate recovery catalog database, though this has limitations like shorter retention and no stored scripts. The control file has a fixed size at creation and does not dynamically grow, and RMAN scripts are stored in the recovery catalog, not the control file.

Multiple choice technology databases
  1. Restore the data file and perform incomplete recovery.

  2. Restore the data file and perform point-in-time recover.

  3. Drop the tablespace and lose all data in the tablespace.

  4. Restore the database and lose all data since the last backup.

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

In NOARCHIVELOG mode, database recovery to a specific point in time or incomplete recovery is impossible because redo logs are not archived. Thus, if a data file is lost, the database must be restored from a cold backup (losing all changes since), or the affected tablespace must be dropped, losing all its data.

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

LOG_ARCHIVE_DEST_n parameters control Data Guard availability through three key attributes: SYNC/ASYNC defines network transmission mode (synchronous for zero data loss, asynchronous for better performance), LGWR/ARCH specifies which primary process sends redo (LGWR for real-time, ARCH for archived logs), and AFFIRM/NOAFFIRM controls whether disk writes are synchronous (AFFIRM) or asynchronous (NOAFFIRM) at the standby. PROTECTED/UNPROTECTED is not a valid parameter - data protection modes are set at the database level, not per destination.

Multiple choice technology mainframe
  1. DATA CLASS

  2. MANAGEMENT CLASS

  3. STORAGE CLASS

  4. STORAGE GROUP

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

In SMS (Storage Management Subsystem), the STORAGE CLASS is the essential class that must be assigned to create a SMS-managed dataset. The storage class defines the service class and performance characteristics (like response time) that the dataset requires. Other classes like Management Class, Data Class, and Storage Group are optional but Storage Class is mandatory for SMS management.

Multiple choice technology mainframe
  1. Data Class

  2. Management Class

  3. Storage Group

  4. Storage Class

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

Storage Class is the SMS class that specifies dataset performance and availability characteristics. It defines attributes like response time, service class, and availability requirements that the system must meet when allocating and accessing the dataset. Management Class handles backup and migration, Data Class deals with multi-volume attributes, and Storage Group specifies volume names.

Multiple choice technology mainframe
  1. Data class

  2. Management Class

  3. Storage Group

  4. Storage Class

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

Data Class is the SMS class that determines multi-volume properties of a dataset, including whether the dataset can span multiple volumes and how it's allocated across them. This is distinct from Storage Class (performance/availability), Management Class (backup/migration), and Storage Group (volume selection). Multi-volume allocation rules are specifically governed by Data Class attributes.

Multiple choice technology mainframe
  1. Data Class

  2. Storage Class

  3. Management Class

  4. Storage Group

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

Management Class is the SMS class used to specify dataset backup and migration criteria. It defines when and how datasets should be backed up, when they should be migrated to secondary storage (like tape), and when they should be expired. This is distinct from Data Class (multi-volume properties), Storage Class (performance), and Storage Group (volume selection). Management Class handles all data lifecycle and retention policies.

Multiple choice technology databases
  1. Partitioning Index

  2. Clustering Index

  3. Unique Index

  4. Non-partitioning Secondary Index

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

A clustering index determines the physical order in which data rows are stored on disk. When a clustering index is defined, DB2 attempts to maintain the data sequence matching the index key order. Other index types (unique, partitioning, secondary) only affect logical access paths.

Multiple choice technology databases
  1. Tablespace

  2. Storage group

  3. Index

  4. View

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

The statement CREATE STOGROUP TEST VOLUMES(ABCD1,ABCD2,ABCD3) VCAT dsn1 creates a Storage Group (STOGROUP) in DB2, mapping logical volumes to a specific catalog identifier. The syntax defines volumes and VCAT, which are not used directly in creating tablespaces, indexes, or views.

Multiple choice technology databases
  1. Recover

  2. Repair

  3. Rebuild

  4. Runstats

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

RUNSTATS is recommended after REORG because REORG changes the physical data distribution, making existing statistics obsolete. RUNSTATS collects fresh statistics about table data distribution, enabling the optimizer to choose efficient access paths for subsequent queries.

Multiple choice technology databases
  1. DB2 Directory

  2. DB2 Catalog

  3. Optimizer

  4. Data Manager

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

The DB2 Directory contains Database Descriptors (DBDs), which are internal control structures describing database physical structures. The DB2 Catalog stores metadata about database objects, the Optimizer uses statistics for access path selection, and the Data Manager manages actual data access.