CompTIA DataSys+ DS0-001 Practice Test Questions and Exam Dumps Part6 Q101-120

View Full CompTIA DataSys+ DS0-001 Exam Dumps and Practice Test Dumps

 

Question 101.

A database administrator wants to reduce the risk of unauthorized schema changes in production. Which control is MOST appropriate?

  1. Grant DDL permissions only to approved administrative roles
  2. Allow all developers to modify production directly
  3. Disable auditing
  4. Use shared administrator accounts

Correct Answer: 1. Grant DDL permissions only to approved administrative roles

Explanation:

Schema-changing operations such as CREATE, ALTER, and DROP should be limited to authorized identities. Restricting DDL permissions supports least privilege and reduces the likelihood of accidental or unauthorized structural changes. Changes should also follow change-management procedures, including review, testing, approval, and validation. Shared administrative accounts weaken accountability and should generally be avoided.

Question 102.

A query needs to sort employees from highest salary to lowest salary. Which SQL clause is MOST appropriate?

  1. GROUP BY Salary
  2. ORDER BY Salary DESC
  3. WHERE Salary DESC
  4. HAVING Salary

Correct Answer: 2. ORDER BY Salary DESC

Explanation:

ORDER BY controls the order of rows in a query result. DESC specifies descending order, so higher salary values appear first. ASC would sort from lowest to highest. WHERE filters rows, GROUP BY organizes rows for aggregation, and HAVING filters grouped results. ORDER BY is therefore the correct clause for sorting query output.

Question 103.

Which SQL operator is MOST appropriate for finding rows where a column contains one of several specified values?

  1. BETWEEN
  2. LIKE
  3. IN
  4. EXISTS

Correct Answer: 3. IN

Explanation:

The IN operator checks whether a value matches any value in a specified list or subquery result. For example, a query can return employees whose DepartmentID is in a set of selected departments. BETWEEN is typically used for ranges, LIKE for pattern matching, and EXISTS for checking whether a subquery returns at least one row.

Question 104.

A database administrator needs to find records where a column does not contain any value. Which SQL condition is MOST appropriate?

  1. = NULL
  2. EMPTY
  3. ZERO
  4. IS NULL**

Correct Answer: 4. IS NULL

Explanation:

NULL represents an unknown or absent value and requires special SQL handling. The correct comparison is IS NULL or IS NOT NULL rather than using ordinary equality. Using = NULL generally does not produce the expected result because NULL is not treated like a normal scalar value. Understanding NULL semantics is important for accurate filtering and joins.

Question 105.

A database table contains a column with values that must always be present. Which constraint BEST enforces this requirement?

  1. NOT NULL
  2. UNIQUE
  3. FOREIGN KEY
  4. DEFAULT

Correct Answer: 1. NOT NULL

Explanation:

A NOT NULL constraint prevents a column from containing NULL values. It is appropriate when every row must provide a value for that field. UNIQUE prevents duplicate values, FOREIGN KEY enforces a relationship to another table, and DEFAULT supplies a value when one is not explicitly provided but does not necessarily prohibit NULL in every database platform.

Question 106.

Which constraint can automatically supply a predefined value when an INSERT statement omits a column?

  1. CHECK
  2. DEFAULT
  3. FOREIGN KEY
  4. UNIQUE

Correct Answer: 2. DEFAULT

Explanation:

A DEFAULT constraint provides a predefined value when an INSERT statement does not supply one for the column. Examples include default status values, timestamps, or flags. It improves consistency and reduces the need for applications to specify common values repeatedly. It does not necessarily replace explicit validation or NOT NULL requirements.

Question 107.

A database administrator wants to find values beginning with the letters “Data”. Which SQL condition is MOST appropriate?

  1. WHERE Name = ‘Data%’
  2. WHERE Name IN ‘Data’
  3. WHERE Name LIKE ‘Data%’
  4. WHERE Name BETWEEN ‘Data’

Correct Answer: 3. WHERE Name LIKE ‘Data%’

Explanation:

LIKE performs pattern matching, and the percent sign typically represents any sequence of characters. Therefore, ‘Data%’ matches values that begin with “Data” followed by zero or more characters. Exact equality would match only the literal string, while IN and BETWEEN are intended for different comparison patterns.

Question 108.

Which SQL set operator combines the results of two compatible SELECT statements while removing duplicate rows?

  1. JOIN
  2. MERGE
  3. UNION ALL
  4. UNION**

Correct Answer: 4. UNION

Explanation:

UNION combines compatible query results and removes duplicate rows from the combined output. UNION ALL also combines result sets but retains duplicates, which can make it faster when duplicate elimination is unnecessary. The SELECT statements generally need compatible column counts and data types for the corresponding output positions.

Question 109.

A database administrator wants to combine two query results while retaining duplicate rows. Which operator is MOST appropriate?

  1. UNION ALL
  2. UNION
  3. DISTINCT
  4. INNER JOIN

Correct Answer: 1. UNION ALL

Explanation:

UNION ALL concatenates compatible result sets without removing duplicates. This is appropriate when duplicate rows are meaningful or when avoiding duplicate-elimination overhead is desirable. UNION performs duplicate elimination, while DISTINCT operates on one query result. JOIN combines columns based on related rows rather than stacking compatible result sets.

Question 110.

What is the PRIMARY purpose of a composite key?

  1. Encrypt a database row
  2. Identify a row using a combination of two or more columns
  3. Replicate data across servers
  4. Compress table storage

Correct Answer: 2. Identify a row using a combination of two or more columns

Explanation:

A composite key consists of multiple columns that together uniquely identify a record. It is common in associative tables such as order-line or enrollment tables where no single business column uniquely identifies each row. Composite keys can also appear as foreign keys when referencing another table with a multi-column key.

Question 111.

Which type of key is an artificial identifier created primarily to uniquely identify rows rather than represent a business value?

  1. Foreign key
  2. Natural key
  3. Surrogate key
  4. Composite key

Correct Answer: 3. Surrogate key

Explanation:

A surrogate key is an artificial identifier, often an auto-generated integer or UUID, used to uniquely identify a row. It has little or no direct business meaning. Surrogate keys can simplify relationships when natural keys are large, changeable, or composed of multiple attributes. Business uniqueness may still need separate constraints.

Question 112.

A database administrator wants to verify that an index is actually improving a frequently executed query. What should be done?

  1. Assume the index helps because it exists
  2. Add several more indexes first
  3. Disable performance monitoring
  4. Compare execution plans and performance metrics before and after the change**

Correct Answer: 4. Compare execution plans and performance metrics before and after the change

Explanation:

Database tuning should be evidence-based. Comparing query plans, logical reads, duration, CPU usage, and other relevant metrics before and after adding an index shows whether the change actually improved the workload. An index that helps one query may increase write cost or provide little benefit. Validation helps avoid unnecessary or harmful indexing.

Question 113.

Which database feature can improve query performance by storing the result of a query physically for later use, depending on the platform?

  1. Materialized view
  2. Foreign key
  3. Transaction rollback
  4. User role

Correct Answer: 1. Materialized view

Explanation:

A materialized view stores the result of a query physically and can improve performance for expensive reporting or aggregation workloads. Unlike a standard logical view, it must be refreshed to reflect changes in underlying data. The refresh strategy depends on freshness requirements, workload, and platform capabilities. Materialized views trade storage and maintenance overhead for faster reads.

Question 114.

A database administrator is troubleshooting blocking. Which information is MOST useful?

  1. Backup compression ratio
  2. Blocking and blocked session details, lock types, and active transactions
  3. Column descriptions only
  4. Number of stored procedures

Correct Answer: 2. Blocking and blocked session details, lock types, and active transactions

Explanation:

Blocking analysis requires identifying which sessions hold locks, which sessions are waiting, the locked resources, and the transactions involved. This information can reveal long-running transactions, inefficient queries, or application behavior responsible for contention. Killing sessions without understanding the cause may provide temporary relief but can interrupt valid work or allow the problem to recur.

Question 115.

Which situation is MOST likely to cause excessive blocking?

  1. Short read-only queries using appropriate indexes
  2. Regular backup verification
  3. Long-running transactions holding locks for extended periods
  4. Strong password policies

Correct Answer: 3. Long-running transactions holding locks for extended periods

Explanation:

Transactions that remain open for long periods can retain locks and prevent other sessions from accessing or modifying the same resources. Large updates, user interaction inside transactions, poor query plans, and application defects can all extend lock duration. Keeping transactions concise and ensuring efficient data access can reduce blocking and improve concurrency.

Question 116.

A database administrator wants to know whether CPU saturation is the primary bottleneck on a server. Which approach is BEST?

  1. Review only database size
  2. Look only at free disk space
  3. Rebuild every index
  4. Correlate CPU utilization with query workload, waits, and response time**

Correct Answer: 4. Correlate CPU utilization with query workload, waits, and response time

Explanation:

High CPU usage alone does not prove CPU is the true bottleneck. Administrators should correlate CPU utilization with query execution, wait statistics, response times, and other resource metrics. For example, a workload may be waiting primarily on storage while CPU appears periodically high. Correlation helps identify the actual limiting resource before tuning.

Question 117.

Which database maintenance practice BEST supports proactive detection of corruption?

  1. Run supported database integrity checks on an appropriate schedule
  2. Disable backups
  3. Delete transaction logs regularly
  4. Grant users administrator rights

Correct Answer: 1. Run supported database integrity checks on an appropriate schedule

Explanation:

Database integrity checks can detect structural corruption or consistency problems before they become severe. The exact commands and frequency depend on the database platform, size, workload, and recovery strategy. Detected issues should be investigated promptly, and reliable backups should be available. Integrity checks complement, rather than replace, backup and recovery testing.

Question 118.

A production database must be patched, but the patch could affect application compatibility. What should happen FIRST?

  1. Install the patch directly in production
  2. Test the patch with representative application workloads in a non-production environment
  3. Disable monitoring during installation
  4. Remove existing backups

Correct Answer: 2. Test the patch with representative application workloads in a non-production environment

Explanation:

Testing a patch in a representative lower environment helps reveal compatibility, performance, configuration, and driver issues before production impact occurs. The team should also review release notes, confirm backups, prepare rollback procedures, and follow change-management controls. Security patches should be applied promptly, but controlled validation reduces operational risk.

Question 119.

A database administrator notices that backup files are accessible to many ordinary users. What is the MAIN security concern?

  1. Backups will always be slow
  2. Indexes may fragment
  3. Sensitive database contents may be exposed outside normal access controls
  4. Queries will return duplicates

Correct Answer: 3. Sensitive database contents may be exposed outside normal access controls

Explanation:

Backup files can contain the same sensitive information as the live database, yet may not benefit from identical database-level permissions. Backup storage should therefore be protected through access controls, encryption, retention management, and secure disposal. Unauthorized backup access can bypass safeguards that protect the active database and lead to significant data exposure.

Question 120.

Which statement BEST describes a sound database operational baseline?

  1. It records only database size
  2. It is created once and never updated
  3. It includes only security settings
  4. It documents normal performance, capacity, configuration, and workload characteristics for comparison over time**

Correct Answer: 4. It documents normal performance, capacity, configuration, and workload characteristics for comparison over time

Explanation:

A baseline establishes what normal database behavior looks like, including resource usage, query performance, connection levels, storage growth, configuration, and other operational characteristics. Administrators can compare current conditions with the baseline to identify abnormal behavior or regressions. Baselines should be refreshed when legitimate workload or architecture changes significantly alter normal operating patterns.