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
-
ABORT
-
NORMAL
-
IMMEDIATE
-
TRANSACTIONAL
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.
-
CREATE USER
-
CREATE SESSION
-
CREATE ANY TABLE
-
IMP_FULL_DATABASE
-
EXP_FULL_DATABASE
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).
-
Oracle Managed Files used for this instance.
-
The USER_DATA tablespace in managed using FET$/UET$ tables.
-
The COMPATIBLE intialization paramter must be 9.0.0 or higer.
-
Space within segments is the USER_DATA tablespace is managed with freelists.
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).
-
The control file can grow in size.
-
The control file can store RMAN scripts.
-
CONTROL_FILE_RECORD_KEEP_TIME determine retention time for RMAN records.
-
The RMAN catalog can exist solely in the control file of the target database.
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.
-
Restore the data file and perform incomplete recovery.
-
Restore the data file and perform point-in-time recover.
-
Drop the tablespace and lose all data in the tablespace.
-
Restore the database and lose all data since the last backup.
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.
-
SYNC or ASYNC to identify the network transmission mode.
-
LGWR or ARCH to identify the primary database process responsible for sending redo information to the standby.
-
AFFIRM or NOAFFIRM to control whether log archiving disk write operations are to be performed synchronously or asynchronously.
-
PROTECTED or UNPROTECTED to control the degree of divergence and data loss at the standby database.
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.
-
DATA CLASS
-
MANAGEMENT CLASS
-
STORAGE CLASS
-
STORAGE GROUP
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.
-
Data Class
-
Management Class
-
Storage Group
-
Storage Class
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.
-
Data class
-
Management Class
-
Storage Group
-
Storage Class
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.
-
Data Class
-
Storage Class
-
Management Class
-
Storage Group
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.
C
Correct answer
Explanation
XML was introduced as a native data type in DB2 9, allowing storage and querying of XML documents using XQuery. BLOB and GRAPHIC existed in earlier versions, while ROWID is a pseudo-column, not a data type.
-
Partitioning Index
-
Clustering Index
-
Unique Index
-
Non-partitioning Secondary Index
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.
-
Tablespace
-
Storage group
-
Index
-
View
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.
-
Recover
-
Repair
-
Rebuild
-
Runstats
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.
-
DB2 Directory
-
DB2 Catalog
-
Optimizer
-
Data Manager
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.