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. Database Engine Tuning Advisor

  2. SQL Server Configuration Manager

  3. Database Maintenance Plan Wizard

  4. Database Maintenance design surface

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

The Database Maintenance Plan Wizard is designed specifically for junior DBAs to create backup strategies, maintenance tasks, and other database management plans through a guided interface. The Database Engine Tuning Advisor is for query optimization, Configuration Manager manages services, and the design surface is for advanced manual configuration.

Multiple choice technology databases
  1. DBCC CHECKDB ('SalesDB', REPAIR_ALLOW_DATA_LOSS)

  2. DBCC CHECKDB ('SalesDB', REPAIR_REBUILD)

  3. DBCC CHECKDB ('SalesDB') WITH PHYSICAL_ONLY

  4. DBCC CHECKDB ('SalesDB') WITH DATA_PURITY

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

DBCC CHECKDB WITH PHYSICAL_ONLY performs a streamlined check of page headers, record structure, and allocation pages - skipping expensive logical consistency checks. This reduces runtime significantly for large databases while catching corruptions like torn pages. The REPAIR options should never be run as part of routine maintenance, and DATA_PURITY adds checks that increase runtime.

Multiple choice technology databases
  1. Transactional replication

  2. Peer-to-peer replication

  3. Merge replication

  4. Snapshot replication

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

Snapshot replication copies the entire set of data at a specific moment in time. Since the entire publication is not very large, the branch offices only need a daily update at 5 a.m., and transaction-by-transaction synchronization is not required, Snapshot replication is the most appropriate and simplest strategy.

Multiple choice technology databases
  1. Read Committed

  2. Read Uncommitted

  3. Repeatable Read

  4. Serializable

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

Read Uncommitted isolation level allows dirty reads - it can read data that has been modified but not committed by other transactions. Since the requirement is to avoid dirty reads, this is the isolation level to avoid. Read Committed, Repeatable Read, and Serializable all prevent dirty reads at varying levels of strictness.

Multiple choice technology databases
  1. Use the sys.dm_exec_requests dynamic management view.

  2. Use the sys.dm_exec_sessions dynamic management view

  3. Use the sys.dm_exec_query_stats dynamic management view

  4. Use the sys.dm_exec_query_optimizer_info dynamic management view

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

The sys.dm_exec_query_stats DMV returns performance statistics for cached query plans, including columns like sql_handle, plan_handle, and execution_count that track recompilation events. The requests and sessions DMVs track current activity, while query_optimizer_info contains optimizer statistics but not per-query recompilation counts.

Multiple choice technology databases
  1. System tablespace

  2. Users tablespace

  3. Default tablespace for the user

  4. Default tablespace for system

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

When a user creates an object (table, index, etc.) without specifying a TABLESPACE clause, Oracle stores the segment in that user's default tablespace, as defined when the user was created or altered. The system tablespace is for data dictionary objects, and there is no concept of a 'default tablespace for system' in this context.

Multiple choice technology databases
  1. PSBLIB

  2. DBDLIB

  3. ACBLIB

  4. USERLIB

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

In IMS DLI environments, USERLIB is the library type used for dynamically allocating database clusters. PSBLIB is for partitioned datasets, DBDLIB contains database descriptions, and ACBLIB holds access control blocks - none of these are used for dynamic cluster allocation.

Multiple choice technology databases
  1. The number of CPUs on the server

  2. The degree of parallelism on the tables

  3. The use of bitmap indexes

  4. The quality of the SQL optimization

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

SQL optimization quality is the most critical factor for statement performance because poorly written SQL cannot be fixed by hardware or infrastructure. While CPUs (A), parallelism (B), and bitmap indexes (C) can help, they cannot compensate for fundamentally inefficient query logic.

Multiple choice technology databases
  1. Removal of data redundancy

  2. The introduction of data redundancy

  3. The introduction of non-first normal form relations

  4. The introduction of SQL*Plus

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

Introducing data redundancy (denormalization) is a key design feature used to optimize SQL performance in read-heavy applications. By replicating data, it reduces the need for expensive table joins. Although normal forms remove redundancy to protect data integrity, they can degrade query performance due to join overhead.

Multiple choice technology databases
  1. They indicate an optimized execution plan.

  2. They may be able to be tuned to use an index

  3. The full-table scan should be normalized from the database design

  4. A full-table scan is always sub-optimal.

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

To answer this question, the user needs to understand the basics of SQL tuning and database optimization.

The correct answer is:

B. They may be able to be tuned to use an index

Explanation:

A full-table scan is a process in which the database engine reads all the rows of a table to find the relevant data. This can be a time-consuming process, especially for large tables. Full-table scans are not always sub-optimal, but they can be inefficient if the table is not properly indexed. When a table is not indexed correctly, the database engine must read every row of the table to find the relevant data, even if only a small subset of the data is needed.

Therefore, searching for full-table scans is critical to SQL tuning because it allows a database administrator to identify tables that are not properly indexed. Once identified, the administrator can then tune the full-table scan to use an index, which can improve performance and reduce the time it takes to retrieve the data.

Option A is incorrect because a full-table scan does not indicate an optimized execution plan. It may be the only option available, but it is not necessarily optimized.

Option C is incorrect because a full-table scan is not something that should be normalized from the database design. It is a method of retrieving data from a table and can be optimized through proper indexing.

Option D is incorrect because a full-table scan is not always sub-optimal. It depends on the size of the table and how well it is indexed.

Multiple choice technology databases
  1. Database Maintenance Plan Wizard

  2. Database Engine Tuning Advisor

  3. SQL Server Configuration Manager

  4. Database Maintenance design surface

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

The Database Maintenance Plan Wizard is a user-friendly tool built into SQL Server Management Studio designed to guide DBAs through setting up routine maintenance tasks, including backups. The Engine Tuning Advisor optimizes index performance, and Configuration Manager manages network protocols.

Multiple choice technology databases
  1. DBCC CHECKDB ('SalesDB', REPAIR_ALLOW_DATA_LOSS)

  2. DBCC CHECKDB ('SalesDB', REPAIR_REBUILD)

  3. DBCC CHECKDB ('SalesDB') WITH PHYSICAL_ONLY

  4. DBCC CHECKDB ('SalesDB') WITH DATA_PURITY

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

Using DBCC CHECKDB with the WITH PHYSICAL_ONLY option reduces check time on large databases by limiting checks to physical page structure, page integrity, and allocation. This skips resource-intensive logical checks. Options like REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD are used to fix errors.

Multiple choice technology databases
  1. Transactional replication

  2. Peer-to-peer replication

  3. Merge replication

  4. Snapshot replication

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

Snapshot replication is ideal for this scenario because it delivers a complete data copy daily at 5am, matching the reporting requirement. Transactional replication is continuous, peer-to-peer is for multi-master scenarios, and merge replication handles conflict resolution - all unnecessary for this daily batch refresh pattern.

Multiple choice technology databases
  1. Read Committed

  2. Read Uncommitted

  3. Repeatable Read

  4. Serializable

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

The requirement is to avoid dirty reads, which Read Uncommitted explicitly allows (it reads uncommitted data). Read Committed, Repeatable Read, and Serializable all prevent dirty reads. Since dirty reads must be avoided, Read Uncommitted is the level to avoid.