Courseiva

CompTIA DataSys+ (DS0-001) (DS0-001) (DS0-001) — Questions 151–225

303 questions total · 5 pages · All types, answers revealed

Page 2

Page 3 of 5

Page 4
151
MCQhard

A financial services firm must prove to regulators that its nightly ETL job loaded the same source data that was archived for a given business date, and that no record was altered after extraction. Which combination of practices best provides this non-repudiation evidence?

A.Compute a cryptographic hash of the extracted dataset, store it with the archive, and re-verify the hash before and after loading.
B.Enable TLS on the connection between the ETL server and the source database.
C.Require the ETL service account to authenticate with a client certificate and rotate it quarterly.
D.Store the ETL job's exit code and row counts in a control table after each run.
AnswerA

A cryptographic hash acts as a content fingerprint: if even one byte changes, the hash differs. Recording the hash alongside the archived extract and re-verifying before and after load proves the loaded data is byte-identical to what was archived, providing the non-repudiation evidence regulators require. This is the standard integrity control for ETL provenance.

Why this answer

Non-repudiation of an ETL load requires content-level integrity evidence, not just operational success signals or access controls. Hashing the extract, storing the digest with the archive, and re-verifying before and after load creates a verifiable chain proving the loaded data matches the archived source and was not altered. Exit codes, TLS, and certificate authentication cannot demonstrate content equality.

Exam trap

The trap here is treating a successful job run, strong authentication, or transport encryption as proof that the loaded data matches the archived source, when only a content hash can demonstrate that equivalence.

152
Multi-Selectmedium

A financial services company is building a data governance program and must classify data assets so that protection controls map correctly to sensitivity. Which two actions are essential first steps in establishing data classification? (Choose two.)

Select 2 answers
A.Deploy a data loss prevention tool that blocks outbound transfers of records matching regular expressions for account numbers.
B.Require multifactor authentication for all employees accessing any corporate system.
C.Inventory data assets and assign an owner and a classification label to each identified asset.
D.Define classification tiers such as public, internal, confidential, and restricted, with written criteria for each tier.
E.Encrypt every database at rest using the vendor's transparent data encryption feature.
AnswersC, D

Classification is only actionable when applied to a known asset inventory with accountable owners. Cataloging assets and attaching labels creates the authoritative record that downstream controls, audits, and retention schedules reference, and it exposes unmanaged data stores that would otherwise be missed.

Why this answer

Classification begins with agreed sensitivity tiers and a complete asset inventory that assigns owners and labels. Those two actions create the vocabulary and the record of what is sensitive, enabling controls, retention, and access decisions to be tied to data value and risk rather than applied blindly across all systems.

Exam trap

The trap here is selecting enforcement or infrastructure controls such as DLP, encryption, or MFA as classification steps, when classification is fundamentally about defining tiers and labeling inventoried assets.

153
MCQeasy

A database administrator is responsible for a PostgreSQL database that stores financial transactions. The compliance team requires that all changes to the transactions table be recorded with the user, timestamp, and old and new values for auditing. The application performs INSERT, UPDATE, and DELETE operations. The DBA must implement a solution that captures all changes without modifying application code. Which PostgreSQL feature should the DBA use?

A.Enable row-level security on the transactions table.
B.Create a BEFORE UPDATE trigger that inserts into an audit table.
C.Use an AFTER INSERT OR UPDATE OR DELETE trigger that writes to an audit table.
D.Set the database to log all statements using log_statement = 'all'.
AnswerC

An AFTER trigger that fires on INSERT, UPDATE, and DELETE can capture all changes and write the user, timestamp, and old and new values to an audit table. AFTER triggers run after the row is modified, so they can access both OLD and NEW values. This requires no application code changes and provides a complete audit trail as required by compliance.

Why this answer

An AFTER trigger on INSERT, UPDATE, and DELETE captures all changes and can record user, timestamp, and old/new values into an audit table. This meets the compliance requirement without application changes. The other options either cover only some operations, provide security instead of auditing, or log unstructured statements without old/new values.

Exam trap

The trap here is confusing logging with auditing; server logs do not provide the structured old/new value capture required for compliance.

154
MCQeasy

Which type of join should be used to return all records from the 'Left' table and only matching records from the 'Right' table?

A.INNER JOIN
B.RIGHT JOIN
C.FULL JOIN
D.LEFT JOIN
AnswerD

A LEFT JOIN returns every row from the left table plus matched rows from the right, filling unmatched right columns with NULL. That precisely satisfies the requirement to preserve all Left records while including only matching Right records.

Why this answer

A LEFT JOIN (LEFT OUTER JOIN) returns every row from the left table regardless of whether a match exists in the right table, and for unmatched rows it fills right-table columns with NULLs. This is exactly the behavior described: all left records plus only matching right records.

Exam trap

The trap is mixing up which side is preserved — candidates often pick RIGHT JOIN thinking 'right' means 'correct' or confuse the preserved side, especially when the question phrases it as 'all records from the Left table.'

How to eliminate wrong answers

Option A is wrong because INNER JOIN returns only rows where the join key matches in both tables, discarding unmatched left rows. Option B is wrong because RIGHT JOIN returns all rows from the right table and only matching rows from the left — the mirror image of what the question asks. Option C is wrong because FULL JOIN (FULL OUTER JOIN) returns all rows from both tables, filling NULLs on whichever side lacks a match, which includes non-matching right rows the question wants excluded.

155
MCQmedium

A company is migrating to a cloud data warehouse and must comply with CCPA requirements for data portability. Which action is necessary to ensure compliance regarding user access requests?

A.Enable multi-factor authentication for all warehouse users
B.Disable all logging of user activity to prevent PII leakage
C.Increase the frequency of full database backups
D.Implement automated data export routines for individual user requests
AnswerD

CCPA grants consumers the right to receive their personal information in a portable format. Automated export routines let the company fulfil individual access requests promptly and consistently, satisfying the data portability obligation without manual extraction errors.

Why this answer

CCPA grants California consumers the right to data portability, meaning they can request a copy of their personal information in a readily usable format. To comply at scale in a cloud data warehouse, the organization must implement automated data export routines that can locate and deliver an individual user's data upon request. This directly operationalizes the portability right, whereas the other options address security, retention, or availability rather than portability.

Exam trap

DS0-001 often tests the confusion between security controls (MFA, logging) and privacy rights fulfillment (portability, deletion), causing candidates to pick a security measure when the question asks about a consumer right.

How to eliminate wrong answers

Option A is wrong because multi-factor authentication strengthens access security but does nothing to fulfill a consumer's right to receive their personal data in a portable format. Option B is wrong because disabling logging to 'prevent PII leakage' actually undermines compliance—CCPA and other regimes expect auditability—and it does not address portability requests at all. Option C is wrong because increasing backup frequency improves recoverability and durability, not the ability to export an individual's data on demand; backups are not a portability mechanism.

156
Multi-Selecteasy

Which THREE of the following are essential components of a robust disaster recovery plan for a mission-critical database?

Select 3 answers
A.Using only RAID 0 for storage
B.Keeping all data in memory
C.Off-site or cloud storage of backups
D.Regularly tested backup restoration
E.Documented and tested failover procedures
AnswersC, D, E

Off-site or cloud backup storage places copies geographically apart from the primary database, so a site-level disaster cannot destroy both production data and its backups. This separation satisfies the stem's requirement for an essential component of a robust disaster recovery plan.

Why this answer

Option C is correct because storing backups off-site or in the cloud protects against site-wide disasters such as fire, flood, or ransomware that could destroy locally held copies, ensuring a survivable copy exists in a separate failure domain. Option D is correct because backups are only trustworthy if restoration has been verified; regularly testing restores validates backup integrity, media readability, and RTO/RPO assumptions before an actual outage. Option E is correct because documented and tested failover procedures ensure that database replicas, clustering, or standby systems can be promoted quickly and consistently, minimizing downtime and human error during a real incident.

Option A is not appropriate because RAID 0 offers striping with no redundancy or parity, so a single disk failure destroys the array and it is never a disaster recovery safeguard. Option B is not appropriate because keeping all data in memory is volatile, non-persistent, and lost on power failure or crash, providing no durable recovery capability.

Exam trap

DS0-001 often tests the misconception that RAID or in-memory storage constitutes a backup, when in fact RAID is not a backup and memory is volatile — candidates must recognize that DR requires off-site, tested, and documented procedures.

157
Multi-Selecteasy

Which TWO tasks are critical before performing a major database schema upgrade?

Select 2 answers
A.Full database backup
B.Adding more memory to the server
C.Migration script validation in a staging environment
D.Deleting all stored procedures
E.Updating the OS kernel version
AnswersA, C

A full database backup captures a restorable copy of all data and schema objects before any structural change. If the upgrade fails or corrupts objects, this backup provides the rollback point, satisfying the pre-upgrade requirement for recoverability.

Why this answer

Option A (Full database backup) is correct because a complete, restorable backup (e.g., a full backup plus any needed transaction log backups, or a snapshot) is the only reliable rollback path if the schema upgrade fails or corrupts data, so it must be taken immediately before the change. Option C (Migration script validation in a staging environment) is correct because rehearsing the DDL/DML migration scripts against a staging copy that mirrors production schema, data volume, and dependencies exposes syntax errors, lock contention, and constraint or index conflicts before touching production. Option B (Adding more memory) is not a prerequisite for a schema upgrade; memory sizing is a capacity-tuning activity and does not protect data or validate the migration.

Option D (Deleting all stored procedures) is destructive and unnecessary, since procedures should be reviewed for dependency compatibility, not removed. Option E (Updating the OS kernel version) is unrelated to schema migration readiness and introduces additional change risk rather than mitigating it.

Exam trap

DS0-001 often tests the distinction between operational prerequisites (backup, staging validation) and unrelated infrastructure changes (memory, OS kernel) — candidates who equate 'preparation' with 'performance tuning' pick the wrong options.

158
MCQmedium

A data analyst is querying a sales table with columns order_id, order_date, customer_id, and order_total. They need to return each order along with the running total of order_total for each customer, ordered by order_date. Which SQL feature should they use?

A.A GROUP BY customer_id with SUM(order_total) and ORDER BY order_date
B.A self-join on customer_id with a condition that the joined order_date is less than or equal to the outer order_date, then SUM the joined order_total
C.A correlated subquery that selects SUM(order_total) from the same table where customer_id matches and order_date is less than the outer order_date
D.A window function with PARTITION BY customer_id ORDER BY order_date and a SUM() aggregate
AnswerD

A window function with PARTITION BY customer_id ORDER BY order_date and SUM() computes a running total per customer without collapsing rows. The PARTITION BY restarts the sum for each customer, and the ORDER BY defines the accumulation sequence. This returns every order row plus the cumulative total, exactly matching the requirement for a per-customer running total ordered by date.

Why this answer

The running total per customer requires preserving each order row while accumulating order_total in date order within each customer. A window function with PARTITION BY customer_id and ORDER BY order_date, using SUM() as the window aggregate, achieves this in one pass and returns the detail rows plus the cumulative value. Grouping, self-joins, or correlated subqueries either collapse rows or perform poorly and ambiguously.

Exam trap

The trap here is assuming that GROUP BY with SUM can produce a running total, when grouping actually collapses rows and cannot return per-order detail.

159
MCQmedium

A database administrator needs to implement column-level encryption for sensitive PII in a SQL Server environment. Which tool should be used to ensure the encryption keys are managed outside the database engine?

A.Database File Stream
B.Transparent Data Encryption (TDE)
C.SQL Server Data Masking
D.SQL Server Always Encrypted with Azure Key Vault
AnswerD

Always Encrypted performs cryptographic operations client-side, so the database engine never sees plaintext or keys. Storing the column master key in Azure Key Vault keeps key material outside SQL Server, satisfying the requirement that keys be managed externally.

Why this answer

SQL Server Always Encrypted with Azure Key Vault stores encryption keys outside the database engine, ensuring even DBAs cannot see plaintext PII. Column-level encryption is applied at the client driver, so the database only ever handles ciphertext. Azure Key Vault provides centralized, hardware-backed key management with auditing and access policies.

Exam trap

DS0-001 often tests the distinction between TDE (at-rest, DBA-visible) and Always Encrypted (client-side, DBA-blind), so candidates who pick TDE for 'keys outside the engine' fall for the most common trap.

How to eliminate wrong answers

Option A is wrong because FileStream is a storage feature for BLOBs, not an encryption or key management mechanism. Option B is wrong because TDE encrypts data at rest at the page level but keys are managed inside SQL Server, so a DBA with access can still read plaintext. Option C is wrong because Dynamic Data Masking only obfuscates data in query results for non-privileged users — it does not encrypt data and does not protect against a DBA querying the underlying table.

160
MCQmedium

During a database deployment, the administrator needs to ensure that audit logs are captured for all privileged user actions. Which component should be configured?

A.Row-Level Security
B.Database Audit Specification
C.Data Masking
D.Query Store
AnswerB

A Database Audit Specification defines which auditable events, such as privileged user actions, are captured at the database level. Configuring it satisfies the requirement to log all privileged activity, since it binds specific actions to an audit target and records them for later review.

Why this answer

To ensure audit logs are captured for all privileged user actions, the administrator should configure a Database Audit Specification. This feature in SQL Server allows auditing of specific database-level actions, such as SELECT, INSERT, UPDATE, DELETE, and EXECUTE by privileged users. It captures these actions to the audit log for compliance and monitoring.

Exam trap

DS0-001 often tests the confusion between security features like Row-Level Security and auditing, leading candidates to select features that restrict access rather than log actions.

How to eliminate wrong answers

Option A is wrong because Row-Level Security restricts data access based on user identity but does not capture audit logs. Option C is wrong because Data Masking obscures sensitive data in query results but does not log privileged actions. Option D is wrong because Query Store captures query execution plans and runtime statistics, not audit logs of user actions.

161
Multi-Selectmedium

A database administrator is preparing the deployment plan for a new transactional database that must support point-in-time recovery and minimize data loss after a storage failure. The organization has approved additional storage for this purpose. Which TWO deployment measures best meet these requirements? (Choose two.)

Select 2 answers
A.Enable archive logging so completed transaction log files are copied to a separate volume.
B.Enable automatic growth on the data files with a small increment so the database never runs out of space.
C.Place the transaction log on the same volume as the data files to reduce write latency.
D.Configure the database to run in full recovery model and schedule regular transaction log backups.
E.Schedule a full backup once per week and rely on the database's automatic crash recovery for the intervening days.
AnswersA, D

Archive logging preserves the sequence of log files after they are filled, so a base backup plus the archived logs can be replayed to any moment before the failure. Without archived logs, only the most recent backup can be restored and all transactions since then are lost. Copying the archives to a separate volume protects them from the same storage failure that destroys the data files.

Why this answer

Point-in-time recovery depends on a continuous log chain, which requires the full recovery model plus scheduled log backups, and on protecting those logs from the same failure that destroys the data. Archiving completed log files to a separate volume keeps the chain available after a media failure. Weekly full backups alone, co-located logs, and autogrowth do not provide the ability to restore to a chosen moment.

Exam trap

The trap here is treating a frequent full backup or automatic crash recovery as equivalent to point-in-time recovery, which actually requires an unbroken chain of log backups.

162
MCQhard

A database is experiencing high I/O wait times on the log drive. What is the most effective configuration change to alleviate this bottleneck?

A.Move the log to a high-performance dedicated drive
B.Use data compression
C.Increase the buffer pool size
D.Reduce the database recovery interval
AnswerA

Moving the transaction log to a dedicated high-performance drive directly addresses the I/O wait bottleneck by isolating sequential log writes from competing data-file reads. This separation reduces disk contention and lowers write latency, satisfying the stem's requirement to alleviate log-drive I/O pressure most effectively.

Why this answer

The log drive is the write-ahead log (WAL/redo) target, and it is written sequentially and synchronously on every commit. If that drive is slow or shared with data files, commits stall and I/O wait spikes. Moving the log to a dedicated high-performance device (SSD/NVMe, or a dedicated volume) removes contention and gives the sequential log stream the IOPS and low latency it needs.

Exam trap

The trap here is confusing read-path tuning (buffer pool, compression) with the write-path bottleneck that log I/O wait actually represents.

How to eliminate wrong answers

Option B is wrong because data compression reduces storage footprint and can lower I/O volume for reads, but it does not address the latency of synchronous log writes and adds CPU overhead. Option C is wrong because the buffer pool caches data pages in memory; enlarging it can reduce physical reads but does nothing for the log drive's write bottleneck. Option D is wrong because the recovery interval controls how often checkpoints occur; shortening it actually increases checkpoint/log write activity and can worsen log I/O pressure.

163
MCQmedium

A company needs to audit all administrative actions taken on their database server. Which feature should the DBA enable?

A.Data Partitioning
B.Database Audit Logging
C.Query Optimization
D.Transaction Log Backup
AnswerB

Database audit logging captures administrative and user actions such as logins, privilege changes, and DDL statements within the database engine itself, providing the granular, tamper-evident record needed to audit all administrative actions on the server.

Why this answer

Database Audit Logging captures administrative and user actions — such as logins, privilege changes, schema modifications, and DDL/DML operations — providing the audit trail required to review who did what and when. It is the specific feature designed for compliance, forensic, and security auditing on a database server.

Exam trap

DS0-001 often tests whether candidates confuse recovery-oriented logging (transaction log backups) with security-oriented logging (audit logging) — the key discriminator is whether the requirement is 'who did what' versus 'how do we restore'.

How to eliminate wrong answers

Option A is wrong because Data Partitioning is a performance and manageability technique that splits large tables into smaller segments; it does not record or track administrative activity. Option C is wrong because Query Optimization improves execution plan efficiency and speed but produces no audit trail of who executed which statements. Option D is wrong because Transaction Log Backup is a recovery mechanism that preserves the ability to restore a database to a point in time; it captures data changes for recovery, not administrative action history.

164
MCQmedium

A database administrator notices that the transaction log file is nearly full. Which operation will shrink the file to free up space?

A.DBCC SHRINKDATABASE
B.BACKUP LOG ... WITH TRUNCATE
C.ALTER DATABASE ... SET LOGFILE
D.DBCC SHRINKFILE
AnswerD

This command is used to shrink a specific file, such as a transaction log.

Why this answer

DBCC SHRINKFILE is the targeted command that reduces the size of a specific database file — including a transaction log file — by moving the file's end marker inward and releasing unused pages back to the OS. It is the correct tool when a DBA needs to reclaim space from one named log file without affecting other files in the database.

Exam trap

The trap here is confusing logical truncation (BACKUP LOG WITH TRUNCATE, which frees space for reuse) with physical shrinking (DBCC SHRINKFILE, which reduces file size on disk) — candidates often pick the truncation option thinking it shrinks the file.

How to eliminate wrong answers

Option A is wrong because DBCC SHRINKDATABASE operates at the database level and shrinks all files, not a specific log file, and it cannot shrink a log below the virtual log file (VLF) boundary or below the size needed for the active log. Option B is wrong because BACKUP LOG ... WITH TRUNCATE (or WITH TRUNCATE_ONLY in older versions) truncates the inactive portion of the log, marking space as reusable, but it does not physically shrink the file on disk — the file remains the same size.

Option C is wrong because ALTER DATABASE ... SET LOGFILE is not a valid T-SQL syntax; log file size is changed via ALTER DATABASE ... MODIFY FILE (SIZE = ...), and even that sets a target size rather than reclaiming fragmented free space.

165
MCQmedium

A data analyst is writing a query to find the average order value (AOV) per customer from an orders table that includes cancelled and returned orders. They want to exclude those orders from the calculation but still show all customers, including those with no valid orders. Which SQL construct should they use to ensure customers with no valid orders appear with a NULL or zero AOV?

A.LEFT JOIN between customers and orders with a WHERE clause filtering out cancelled and returned orders
B.FULL OUTER JOIN between customers and orders
C.LEFT JOIN between customers and orders with the order status filter in the ON clause
D.INNER JOIN between customers and orders
AnswerC

Placing the order status filter in the ON clause of a LEFT JOIN preserves all customers from the left table. Customers with no valid orders will have NULL values from the orders table, allowing aggregation to produce NULL or zero AOV. This correctly satisfies the requirement to show all customers while excluding cancelled and returned orders from the calculation.

Why this answer

To include all customers while excluding certain orders from the aggregation, the filter must be applied in the ON clause of a LEFT JOIN. This keeps all left-table rows and only joins matching right-table rows that satisfy the condition. Customers without valid orders retain NULLs, which can be handled in the SELECT list to display zero or NULL AOV.

Exam trap

The trap here is assuming that a LEFT JOIN with a WHERE filter on the right table still preserves all left-table rows, when in fact it silently converts the join to an inner join for those rows.

166
Multi-Selectmedium

Which TWO actions constitute good data lifecycle management?

Select 2 answers
A.Allowing all users access to all data
B.Defining data retention policies
C.Increasing database logging level to debug
D.Reformatting all drives annually
E.Automated archiving of stale data
AnswersB, E

Retention policies specify how long each data category is kept and when lawful disposal occurs, directly governing the lifecycle's storage and destruction phases. This satisfies the stem's requirement for good lifecycle management by preventing indefinite accumulation and aligning disposal with legal and business obligations.

Why this answer

Option B is correct because defining data retention policies is a core element of data lifecycle management: it specifies how long each data category must be kept to satisfy legal, regulatory, and business requirements, and when it should be securely disposed of. Option E is correct because automated archiving of stale data moves infrequently accessed records to lower-cost storage tiers while preserving them for retention or compliance needs, reducing primary storage load and risk. The unmarked options do not belong: A violates least-privilege and confidentiality principles by exposing all data to all users, C merely raises logging verbosity (debug level) and increases log volume without governing data lifecycle, and D is a destructive blanket reformatting of drives that ignores retention requirements and would cause data loss.

Exam trap

DS0-001 often tests the confusion between data lifecycle management and general IT practices like access control or hardware maintenance, so candidates must focus on retention, archiving, and disposal.

167
Multi-Selecthard

A data governance committee is defining the requirements for a new master data management program covering customer records across four business units. Which two practices are essential to maintain trustworthy golden records? (Choose two.)

Select 2 answers
A.Define and enforce data stewardship roles with clear accountability for each customer data domain.
B.Store the golden records only in the source system of the business unit with the largest customer base.
C.Replace all source systems with a single application so that only one copy of customer data exists.
D.Grant every business unit write access to the golden record so they can correct errors immediately.
E.Implement data quality rules with match, merge, and survivorship logic that resolves conflicting source values.
AnswersA, E

Stewardship assigns named owners who resolve conflicts, approve changes, and monitor quality for each domain. Without clear accountability, duplicate or contradictory customer records persist because no one is empowered to arbitrate. This practice directly supports trustworthy golden records by making ownership and decision rights explicit across the business units that contribute data.

Why this answer

Trustworthy golden records require both accountability and mechanics. Stewardship roles ensure someone owns decisions about customer data, while match, merge, and survivorship rules determine how duplicates are consolidated and which values prevail. Open editing, inheriting one unit's system, or collapsing to a single application do not supply the governance and quality logic that make master data reliable across business units.

Exam trap

The trap here is treating a technology consolidation or unrestricted editing as the path to trustworthy master data, when the essential ingredients are stewardship accountability and governed match-and-merge quality rules.

168
MCQmedium

A data analyst needs to calculate the total sales for each product category, but only for categories where the total sales exceed $10,000. The sales table contains columns sale_id, product_id, category, and amount. Which SQL query correctly produces the desired result?

A.SELECT category, SUM(amount) AS total_sales FROM sales GROUP BY category HAVING SUM(amount) > 10000;
B.SELECT category, SUM(amount) AS total_sales FROM sales GROUP BY category WHERE total_sales > 10000;
C.SELECT category, SUM(amount) AS total_sales FROM sales HAVING SUM(amount) > 10000 GROUP BY category;
D.SELECT category, SUM(amount) AS total_sales FROM sales WHERE SUM(amount) > 10000 GROUP BY category;
AnswerA

This query correctly groups rows by category, computes the sum of amount for each group, and then filters the grouped results using HAVING to include only categories where the total exceeds $10,000. The HAVING clause is specifically designed to filter aggregated results, making it the right choice for this scenario.

Why this answer

To filter aggregated results, the HAVING clause must be used after GROUP BY. The correct query groups sales by category, sums the amount, and then applies the condition to include only those groups with total sales over $10,000. Using WHERE with an aggregate or misplacing HAVING results in errors.

Exam trap

The trap here is confusing the WHERE and HAVING clauses, thinking that WHERE can filter aggregated data.

169
MCQhard

When using Python's 'Matplotlib' library, which function is used to add a new figure to the canvas?

A.plt.axis()
B.plt.plot()
C.plt.figure()
D.plt.show()
AnswerC

`plt.figure()` creates a new Figure object and registers it with pyplot's state machine, returning it for subsequent plotting calls. This directly satisfies the stem's requirement to add a new figure to the canvas, unlike axis-level or subplot functions that operate within an existing figure.

Why this answer

In Matplotlib, the plt.figure() function is used to create a new figure object, which serves as the canvas for plotting. Calling plt.figure() adds a new figure to the current pyplot state and returns a Figure instance that can be populated with axes and plots. Without calling plt.figure(), plotting functions like plt.plot() will draw on the current figure, or create one implicitly if none exists.

Exam trap

DS0-001 often tests the distinction between figure-level and axes-level functions, catching candidates who confuse plt.plot() (which draws data) with plt.figure() (which creates the canvas).

How to eliminate wrong answers

Option A is wrong because plt.axis() is used to get or set axis properties such as limits, ticks, and labels — it does not create a new figure. Option B is wrong because plt.plot() draws line plots on the current axes; it does not create a new figure canvas, though it may implicitly create one if none exists. Option D is wrong because plt.show() displays all open figures in an interactive window; it does not create a new figure.

170
Multi-Selecthard

Which THREE of the following items should be monitored to identify performance bottlenecks in a database?

Select 3 answers
A.Disk latency (I/O wait)
B.Batch requests per second
C.The database name length
D.Server room temperature
E.CPU utilization
AnswersA, B, E

Disk latency directly exposes storage-bound bottlenecks: high I/O wait means queries stall waiting on physical reads rather than CPU or network. Monitoring it satisfies the stem's requirement to identify performance bottlenecks, since slow disk throughput commonly throttles database operations before other resources saturate.

Why this answer

Disk latency (I/O wait) (A) is correct because high I/O wait times directly indicate storage bottlenecks where the database engine is waiting on reads/writes, a primary cause of slow query performance. Batch requests per second (B) is correct because it measures the throughput of SQL batches processed by the instance, revealing whether the workload is saturating the server or degrading under load. CPU utilization (E) is correct because sustained high CPU usage shows the database engine is compute-bound, often from expensive queries, missing indexes, or inefficient plans.

The database name length (C) is irrelevant since naming conventions have no effect on query execution or resource consumption, and server room temperature (D) is a facilities/environmental metric, not a database performance counter, though extreme heat could indirectly affect hardware.

Exam trap

DS0-001 often tests whether candidates confuse environmental or cosmetic attributes (server room temperature, database name length) with genuine performance counters, so pick only metrics that map to I/O, throughput, or compute.

171
MCQmedium

Before finalizing a database deployment, the team must ensure high availability. Which configuration allows for automatic failover to a standby server with zero data loss in a SQL Server environment?

A.Database Mirroring in High Performance mode
B.Synchronous-commit Availability Group
C.Log Shipping
D.Asynchronous-commit Availability Group
AnswerB

Synchronous-commit Availability Group commits on the secondary before acknowledging the primary, so failover to the standby loses no committed transactions. This satisfies the stem's zero-data-loss requirement, unlike asynchronous-commit mode, which permits potential data loss during failover.

Why this answer

A Synchronous-commit Availability Group in SQL Server ensures zero data loss by committing transactions on the primary replica only after they are hardened on at least one synchronous secondary replica. This provides automatic failover with no data loss, meeting the high availability requirement. It is the correct choice for zero data loss with automatic failover.

Exam trap

DS0-001 often tests the distinction between synchronous and asynchronous commit modes — candidates may assume any Availability Group provides zero data loss, but only synchronous-commit mode guarantees it, and only synchronous mode supports automatic failover without data loss.

How to eliminate wrong answers

Option A is wrong because Database Mirroring in High Performance mode uses asynchronous commit, which can result in data loss during failover. Option C is wrong because Log Shipping is not automatic failover — it requires manual intervention and can incur data loss (depending on backup frequency). Option D is wrong because an Asynchronous-commit Availability Group allows data loss during failover, as the secondary may not have received all transactions.

172
MCQmedium

A data systems team runs an analytics workload on a database that is also used for OLTP. Reports have become slower over time, and the team suspects that an index is being scanned instead of seeked. They want to capture the actual execution plan for a specific report query to confirm the operator used. Which action should they take?

A.Run the query with SET STATISTICS IO ON and compare logical reads.
B.Run the query with Include Actual Execution Plan enabled in the client tool.
C.Enable Query Store and inspect the plan for the query's query_id.
D.Run the query with SET SHOWPLAN_XML ON to capture the estimated plan before execution.
AnswerB

Including the actual execution plan captures the plan after execution, showing the operators actually used, including scans, seeks, and their properties. This directly confirms whether the index is being scanned or seeked for the report query, matching the need to verify the operator used.

Why this answer

The actual execution plan is generated after the query runs and reflects the operators and runtime behavior, making it the correct way to confirm whether an index scan or seek occurred. Estimated plans may not match runtime behavior, and I/O statistics or historical Query Store data do not directly show the actual operator for a specific execution.

Exam trap

The trap here is confusing estimated plans or I/O statistics with the actual execution plan, which is the only one that shows the operators used at runtime.

173
MCQmedium

A data analyst is using a subquery in the WHERE clause to filter customers who have placed at least one order. The subquery returns customer_id values from the orders table. Which SQL construct correctly expresses this requirement?

A.SELECT * FROM customers WHERE customer_id IN (SELECT customer_id FROM orders);
B.SELECT * FROM customers WHERE customer_id ANY (SELECT customer_id FROM orders);
C.SELECT * FROM customers WHERE customer_id = (SELECT customer_id FROM orders);
D.SELECT * FROM customers WHERE EXISTS (SELECT customer_id FROM orders);
AnswerA

The IN operator with a subquery tests whether each customer_id appears in the set of customer_id values returned by the orders subquery. This correctly filters customers who have at least one order, regardless of duplicates in the subquery. It is the standard and readable way to express a semi-join in SQL.

Why this answer

Filtering customers who have at least one order is a semi-join pattern. The IN operator with a subquery compares each outer customer_id against the set of customer_id values from orders, returning customers with at least one match. A scalar equality fails with multiple rows, an uncorrelated EXISTS returns all customers when orders is non-empty, and ANY without a comparison operator is invalid syntax.

Exam trap

The trap here is using EXISTS without correlating the subquery to the outer table, which makes the condition true for every row instead of filtering by customer.

174
MCQmedium

A healthcare analytics team stores patient records in a PostgreSQL database. A new compliance mandate requires that the database administrator be prevented from reading the contents of the 'diagnosis' column in plaintext, while the application must still be able to query and filter on that column. Which mechanism should the team implement?

A.Column-level encryption using a key managed by an external key management service, with the application performing encryption and decryption.
B.Transparent Data Encryption (TDE) at the tablespace level using the database engine's built-in key store.
C.Row-level security policies that restrict SELECT on the table to application service accounts only.
D.Database activity monitoring that alerts when the administrator queries the 'diagnosis' column.
AnswerA

Column-level encryption with keys held externally means the DBA sees only ciphertext in the 'diagnosis' column, satisfying the mandate that administrators cannot read plaintext PHI. The application, which holds or retrieves the key, encrypts before insert and decrypts after select, so filtering can still occur on decrypted values or on deterministic tokens, preserving query functionality.

Why this answer

The requirement is to hide column contents from a privileged database administrator while retaining application query capability. Encrypting that column with keys held outside the database, and letting the application perform cryptographic operations, achieves both goals because the DBA only ever sees ciphertext. Engine-level encryption and access policies still expose plaintext to administrators, and monitoring is detective rather than preventive.

Exam trap

The trap here is assuming that engine-native features such as TDE or row-level security hide data from a database administrator, when those controls still permit privileged users to read plaintext.

175
MCQmedium

A cloud-based SaaS provider stores customer data in a multi-tenant database. The provider wants to ensure that a customer's data is logically isolated from other customers' data, even though they share the same database schema. Which security control should be implemented to enforce this isolation?

A.Network segmentation using virtual private clouds (VPCs) for each tenant.
B.Column-level encryption with separate keys for each tenant.
C.A separate database instance for each tenant.
D.Row-level security (RLS) policies that filter data based on the tenant identifier.
AnswerD

Row-level security policies automatically filter rows based on the tenant identifier associated with the user's session. This ensures that each customer can only access their own data, even though all data resides in the same tables. RLS is a standard technique for multi-tenant isolation in shared databases, enforcing logical separation without requiring separate schemas or databases.

Why this answer

Row-level security policies enforce logical isolation by automatically filtering rows based on the tenant identifier. This ensures that each customer can only access their own data within the shared database. RLS is a proven approach for multi-tenant applications because it centralizes access control at the database layer, reducing the risk of application-level bugs that could expose cross-tenant data.

It directly satisfies the requirement for logical isolation without altering the shared schema.

Exam trap

The trap here is assuming that encryption or network segmentation provides tenant isolation within a shared database, when only row-level access controls can enforce it.

176
Multi-Selecthard

Which TWO of the following scenarios are best suited for using a 'View'?

Select 2 answers
A.Simplifying complex joins
B.Storing large binary objects
C.Improving write speed
D.Implementing security access
E.Generating unique sequences
AnswersA, D

A view stores a predefined SELECT statement, so the join logic is written once and reused. This directly satisfies the scenario's need to simplify complex joins, hiding multi-table syntax behind a single named object that users query as if it were one table.

Why this answer

Views are best for simplifying complex queries and implementing row/column level security.

177
MCQmedium

In the context of data quality, what does 'Completeness' refer to?

A.The consistency of data across sources
B.The absence of missing values
C.The timeliness of the data
D.The accuracy of values
AnswerB

Completeness measures whether all required values are actually populated, so it refers to the absence of missing values in a dataset. Records with null or absent entries reduce completeness, distinguishing it from accuracy, which concerns correctness of present values.

Why this answer

In data quality, Completeness refers to the degree to which all required data values are present — i.e., the absence of missing values in a dataset. It measures whether records have all expected attributes populated, not whether those values are correct or consistent.

Exam trap

DS0-001 often tests the confusion between Completeness (absence of missing values) and Accuracy (correctness of values), since both are core data quality dimensions but address different aspects of data fitness.

How to eliminate wrong answers

Option A is wrong because consistency across sources is a different dimension (Consistency), not Completeness. Option C is wrong because timeliness refers to data being available when needed (Timeliness), not whether values are missing. Option D is wrong because accuracy concerns whether values correctly reflect reality (Accuracy), which is distinct from whether they are present at all.

178
MCQhard

A data analyst is examining a query that uses a LEFT JOIN between a customers table and an orders table. The analyst notices that some customers appear multiple times in the result set. Which of the following is the most likely cause?

A.The join is using a non-unique column in the customers table.
B.The join condition is missing a filter on the orders table.
C.The orders table has multiple orders for the same customer.
D.The customers table has duplicate customer IDs.
AnswerC

In a LEFT JOIN, each row from the left table (customers) is combined with matching rows from the right table (orders). If a customer has multiple orders, that customer will appear multiple times in the result set, once for each order. This is expected behavior and the most common reason for duplicate customer rows in a LEFT JOIN result.

Why this answer

In a LEFT JOIN, each left-table row is paired with all matching right-table rows. Since a customer can have multiple orders, the customer will appear multiple times, once per order. This is the expected result of a one-to-many relationship and the most common reason for duplicate customer rows in such a join.

Exam trap

The trap here is assuming that duplicates indicate a data quality issue, when they are actually a natural result of a one-to-many join.

179
Multi-Selecthard

A database administrator is configuring a new SQL Server instance for a high-volume online transaction processing (OLTP) system. The administrator needs to optimize tempdb performance. Which two actions should the administrator take? (Choose two.)

Select 2 answers
A.Set the tempdb filegrowth to a small percentage to save disk space.
B.Enable trace flag 1118 to use uniform extents for tempdb allocations.
C.Create multiple tempdb data files, one per CPU core up to eight.
D.Set the tempdb recovery model to FULL.
E.Place the tempdb transaction log on the same volume as the data files.
AnswersB, C

Trace flag 1118 forces uniform extent allocations, reducing contention on SGAM pages for tempdb. In SQL Server 2016 and later, this behavior is enabled by default for tempdb, but on older versions or when explicitly disabled, enabling it improves performance. It complements multiple data files by further reducing allocation bottlenecks. This is a recognized tempdb optimization.

Why this answer

For high-volume OLTP, tempdb performance is improved by creating multiple data files (one per core up to eight) to reduce allocation contention, and by ensuring uniform extent allocations via trace flag 1118 (or relying on the default in newer versions). These actions address the most common tempdb bottlenecks. Changing the recovery model, co-locating log and data files, or using small percentage growth would harm performance or are invalid.

Exam trap

The trap here is assuming that tempdb can be tuned like a user database, such as changing its recovery model or using small filegrowth, when tempdb has unique restrictions and best practices.

180
MCQeasy

Which database object is specifically designed to enforce referential integrity between two tables?

A.Index
B.Primary Key
C.Unique Constraint
D.Foreign Key
AnswerD

A foreign key column references the primary key of a related table, so the database engine rejects inserts or updates that would leave an orphaned row. This directly enforces referential integrity between the two tables, unlike a check constraint or unique index.

Why this answer

A Foreign Key constraint is designed to ensure that data in one table matches valid entries in another table, maintaining referential integrity.

181
MCQmedium

To prevent unauthorized access to specific columns in a 'Salary' table, which object should be created for the reporting team?

A.View
B.Index
C.Sequence
D.Stored Procedure
AnswerA

A view exposes only selected columns and rows from the Salary table, letting the reporting team query permitted data while salary columns remain hidden. Granting access to the view rather than the base table enforces column-level restriction, satisfying the requirement to prevent unauthorised access to specific columns.

Why this answer

A view is a virtual table defined by a SELECT statement that exposes only the columns and rows the creator chooses to include. By creating a view that selects only non-sensitive columns from the 'Salary' table and granting the reporting team SELECT permission on the view (rather than on the base table), column-level access is restricted without duplicating data. This is the standard SQL mechanism for column-level security when row-level or table-level grants are too coarse.

Exam trap

DS0-001 often tests the distinction between objects that control access (views, stored procedures) and objects that control performance or data generation (indexes, sequences), so candidates who focus on 'reporting performance' may wrongly pick an index.

How to eliminate wrong answers

Option B is wrong because an index is a performance structure that speeds up data retrieval; it does not restrict which columns a user can see and actually requires access to the underlying table. Option C is wrong because a sequence is an object that generates numeric values (often for surrogate keys) and has nothing to do with access control. Option D is wrong because a stored procedure encapsulates logic and can restrict access indirectly, but it is not the object designed to expose a restricted column subset for ad-hoc reporting queries; a view is the direct, purpose-built solution.

182
Multi-Selecthard

A financial services firm is implementing a data governance program and must classify data assets. Which two characteristics are used to determine whether data should be classified as confidential under a typical data classification policy? (Choose two.)

Select 2 answers
A.The data contains personally identifiable information (PII) such as Social Security numbers or account numbers.
B.The data is accessed by more than ten users per day.
C.The data is stored in a relational database rather than a NoSQL store.
D.The data is older than seven years and therefore archived.
E.The data's unauthorized disclosure would cause material financial or legal harm to the organization or its customers.
AnswersA, E

PII is a primary driver of confidential classification because unauthorized disclosure can cause identity theft, regulatory penalties, and reputational harm. Classification policies typically place PII at the confidential or restricted tier, triggering encryption, access controls, and breach notification obligations under laws such as GLBA and state privacy statutes.

Why this answer

Confidential classification hinges on content and impact: data containing PII or whose disclosure would cause material harm warrants the confidential tier. Storage technology, access frequency, and age are operational attributes that do not determine sensitivity and therefore should not drive classification decisions.

Exam trap

The trap here is assuming that technical attributes such as database type, access volume, or age determine sensitivity; classification is based on content and the harm from disclosure.

183
Multi-Selecteasy

Which TWO of the following are common administrative tasks in a Data Governance program?

Select 2 answers
A.Updating the server operating system
B.Managing the data catalog metadata
C.Repairing broken network cables
D.Optimizing database query performance
E.Conducting access rights certification
AnswersB, E

Maintaining the data catalog's metadata — definitions, owners, lineage, classifications — is a continuous governance duty. It satisfies the stem because stewardship of business glossaries and technical metadata keeps data discoverable and accountable, which is administrative work performed under governance policy.

Why this answer

Managing the data catalog metadata (B) is a core data governance administrative task because the catalog documents data assets, definitions, lineage, ownership, and stewardship information that governance relies on to make data discoverable and accountable. Conducting access rights certification (E) is also a common governance administrative task, as it periodically reviews and attests that users retain only the data access privileges appropriate to their roles, supporting least-privilege and compliance requirements. The other options fall outside data governance administration: updating the server operating system (A) is IT infrastructure/patch management, repairing broken network cables (C) is physical network maintenance, and optimizing database query performance (D) is database administration/tuning rather than governance of data policies, stewardship, or access accountability.

Exam trap

DS0-001 often tests the boundary between governance (policy, metadata, access attestation) and IT operations (patching, cabling, tuning), tempting candidates to pick hands-on infrastructure tasks.

184
MCQeasy

A data analyst is writing a SQL query to retrieve unique department names from the 'Employees' table. Which keyword should be utilized to ensure the results do not contain duplicate entries?

A.GROUP BY
B.DISTINCT
C.UNIQUE
D.FILTER
AnswerB

DISTINCT eliminates duplicate rows from the result set by comparing all selected column values, returning each unique department name once. It directly satisfies the requirement that results contain no duplicate entries, unlike keywords that filter rows conditionally or aggregate values rather than deduplicating the projected output.

Why this answer

The DISTINCT keyword is the correct choice because it eliminates duplicate rows from the result set, returning only unique values for the selected columns. When applied as SELECT DISTINCT department FROM Employees, the database engine sorts or hashes the intermediate result to remove duplicates before returning rows. This is the ANSI SQL standard mechanism specifically designed for deduplication of query output.

Exam trap

DS0-001 often tests the confusion between DISTINCT (a query keyword for deduplication) and UNIQUE (a DDL constraint), so candidates who conflate schema-level uniqueness with result-set deduplication pick the wrong answer.

How to eliminate wrong answers

Option A is wrong because GROUP BY is used for aggregation — it groups rows so aggregate functions (COUNT, SUM, AVG) can be applied per group, and while it does produce unique group values, it is semantically an aggregation clause, not a deduplication clause, and requires either aggregates or all non-aggregated columns in the GROUP BY list. Option C is wrong because UNIQUE is a constraint keyword used in DDL (CREATE TABLE, ALTER TABLE) to enforce uniqueness at the schema level, not a query keyword for filtering result sets. Option D is wrong because FILTER is a clause used with aggregate functions (e.g., COUNT(*) FILTER (WHERE ...)) in PostgreSQL and SQL:2003, not a deduplication mechanism.

185
Multi-Selecteasy

Which THREE of the following are common types of database backups?

Select 3 answers
A.Full
B.Differential
C.Snapshot
D.Transaction Log
E.Hardware copy
AnswersA, B, D

A full backup copies the entire database, providing a complete standalone restore point and resetting the differential and transaction log chain. It satisfies the stem's requirement as one of the three standard backup types, alongside differential and transaction log backups.

Why this answer

Full, differential, and transaction log backups are the standard backup types used in professional database environments.

186
MCQeasy

Which type of data is defined as 'sensitive' and usually requires enhanced protection?

A.Temporary cache files
B.Publicly available news data
C.Static CSS files
D.Personally Identifiable Information (PII)
AnswerD

Personally Identifiable Information uniquely identifies an individual, so its exposure triggers legal and regulatory duties that generic data lacks. This satisfies the stem's enhanced-protection constraint, since PII demands stricter controls such as encryption, access restrictions and audit trails under regimes like UK GDPR.

Why this answer

Personally Identifiable Information (PII) is data that can identify a specific individual, such as names, SSNs, addresses, or biometric data, and is classified as sensitive, requiring enhanced protection under regulations like GDPR, CCPA, and HIPAA. PII is the canonical example of sensitive data in data governance frameworks.

Exam trap

DS0-001 often tests data classification categories, so the trap is picking a technical-sounding option (cache files) that can contain sensitive data but is not itself a sensitivity classification.

How to eliminate wrong answers

Option A is wrong because temporary cache files are transient operational artifacts; while they can contain sensitive data, the category itself is not defined as sensitive and is typically cleared automatically. Option B is wrong because publicly available news data is, by definition, public and does not require enhanced protection. Option C is wrong because static CSS files are presentation assets with no personal data content and no sensitivity classification.

187
MCQmedium

A database administrator is asked to implement a mechanism that ensures data cannot be repudiated by a user who made changes to a financial ledger table. The mechanism must provide cryptographic proof of the origin and integrity of each transaction. Which approach should be used?

A.Enable Transparent Data Encryption (TDE) on the database
B.Implement digital signatures on each transaction using asymmetric cryptography
C.Use hash-based message authentication codes (HMAC) with a shared secret
D.Configure SQL Server Audit to log all changes to the ledger table
AnswerB

Digital signatures use a private key to sign data, and anyone with the public key can verify the signature. This provides non-repudiation because only the holder of the private key could have created the signature. It also ensures integrity and origin authentication, directly meeting the requirement.

Why this answer

Digital signatures provide non-repudiation by using asymmetric cryptography. The signer uses their private key to sign the transaction, and verifiers use the public key. This proves the transaction originated from the signer and has not been altered.

Other options like TDE, HMAC, or auditing do not offer the same cryptographic proof of origin and integrity.

Exam trap

The trap here is confusing integrity mechanisms like HMAC or auditing with non-repudiation, but non-repudiation requires asymmetric cryptography where only one party holds the private key.

188
MCQmedium

An analyst is writing an SQL query to retrieve total sales per region, but the result must only show regions with more than 100 transactions. Which clause is required?

A.HAVING
B.ORDER BY
C.LIMIT
D.WHERE
AnswerA

HAVING filters grouped rows after aggregation, so it can restrict results to regions whose COUNT of transactions exceeds 100. WHERE cannot reference aggregate functions, making HAVING the only clause that satisfies this post-aggregation filter requirement.

Why this answer

The HAVING clause is used to filter the results of aggregate functions like SUM or COUNT. Since the requirement is to show only regions with more than 100 transactions, which is an aggregate condition, HAVING is required. WHERE cannot be used with aggregate functions.

Exam trap

DS0-001 often tests the difference between WHERE and HAVING, and candidates may incorrectly choose WHERE for filtering aggregate results.

How to eliminate wrong answers

Option B is wrong because ORDER BY sorts the result set but does not filter based on aggregate conditions. Option C is wrong because LIMIT restricts the number of rows returned, not filter by aggregate values. Option D is wrong because WHERE filters rows before grouping and cannot be used with aggregate functions like COUNT.

189
Multi-Selecthard

A data platform team is implementing encryption for a new MongoDB cluster that stores customer PII. The security policy requires protecting data at rest and ensuring that compromised credentials for one tenant cannot expose another tenant's data. Which two measures should the team implement to meet these requirements? (Choose two.)

Select 2 answers
A.Enable role-based access control with a shared administrative account
B.Configure Client-Side Field Level Encryption for the tenant-identifying fields
C.Enable WiredTiger storage engine encryption at rest with a key managed by a KMS
D.Store encryption keys in a configuration file on each mongod host
E.Enable TLS for all client and intra-cluster connections
AnswersB, C

Client-Side Field Level Encryption encrypts specified fields in the driver before they reach mongod, so even a compromised database credential or server cannot read plaintext tenant data. Scoping keys per tenant means one tenant's key material cannot decrypt another tenant's fields, directly addressing the cross-tenant exposure concern stated in the policy.

Why this answer

Protecting data at rest requires encrypting storage files with keys held outside the database host, which WiredTiger encryption with KMS-managed keys provides. Preventing one tenant's compromised credentials from exposing another tenant's data requires cryptographic separation at the field level, which Client-Side Field Level Encryption with per-tenant keys delivers. Together these two measures satisfy both clauses of the security policy.

Exam trap

The trap here is treating transport encryption or access control as a substitute for at-rest and field-level cryptographic isolation, when the policy explicitly demands protection of stored data and cross-tenant separation.

190
MCQhard

Which NoSQL structure is best suited for scenarios where data relationships are complex and frequently traversed?

A.Graph
B.Key-Value
C.Column-family
D.Document
AnswerA

Graph databases store nodes and edges as first-class entities, so relationships are persisted directly rather than inferred through joins. Traversal follows pointers between adjacent nodes, making multi-hop queries across complex, frequently changing relationships far faster than relational or document alternatives.

Why this answer

Graph databases store data as nodes and edges, where edges explicitly represent relationships between entities. This native adjacency structure allows traversals across connected data to be performed in near-constant time per hop, making them ideal when relationships are complex and frequently queried. Key-value, column-family, and document stores lack first-class relationship modeling, so multi-hop traversals require expensive joins or application-side processing.

Exam trap

DS0-001 often tests whether candidates confuse document stores' embedded references with true graph traversal, so the trap is picking Document because it can 'link' data, when only Graph provides native relationship traversal.

How to eliminate wrong answers

Option B is wrong because key-value stores only map a key to an opaque value with no native relationship construct, so traversing relationships requires application logic or secondary indexes. Option C is wrong because column-family stores optimize wide-row aggregation and sparse column access, not multi-hop relationship traversal. Option D is wrong because document stores embed related data inside documents or reference them by ID, but they do not provide efficient graph traversal across documents.

191
Multi-Selectmedium

Which TWO of the following are key considerations when configuring a database for high availability?

Select 2 answers
A.The color of the server chassis
B.Number of database users
C.Network latency between nodes
D.The database name
E.Storage subsystem performance
AnswersC, E

Replication and failover between nodes depend on timely heartbeat and synchronisation traffic, so high network latency delays detection of failure and risks stale reads. This directly satisfies the high-availability requirement by ensuring rapid, consistent failover.

Why this answer

Network latency between nodes (C) is a key high-availability consideration because replication, clustering heartbeats, and failover coordination depend on timely inter-node communication; high latency can cause replication lag, split-brain scenarios, or delayed failover. Storage subsystem performance (E) is also critical because HA designs rely on fast, reliable shared or replicated storage (e.g., SAN, RAID, synchronous replication) to meet RPO/RTO targets and avoid I/O bottlenecks during failover. The color of the server chassis (A) is purely cosmetic and has no bearing on availability.

The number of database users (B) affects load and licensing but is not a defining HA configuration factor. The database name (D) is just an identifier and does not influence availability mechanisms.

Exam trap

DS0-001 often tests the misconception that HA is about user count or naming — candidates pick 'number of database users' because it sounds operational, missing that HA is fundamentally about latency, storage, and failover mechanics.

192
Multi-Selectmedium

Which TWO of the following can be used to prevent unauthorized access to sensitive database tables?

Select 2 answers
A.Row-level security
B.Add more CPU cores
C.Role-based access control
D.Increase the backup frequency
E.Use the sa account
AnswersA, C

Row-level security enforces predicates inside the database engine, filtering rows by the executing user's identity regardless of the query submitted. This satisfies the requirement to prevent unauthorised access to sensitive tables, because Microsoft Entra ID-backed users only ever see rows matching their granted predicate, even through ad-hoc queries or reporting tools.

Why this answer

Implementing role-based access control (RBAC) and row-level security (RLS) are effective ways to secure access to data.

193
Multi-Selectmedium

Which THREE elements are essential when configuring Database Activity Monitoring (DAM)?

Select 3 answers
A.Upgrading the database server CPU
B.Identifying sensitive data objects
C.Installing extra network routers
D.Configuring alert thresholds
E.Defining audit rules for privileged users
AnswersB, D, E

DAM sensors must know which tables and columns hold regulated data before they can monitor access meaningfully. Identifying sensitive data objects scopes the monitoring policy, so alerts and audit rules apply to the assets that actually matter rather than generating noise across the whole database estate.

Why this answer

Database Activity Monitoring (DAM) requires knowing what to protect, so option B (identifying sensitive data objects) is essential because audit policies and monitoring scope must target the specific tables, columns, and schemas that contain regulated or high-value data. Option D (configuring alert thresholds) is correct because DAM generates alerts on suspicious activity, and thresholds define the conditions, severity, and volume of events that trigger notifications, preventing alert fatigue while ensuring real threats surface. Option E (defining audit rules for privileged users) is correct because privileged accounts such as DBAs and sysadmins often bypass application controls, so explicit audit rules capturing their SELECT, DML, DDL, and privilege changes are a core DAM requirement.

Option A (upgrading the database server CPU) is not a DAM configuration element; it is a hardware capacity change unrelated to monitoring policy. Option C (installing extra network routers) is also irrelevant, as DAM relies on database-native auditing, network sniffing, or agent-based collection rather than additional routing infrastructure.

Exam trap

DS0-001 often tests whether candidates confuse DAM's policy/scope/alerting triad with infrastructure concerns like CPU, routers, or storage — the exam plants hardware options to lure candidates who think 'monitoring' means 'more resources.'

194
Multi-Selecthard

Which TWO database features are best used to handle massive volumes of data while maintaining fast query speeds for historical analytics?

Select 2 answers
A.Clustered indexes on random UUIDs
B.Table partitioning
C.Columnstore indexes
D.Row-level triggers
E.Database mirroring
AnswersB, C

Partitioning allows for 'partition elimination', which significantly speeds up queries on large datasets.

Why this answer

Table partitioning (B) is correct because splitting a large table into smaller, manageable partitions—typically by date or range—lets the query engine scan only the relevant partitions (partition elimination), dramatically reducing I/O for historical analytics workloads. Columnstore indexes (C) are correct because they store data column-wise with compression and batch-mode processing, which is purpose-built for large-scale analytical scans and aggregations, delivering fast query speeds over massive data volumes. Clustered indexes on random UUIDs (A) are wrong because random values cause page splits and fragmentation, hurting write and read performance.

Row-level triggers (D) add per-row procedural overhead and do nothing to accelerate analytical queries. Database mirroring (E) is a high-availability/DR feature that duplicates a database but provides no query-performance or analytical-scan benefit.

Exam trap

DS0-001 often tests the misconception that any index improves performance — candidates pick clustered indexes on UUIDs, not realizing random keys cause fragmentation and page splits.

195
MCQmedium

A company is planning to migrate a legacy on-premises database to the cloud. Which assessment should be conducted to ensure the application compatibility with the target managed database service?

A.Network throughput analysis
B.Database compatibility assessment
C.Capacity planning report
D.Data integrity audit
AnswerB

A database compatibility assessment evaluates schema objects, data types, stored procedures and vendor-specific SQL against the target managed service's engine version, directly satisfying the stem's requirement to confirm application compatibility before migration. It exposes unsupported features and deprecated syntax that would otherwise break the application once cutover occurs.

Why this answer

A database compatibility assessment evaluates whether the legacy database's schema, data types, stored procedures, triggers, and application dependencies will work on the target managed service. Managed cloud databases often lack certain features (e.g., SQL Server Agent, cross-database queries, CLR, or specific system stored procedures), so this assessment identifies incompatibilities before migration and informs remediation planning.

Exam trap

DS0-001 often tests whether candidates can distinguish migration-phase activities — the trap is selecting capacity planning or network analysis because they are legitimate migration concerns, when the question specifically asks about application compatibility with the target service.

How to eliminate wrong answers

Option A is wrong because network throughput analysis measures bandwidth and latency between source and target, which is relevant to migration speed but does not assess whether the application's SQL and schema will function on the target platform. Option C is wrong because capacity planning determines sizing (CPU, memory, storage, IOPS) for the target, not application compatibility — a correctly sized target can still fail if the application uses unsupported features. Option D is wrong because a data integrity audit verifies that data is accurate and consistent, which is a data-quality concern, not a compatibility concern; it does not reveal whether stored procedures or data types are supported.

196
Multi-Selecthard

Which TWO of the following are common database maintenance tasks?

Select 2 answers
A.Rebooting the server weekly
B.Renaming every table
C.Updating statistics
D.Deleting all users
E.Rebuilding indexes
AnswersC, E

Statistics feed the query optimiser's cost estimates, so stale or missing statistics cause poor execution plans and slow queries. Regularly refreshing them is a routine maintenance activity, satisfying the stem's requirement for a common database maintenance task.

Why this answer

Updating statistics and rebuilding indexes are critical maintenance tasks to ensure optimal query performance.

197
MCQeasy

A database administrator needs to add a new column named 'loyalty_points' of type INTEGER to an existing 'customers' table without affecting existing rows' data. Which SQL statement should the administrator execute?

A.ALTER TABLE customers ADD COLUMN loyalty_points INTEGER;
B.INSERT INTO customers (loyalty_points) VALUES (INTEGER);
C.UPDATE TABLE customers ADD loyalty_points INTEGER;
D.CREATE TABLE customers ADD loyalty_points INTEGER;
AnswerA

The ALTER TABLE ... ADD COLUMN statement modifies the table's structure by appending a new column definition. Existing rows receive a NULL value for the new column unless a default is specified, so their data remains intact. This is the standard DDL statement for adding a column to an existing table in SQL.

Why this answer

Adding a column to an existing table is a schema change performed with ALTER TABLE ... ADD COLUMN. This preserves existing rows and populates the new column with NULL or a specified default.

UPDATE changes row values, INSERT adds rows, and CREATE TABLE builds new tables, so only the ALTER TABLE statement satisfies the requirement without disturbing existing data.

Exam trap

The trap here is confusing DML statements like UPDATE and INSERT, which manipulate row data, with DDL statements like ALTER TABLE, which change table structure.

198
MCQmedium

You are deploying a database that requires compliance with FIPS 140-2. What must be configured to ensure the database meets this security standard?

A.Database hardening scripts
B.User password rotation policies
C.FIPS-mode encryption
D.Multi-factor authentication (MFA)
AnswerC

FIPS-mode encryption enforces FIPS 140-2 validated cryptographic modules and algorithms for data at rest and in transit, satisfying the stem's compliance requirement. Enabling this mode ensures the database's cryptographic operations meet the mandated federal standard.

Why this answer

FIPS 140-2 is a U.S. government standard for cryptographic modules, so compliance requires that the database use FIPS-validated cryptographic modules — typically enabled via a FIPS mode setting that forces all encryption operations through validated algorithms and libraries. Without FIPS-mode encryption, the database may use non-validated ciphers even if encryption is otherwise enabled.

Exam trap

DS0-001 often tests the misconception that any encryption or authentication control satisfies FIPS 140-2, when the standard specifically requires FIPS-validated cryptographic modules enabled via FIPS mode.

How to eliminate wrong answers

Option A is wrong because hardening scripts address configuration baselines and attack surface reduction, not cryptographic module validation. Option B is wrong because password rotation is an authentication hygiene control and does not satisfy FIPS 140-2's cryptographic module requirements. Option D is wrong because MFA strengthens authentication but is unrelated to the cryptographic validation FIPS 140-2 mandates for encryption modules.

199
Multi-Selecteasy

Which TWO of the following are examples of logical database design tasks?

Select 2 answers
A.Choosing the RAID level for storage
B.Selecting the database file path
C.Normalizing the data schema
D.Configuring the database buffer pool size
E.Defining entity-relationship models
AnswersC, E

Normalising the data schema is a logical design task because it restructures relations and attributes—resolving partial and transitive dependencies—without altering physical storage. This satisfies the stem's requirement for logical, not physical, design work, since normalisation operates on the conceptual schema independently of indexes, filegroups or disk layout.

Why this answer

Normalizing the data schema (C) is a logical design task because it organizes tables and relationships to eliminate redundancy and anomalies without regard to physical storage. Defining entity-relationship models (E) is also logical design, as ER modeling captures entities, attributes, and relationships at a conceptual/logical level before implementation. The other options are physical design or operational tasks: choosing a RAID level (A) and selecting a database file path (B) concern storage layout, while configuring the buffer pool size (D) tunes memory allocation for performance.

Exam trap

DS0-001 often tests the boundary between logical and physical design, and candidates frequently misclassify storage and performance-tuning tasks (RAID, file paths, buffer pools) as logical when they are strictly physical concerns.

200
MCQmedium

You are managing a PostgreSQL database that supports a global application. Users in different regions experience slow query performance when filtering on a timestamp column that stores UTC values. You need to ensure that queries filtering on local time are efficient. What should you do?

A.Add a nonclustered index on the timestamp column
B.Change the column data type to timestamp with time zone
C.Create an expression index on the timestamp column converted to the local time zone
D.Create a separate materialized view for each region with local time
AnswerC

An expression index on the converted timestamp allows the database to use an index when queries filter on local time. Without it, the conversion would prevent index usage, causing full scans. This approach maintains the UTC storage while enabling efficient queries for each region by creating indexes tailored to their time zone.

Why this answer

An expression index on the timestamp column converted to the local time zone enables the database to use an index for queries that filter on local time. This maintains the storage in UTC while providing efficient access for each region's queries, avoiding full table scans caused by non-sargable predicates.

Exam trap

The trap here is assuming that simply having an index on the timestamp column is sufficient, but applying a function or conversion in the WHERE clause prevents index usage unless an expression index is created.

201
MCQmedium

An analyst joins a large fact table to a small lookup table using an inner join and notices that the result contains more rows than the original fact table. After reviewing the data, the analyst discovers that the lookup table contains duplicate values in its join key. Which action should the analyst take to ensure each fact row is matched to at most one lookup row?

A.Deduplicate the lookup table by selecting one row per join key before performing the join.
B.Move the join condition from the ON clause into the WHERE clause.
C.Change the join to a LEFT OUTER JOIN so unmatched fact rows are preserved.
D.Add a DISTINCT clause to the SELECT statement to remove duplicate result rows.
AnswerA

Deduplicating the lookup table so that each join key appears once ensures the inner join returns at most one lookup row per fact row, eliminating the row multiplication. This can be done with a subquery that groups by the key or uses a window function such as ROW_NUMBER to pick a representative row. It directly addresses the duplicate-key cause of the inflated row count.

Why this answer

Row multiplication in a join occurs when the join key is not unique on one side. Making the lookup table unique per join key guarantees a one-to-one or many-to-one relationship, so each fact row matches at most one lookup row. Deduplicating the lookup before joining is the targeted fix; changing join type, adding DISTINCT, or relocating predicates does not address the duplicate-key root cause.

Exam trap

The trap here is assuming DISTINCT or a LEFT JOIN will fix duplicate matches, when the real cause is a non-unique join key in the lookup table.

202
MCQmedium

You are deploying a database to a cloud environment and need to ensure that data at rest is encrypted according to organizational security policy. Which deployment configuration ensures transparent encryption of the database files?

A.Implementing Transparent Data Encryption (TDE)
B.Applying column-level encryption
C.Using a Virtual Private Cloud (VPC) endpoint
D.Enabling SSL/TLS on the connection string
AnswerA

Transparent Data Encryption encrypts database files and backups at the page level, with the Database Encryption Key protected by a certificate stored in the master database. This satisfies the policy for data-at-rest encryption without application changes, since SQL Server decrypts data transparently during queries.

Why this answer

Transparent Data Encryption (TDE) encrypts the database files at rest — the data and log files on disk — without requiring changes to the application. It is transparent to the application because encryption and decryption happen at the storage engine level, and it satisfies organizational policies requiring encryption of data at rest. TDE is the standard mechanism for encrypting database files in SQL Server, Oracle, and Azure SQL.

Exam trap

DS0-001 often tests whether candidates confuse encryption at rest with encryption in transit — the trap is selecting SSL/TLS or VPC endpoints, which secure data in transit or network access, instead of TDE, which encrypts the database files on disk.

How to eliminate wrong answers

Option B is wrong because column-level encryption encrypts specific columns' data within the database, not the database files at rest — it protects sensitive fields but does not encrypt the entire database file, and it requires application changes to encrypt/decrypt. Option C is wrong because a VPC endpoint controls network access to cloud services; it secures data in transit and network isolation, not data at rest. Option D is wrong because SSL/TLS on the connection string encrypts data in transit between the client and the database server, not the database files stored on disk.

203
MCQhard

A database administrator is configuring a new SQL Server instance that will host a database with sensitive financial data. The compliance team requires that all data at rest be encrypted, and that the encryption keys be managed by a hardware security module (HSM). Which SQL Server feature should the administrator implement to meet these requirements?

A.Transparent Data Encryption (TDE) with an Extensible Key Management (EKM) provider
B.Always Encrypted with secure enclaves
C.Row-Level Security (RLS) with column encryption
D.Dynamic Data Masking (DDM) with a certificate
AnswerA

TDE encrypts data and log files at rest, and using an EKM provider allows the asymmetric key that protects the Database Encryption Key (DEK) to be stored in an HSM. This satisfies both encryption at rest and HSM key management. TDE with EKM is designed for regulatory compliance scenarios requiring hardware-based key protection. The administrator must configure the EKM provider and create a credential for the HSM.

Why this answer

Transparent Data Encryption (TDE) encrypts the entire database, including data and log files, at rest. When combined with an Extensible Key Management (EKM) provider, the asymmetric key that protects the Database Encryption Key can be stored in a hardware security module (HSM), meeting the compliance requirement for HSM-based key management. Always Encrypted, Row-Level Security, and Dynamic Data Masking do not encrypt all data at rest.

Exam trap

The trap here is assuming that Always Encrypted or column-level encryption satisfies the requirement for all data at rest, when TDE is needed for full database encryption.

204
MCQhard

Which technology provides the best protection against data exfiltration from an on-premises database by a rogue administrator?

A.Database Clustering
B.Database Archiving
C.Database Sharding
D.Database Activity Monitoring (DAM) with Firewall
AnswerD

Database Activity Monitoring inspects and logs all database transactions in real time, including privileged administrator activity, while the firewall component blocks suspicious sessions. Together they detect and prevent exfiltration attempts by a rogue administrator, who bypasses ordinary access controls.

Why this answer

A Database Firewall inspects incoming and outgoing SQL traffic to block unauthorized queries or data exports.

205
MCQmedium

You are a database administrator for a high-traffic e-commerce platform. The order history table has grown to 500 GB and queries filtering on order_date are performing poorly. You need to implement a partitioning strategy that allows you to quickly archive old orders by switching out partitions. Which partitioning approach should you use?

A.List partitioning on the order_status column
B.Hash partitioning on the order_id column
C.Range partitioning on the order_date column
D.Round-robin partitioning across available filegroups
AnswerC

Range partitioning on order_date allows you to define partitions for specific date ranges, such as monthly or yearly. This enables efficient archiving by switching out old partitions, which is a metadata operation. It also improves query performance through partition elimination when filtering on order_date, directly addressing the slow queries.

Why this answer

Range partitioning on the order_date column is the correct approach because it aligns with the query filter and enables efficient archiving through partition switching. It allows the database engine to eliminate irrelevant partitions during queries, improving performance, and provides a simple way to move old data to an archive table by switching out a partition.

Exam trap

The trap here is assuming that any partitioning strategy will improve performance and archiving, but only range partitioning on the filter column supports both partition elimination and partition switching for archiving.

206
Multi-Selectmedium

A database administrator is deploying a new database instance that will store sensitive customer information. The organization must comply with PCI DSS requirements for encryption of data at rest and in transit. Which TWO configurations should the administrator implement to meet these requirements? (Choose two.)

Select 2 answers
A.Configure SSL/TLS for all client connections to the database.
B.Enable database auditing to track all SELECT statements on customer tables.
C.Enable Transparent Data Encryption (TDE) on the database to encrypt data files at rest.
D.Configure the database to use only strong password hashing for authentication.
E.Implement column-level encryption for all columns in the database.
AnswersA, C

SSL/TLS encrypts data in transit between clients and the database server, preventing eavesdropping and man-in-the-middle attacks. PCI DSS requires strong cryptography for data transmission over open networks. Enabling SSL/TLS on the database listener ensures that sensitive customer information is protected while moving across the network.

Why this answer

TDE encrypts data files at rest, and SSL/TLS encrypts data in transit, directly addressing PCI DSS encryption requirements. Column-level encryption for all columns is impractical, auditing does not encrypt data, and password hashing only protects credentials, not the data itself.

Exam trap

The trap here is confusing authentication security, such as password hashing or auditing, with encryption of the data itself, which requires TDE and SSL/TLS.

207
MCQmedium

A database administrator needs to store unstructured data that scales horizontally across multiple servers while maintaining high availability. Which database structure should be selected?

A.Relational (RDBMS)
B.NoSQL (Document Store)
C.Network
D.Hierarchical
AnswerB

NoSQL document stores shard data across nodes using partition keys, satisfying the horizontal scaling and high availability constraints for unstructured content. Unlike relational engines, they avoid rigid schemas and single-node write bottlenecks, letting each server hold independent document subsets with replication for failover.

Why this answer

A NoSQL document store is designed for unstructured or semi-structured data and natively supports horizontal scaling through sharding and replication across commodity servers, delivering high availability via automatic failover. Document stores such as MongoDB or Couchbase store data as flexible JSON-like documents, so schema changes do not require migrations. This combination of schema flexibility, horizontal scale, and built-in replication matches the requirement precisely.

Exam trap

DS0-001 often tests the assumption that 'database' always means relational, catching candidates who overlook that unstructured data plus horizontal scaling plus high availability is the textbook definition of a NoSQL document store.

How to eliminate wrong answers

Option A is wrong because relational databases enforce a fixed schema and typically scale vertically (bigger server) rather than horizontally, making them a poor fit for unstructured data at scale — sharding an RDBMS is possible but complex and not its native strength. Option C is wrong because the network model is a legacy pre-relational structure using pointer-based sets, offers no horizontal scaling or high-availability features, and is effectively obsolete. Option D is wrong because the hierarchical model (e.g., IMS) organises data as a tree with parent-child links, cannot represent many-to-many relationships naturally, and has no native horizontal scaling or HA capability.

208
MCQhard

A financial institution is designing a data governance program. The Chief Data Officer wants to ensure that data quality issues are identified and resolved before data is used in regulatory reporting. The organization has multiple business units that each own their data. Which data governance component should be established to formally assign accountability for data quality and define escalation paths?

A.A master data management (MDM) system that consolidates data into a single golden record.
B.A data quality dashboard that monitors and reports on data quality metrics across business units.
C.A data lineage tool that tracks the flow of data from source to report.
D.A data stewardship program with defined data owners and stewards for each domain.
AnswerD

A data stewardship program assigns clear accountability for data quality to data owners and stewards within each business domain. It establishes roles, responsibilities, and escalation procedures to resolve issues before they impact regulatory reporting. This directly addresses the need for formal accountability across multiple business units and ensures data quality is managed at the source.

Why this answer

Establishing a data stewardship program with data owners and stewards is the correct approach because it formally assigns accountability for data quality to specific roles within each business domain. This structure ensures that issues are identified and resolved by the responsible parties, with clear escalation paths. It aligns with data governance best practices by embedding ownership into the organization and enabling proactive management of data quality before regulatory reporting.

Exam trap

The trap here is confusing technical tools like MDM or dashboards with the governance structure needed to assign accountability and define escalation paths.

209
MCQmedium

Which scenario best justifies the use of a relational database over a NoSQL database?

A.Financial transactions
B.Big data analytics
C.Rapid prototyping
D.Social media feeds
AnswerA

Financial transactions demand ACID guarantees: atomicity, consistency, isolation and durability, enforced through strict schemas and multi-row transactions. A relational engine provides these natively, whereas most NoSQL stores trade full ACID compliance for horizontal scale and flexible schemas.

Why this answer

Financial transactions require strict ACID guarantees — atomicity, consistency, isolation, and durability — which relational databases provide natively through transactions and constraints. NoSQL databases typically relax these guarantees in favor of scalability and availability, making them unsuitable for scenarios where data integrity is paramount.

Exam trap

DS0-001 often tests the ACID-vs-BASE trade-off, and candidates may incorrectly associate relational databases with scalability limits or assume NoSQL is always the modern choice, missing that financial transactions demand strict consistency.

How to eliminate wrong answers

Option B is wrong because big data analytics often involves large volumes of semi-structured or unstructured data where NoSQL or columnar stores excel, and strict relational schemas can be a bottleneck. Option C is wrong because rapid prototyping benefits from the schema flexibility of NoSQL databases, which allow developers to iterate without migrations. Option D is wrong because social media feeds involve high-velocity, denormalized, and often eventually consistent data, which is a classic NoSQL use case.

210
MCQhard

When troubleshooting a performance bottleneck in a visualization, which action is most effective if the data source is a large SQL view?

A.Changing the chart color
B.Materializing the view
C.Increasing the number of filters
D.Using a different visualization software
AnswerB

Materialising the view precomputes and stores the result set, so the visualisation queries a physical table instead of re-executing the underlying joins and aggregations on every refresh. This directly removes the repeated full-view scan that causes the bottleneck, satisfying the large SQL view constraint.

Why this answer

Materializing the view (creating a physical table with indexes) or optimizing the view's underlying query is the most effective way to resolve performance issues.

211
MCQhard

A data analyst is using a window function to rank products by sales within each region. They write: RANK() OVER (PARTITION BY region ORDER BY sales DESC). They notice that products with identical sales receive the same rank, but the next rank is skipped (e.g., 1,2,2,4). They want to assign consecutive ranks without gaps. Which function should they use instead?

A.ROW_NUMBER()
B.PERCENT_RANK()
C.NTILE(4)
D.DENSE_RANK()
AnswerD

DENSE_RANK() assigns ranks without gaps, so ties receive the same rank and the next rank is the next consecutive integer (e.g., 1,2,2,3). This matches the requirement to assign consecutive ranks without gaps. It is specifically designed for this purpose and is the correct choice.

Why this answer

DENSE_RANK() assigns the same rank to tied values and does not skip ranks afterward, producing consecutive integers. RANK() skips ranks after ties, ROW_NUMBER() ignores ties, and NTILE and PERCENT_RANK serve different purposes. DENSE_RANK is the correct function for consecutive ranks without gaps.

Exam trap

The trap here is confusing RANK() with DENSE_RANK(): RANK() leaves gaps after ties, while DENSE_RANK() does not.

212
MCQeasy

An administrator needs to restrict access to a specific S3 bucket so that only the Finance team can view files. Which configuration is the most effective approach?

A.Configure an S3 Bucket Policy
B.Update the VPC Route Table
C.Enable Public Access Block
D.Enable S3 Versioning
AnswerA

An S3 bucket policy is a resource-based IAM policy attached directly to the bucket, letting you grant or deny access by principal, such as the Finance team's IAM role, at the bucket level. This satisfies the constraint of restricting the specific bucket to only Finance members.

Why this answer

An S3 Bucket Policy is a resource-based IAM policy attached directly to the bucket that defines who can access it and under what conditions. By specifying the Finance team's IAM principals and granting only them s3:GetObject permissions, the administrator can effectively restrict access to the bucket.

Exam trap

DS0-001 often tests whether candidates confuse network-level controls (VPC, route tables) with identity and resource-level access controls — the trap is selecting a network or safety feature when the question asks about restricting access to specific users or teams.

How to eliminate wrong answers

Option B is wrong because VPC Route Tables control network traffic routing within a VPC and have no bearing on S3 bucket access permissions — S3 access is governed by IAM and bucket policies, not routing. Option C is wrong because Public Access Block prevents accidental public exposure but does not grant or restrict access to specific teams; it is a safety net, not an access control mechanism. Option D is wrong because S3 Versioning preserves object versions for recovery and compliance, but it does not control who can view or access files.

213
MCQmedium

A database administrator wants to check the current connection count. Which system catalog or dynamic management view would typically provide this information?

A.Information Schema
B.System Tables
C.Dynamic Management Views
D.Audit Logs
AnswerC

Dynamic Management Views, such as sys.dm_exec_sessions and sys.dm_exec_connections, expose live session and connection state on SQL Server. Querying them returns the current connection count directly, unlike static catalogs that describe schema objects rather than runtime activity.

Why this answer

Dynamic Management Views (DMVs) in SQL Server, such as sys.dm_exec_connections and sys.dm_exec_sessions, expose real-time server state including current connection counts, session details, and resource usage. They are the standard mechanism for monitoring live connection activity because they query the running instance's internal state rather than static metadata. This makes DMVs the correct choice for checking current connection count.

Exam trap

DS0-001 often tests the confusion between metadata catalogs (INFORMATION_SCHEMA, system tables) and runtime monitoring views (DMVs) — candidates who don't distinguish static schema metadata from live server state pick the wrong catalog.

How to eliminate wrong answers

Option A is wrong because INFORMATION_SCHEMA views expose metadata about schema objects (tables, columns, constraints) as defined by the SQL standard — they do not report live connection or session counts. Option B is wrong because system tables (e.g., sys.objects, sys.tables) store catalog metadata about database objects, not runtime connection statistics. Option D is wrong because audit logs record historical events (logins, DDL changes) for compliance and forensics — they are not a live counter of current connections.

214
MCQhard

An analyst notices that a database query is performing full table scans even though a WHERE clause is present on a indexed column. What is a likely reason for this?

A.Too many rows match the criteria
B.The table is too small
C.The index is fragmented
D.Using a function on the indexed column
AnswerD

Wrapping the indexed column in a function, such as UPPER(column), prevents the optimiser from using the index because the stored values no longer match the computed expression. The database therefore falls back to a full table scan despite the WHERE clause referencing that column.

Why this answer

When a function is applied to an indexed column in a WHERE clause (e.g., WHERE UPPER(name) = 'SMITH'), the optimizer cannot use the index because the index stores the raw column values, not the function results. This forces a full table scan. The fix is to rewrite the predicate to avoid wrapping the column in a function or to create a function-based/computed-column index.

Exam trap

DS0-001 often tests whether candidates recognize non-sargable predicates, so the trap is assuming fragmentation or statistics are the cause when the real issue is a function wrapped around the indexed column.

How to eliminate wrong answers

Option A is wrong because even if many rows match, the optimizer can still use an index scan or index range scan — a high match count alone does not force a full table scan. Option B is wrong because small tables may legitimately use scans, but the question states the query is performing full scans despite an index, implying a larger table where the index should be used. Option C is wrong because index fragmentation degrades performance but does not prevent the optimizer from choosing the index — it would still perform an index scan, not a full table scan.

215
Multi-Selectmedium

Which THREE of the following are standard SQL join types?

Select 3 answers
A.TOP
B.LEFT
C.SORT
D.INNER
E.FULL
AnswersB, D, E

LEFT preserves all rows from the left table, returning NULLs for unmatched right-side columns. It satisfies the stem's requirement for a standard SQL join type, sitting alongside INNER, RIGHT, FULL OUTER and CROSS in the ANSI specification. Unlike set operators such as UNION, joins combine columns horizontally across related tables.

Why this answer

Option B (LEFT) is correct because LEFT JOIN (or LEFT OUTER JOIN) is a standard SQL join type that returns all rows from the left table plus matching rows from the right table, with NULLs where no match exists. Option D (INNER) is correct because INNER JOIN is the standard join that returns only rows with matching values in both tables based on the join predicate. Option E (FULL) is correct because FULL JOIN (or FULL OUTER JOIN) is a standard SQL join type that returns all rows from both tables, filling unmatched columns with NULLs.

Option A (TOP) is not a join type; it is a row-limiting clause used in T-SQL (e.g., SELECT TOP 10). Option C (SORT) is not a join type either; it is an operation or keyword associated with ordering results, not combining tables.

Exam trap

DS0-001 often tests SQL join types, and the trap is confusing join types with other SQL clauses like TOP or SORT, which are not joins at all.

216
Multi-Selecthard

Which TWO of the following are potential issues when denormalizing a database?

Select 2 answers
A.Data anomalies
B.Simplified data entry
C.Improved schema flexibility
D.Slower join performance
E.Increased storage usage
AnswersA, E

Denormalisation duplicates data across tables, so a single logical fact is stored in multiple places. When one copy is updated but others are not, insert, update and delete anomalies arise, producing inconsistent query results. This directly satisfies the stem's requirement to identify a genuine drawback of denormalising, unlike performance gains.

Why this answer

Denormalization intentionally duplicates data across tables to reduce joins, and this redundancy creates data anomalies (Option A): if a duplicated value is updated in one place but not another, the database can end up with inconsistent or conflicting records, violating update/insert/delete consistency. Denormalization also increases storage usage (Option E) because the same data is stored in multiple tables or columns, and additional indexes or summary columns may be added, consuming more disk space than a normalized design. The unmarked options do not belong because simplified data entry (B) and improved schema flexibility (C) are generally benefits rather than issues, and slower join performance (D) is incorrect since denormalization typically reduces the number of joins and can improve read performance.

Exam trap

DS0-001 often tests whether candidates can separate denormalization's benefits (fewer joins, faster reads) from its costs (anomalies, storage), so the trap is selecting 'slower join performance' because denormalization is associated with performance trade-offs.

217
MCQhard

A data analyst is building a monthly customer churn report. The churn definition is: a customer is churned in month M if they had at least one transaction in month M-3 but zero transactions in months M-2, M-1, and M. Which SQL approach correctly identifies churned customers for each month without missing customers who simply had no activity at all?

A.Build a calendar spine of months, LEFT JOIN customers and their transactions to it, then use conditional aggregation to detect the required activity pattern.
B.Use the LAG window function on transaction dates and filter where the lag is greater than 90 days.
C.Use an INNER JOIN between the transactions table and itself on customer_id and month offsets, filtering for rows where the offset months are NULL.
D.Use a correlated subquery with NOT EXISTS to find customers whose most recent transaction is older than three months.
AnswerA

A calendar spine guarantees every month appears for every customer, and LEFT JOIN preserves customers with no transactions. Conditional aggregation can then count transactions in M-3 and confirm zero in M-2, M-1, and M, correctly identifying churn even when no rows exist. This approach explicitly handles absent activity, which the definition requires.

Why this answer

Churn here is defined by presence in one month and absence in the following three, which requires representing months with no activity. A calendar spine joined to customers ensures every month is present, and LEFT JOIN to transactions keeps zero-activity months visible. Conditional aggregation then tests the exact pattern, avoiding the false negatives that inner joins and existence checks would create.

Exam trap

The trap here is using NOT EXISTS or LAG to detect inactivity, which conflates general gaps with the specific calendar pattern of one qualifying transaction followed by three silent months.

218
MCQeasy

A database administrator needs to grant a new analyst read-only access to a specific table named 'SalesData' in a PostgreSQL database. The analyst should be able to query the table but not modify it. Which SQL statement should the administrator execute?

A.GRANT USAGE ON SalesData TO analyst;
B.GRANT ALL PRIVILEGES ON SalesData TO analyst;
C.GRANT READ ON SalesData TO analyst;
D.GRANT SELECT ON SalesData TO analyst;
AnswerD

GRANT SELECT ON SalesData TO analyst; provides the analyst with the privilege to run SELECT queries against the SalesData table. It does not grant INSERT, UPDATE, or DELETE privileges, so the analyst cannot modify data. This is the standard SQL statement for granting read-only access to a specific table in PostgreSQL and most other relational databases, directly fulfilling the requirement.

Why this answer

The GRANT SELECT statement is the correct way to provide read-only access to a table in PostgreSQL. It allows the analyst to query the table without granting modification rights. Other options either grant excessive privileges (ALL PRIVILEGES), use invalid privilege types (USAGE, READ), or fail to meet the requirement.

This aligns with the principle of least privilege.

Exam trap

The trap here is assuming that GRANT USAGE or GRANT READ works on tables, when in fact PostgreSQL uses SELECT for table read access.

219
MCQeasy

A database administrator needs to grant a user the ability to retrieve data from a specific table but must prevent the user from modifying or deleting any data. Which SQL statement should the administrator execute?

A.GRANT SELECT ON table_name TO user_name;
B.GRANT REFERENCES ON table_name TO user_name;
C.GRANT ALL PRIVILEGES ON table_name TO user_name;
D.GRANT INSERT, UPDATE, DELETE ON table_name TO user_name;
AnswerA

GRANT SELECT provides read-only access to the specified table. It allows the user to query data without granting INSERT, UPDATE, or DELETE privileges. This precisely meets the requirement of retrieving data while preventing modifications, following the principle of least privilege.

Why this answer

The correct statement is GRANT SELECT, which provides read-only access. It satisfies the need to retrieve data while ensuring the user cannot modify or delete records. Other options either grant excessive privileges or do not grant the necessary read access.

Exam trap

The trap here is confusing the REFERENCES privilege with read access, or assuming that ALL PRIVILEGES is necessary for a simple SELECT.

220
MCQmedium

A database administrator is designing a backup strategy for a 2 TB OLTP database that must support point-in-time recovery with a maximum data loss window of 15 minutes. Full backups complete in 4 hours, and the transaction log is backed up every 10 minutes. What is the most appropriate recovery model for this database?

A.Full recovery model
B.Bulk-logged recovery model
C.Simple recovery model
D.Model recovery model
AnswerA

The full recovery model allows transaction log backups, enabling point-in-time recovery and minimizing data loss. With log backups every 10 minutes, the maximum data loss is 10 minutes, which satisfies the 15-minute requirement. This model is standard for OLTP databases where data loss must be minimized. It supports all restore options, including restoring to a specific point in time.

Why this answer

The full recovery model is necessary to support transaction log backups and point-in-time recovery. With log backups every 10 minutes, the maximum data loss is 10 minutes, meeting the 15-minute requirement. The simple recovery model does not allow log backups, and bulk-logged recovery may not guarantee point-in-time recovery after bulk operations.

The model database is not a recovery model for user databases.

Exam trap

The trap here is confusing the bulk-logged recovery model with full recovery, assuming that minimal logging still provides point-in-time recovery without limitations.

221
MCQmedium

When normalizing a database, what is the primary goal of moving data into a third normal form (3NF)?

A.Remove transitive dependencies
B.Enable multi-dimensional analysis
C.Increase data redundancy
D.Increase read speed
E.Combine multiple tables
AnswerA

Third normal form eliminates transitive dependencies, where a non-key attribute depends on another non-key attribute rather than the primary key. Achieving 3NF therefore requires every non-key column to depend solely on the key, satisfying the stem's stated goal of removing those indirect relationships.

Why this answer

Third normal form (3NF) builds on 2NF by eliminating transitive dependencies — non-key attributes that depend on other non-key attributes rather than directly on the primary key. The rule is that every non-key column must depend on 'the key, the whole key, and nothing but the key.' Removing transitive dependencies prevents update anomalies where changing one fact forces changes in unrelated rows, ensuring each fact is stored in exactly one place.

Exam trap

DS0-001 often tests the distinction between normalization goals (removing transitive dependencies in 3NF) and denormalization benefits (read speed, redundancy), so candidates who confuse the two pick D or C.

How to eliminate wrong answers

Option B is wrong because multi-dimensional analysis is the goal of dimensional modeling (star/snowflake schemas), not 3NF — 3NF is actually normalized away from dimensional structures. Option C is wrong because normalization specifically reduces redundancy, not increases it; increasing redundancy is a denormalization tactic. Option D is wrong because 3NF typically reduces read speed due to additional joins; denormalization is used to improve read performance.

Option E is wrong because normalization splits tables apart to remove redundancy, whereas combining tables is a denormalization step that reintroduces it.

222
MCQmedium

A database administrator is deploying a new PostgreSQL 15 instance that will store customer PII. The security policy requires that all data at rest be encrypted, and the platform team wants encryption tied to the host's Trusted Platform Module without managing passphrases. Which deployment approach best satisfies this requirement?

A.Set the ssl=on and ssl_cert_file parameters in postgresql.conf so that client connections and stored data are both encrypted.
B.Rely on the operating system's full-disk encryption configured with TPM-backed key sealing, and leave PostgreSQL's own storage unencrypted.
C.Enable the pgcrypto extension and encrypt individual PII columns with pgp_sym_encrypt using a key stored in the application config.
D.Configure data_checksums=on during initdb so that every page is checksummed and therefore protected against unauthorized reads.
AnswerB

Sealing the volume encryption key to the host TPM means the disk is transparently decrypted at boot without an operator-supplied passphrase, and PostgreSQL's data directory, WAL, and temporary files all reside inside that encrypted volume. This satisfies the blanket data-at-rest requirement while removing passphrase management, which is exactly what the platform team requested.

Why this answer

Storing PII at rest requires confidentiality for every byte the database writes, including WAL, temporary files, and indexes. TPM-sealed full-disk encryption delivers that transparently and removes the operational burden of passphrase entry, because the key is unsealed only by the specific host. Application-layer column encryption and TLS protect narrower scopes, and checksums address integrity rather than secrecy.

Exam trap

The trap here is assuming that TLS or column-level encryption satisfies a data-at-rest requirement, when only storage-level encryption covers every file the database writes.

223
MCQhard

A data architect is designing a schema for a system that must store highly variable product attributes across thousands of categories, where each category has a different set of attributes and the schema must evolve frequently without downtime. Which database structure is best suited for this requirement?

A.A relational table with a fixed set of columns for all possible attributes
B.A normalized relational schema with an entity-attribute-value table
C.A document-oriented NoSQL store with a flexible schema per product
D.A star schema with a dimension table per attribute
AnswerC

A document-oriented store allows each product document to contain its own set of attributes, so categories with different attributes are represented naturally without schema migrations. This flexibility supports frequent evolution and avoids downtime, matching the requirement for highly variable product attributes across thousands of categories.

Why this answer

A document-oriented NoSQL store handles variable attributes per product without schema migrations, directly supporting frequent evolution and avoiding downtime. Fixed-column tables, attribute-per-dimension star schemas, and entity-attribute-value designs either require schema changes or introduce query complexity and performance issues.

Exam trap

The trap here is assuming that any schema-flexible relational pattern, such as entity-attribute-value, is equivalent to a document store, when its query and performance characteristics differ significantly.

224
MCQmedium

A data engineer is profiling a customer table and notices that the Email column contains several NULL values, duplicate addresses, and inconsistent formatting such as mixed uppercase and lowercase characters. The engineer wants to quantify how many rows have a NULL Email before deciding on a cleansing strategy. Which SQL expression should be used to return that count?

A.SELECT COUNT(*) FROM Customer WHERE Email = NULL;
B.SELECT COUNT(*) FROM Customer WHERE Email IS NULL;
C.SELECT COUNT(Email) FROM Customer WHERE Email IS NULL;
D.SELECT COUNT(Email) FROM Customer;
AnswerB

This query counts all rows where the Email column has no value, which is exactly the metric the engineer needs before choosing a cleansing approach. The IS NULL predicate is the only standard way to test for missing values reliably, and COUNT(*) includes rows regardless of other column values, giving an accurate total of missing emails.

Why this answer

Missing values are detected with the IS NULL predicate, and the number of such rows is obtained with COUNT(*), which counts rows regardless of column contents. COUNT(Email) would exclude NULLs and return zero when combined with the IS NULL filter. Therefore, counting all rows where Email IS NULL gives the accurate count of missing email addresses needed for data profiling.

Exam trap

The trap here is using COUNT(Email) with an IS NULL filter, which returns zero because COUNT of a column skips NULL values.

225
MCQhard

You are debugging a SQL query that uses an aggregate function. You receive an error stating that a column in your SELECT list is not part of an aggregate or a GROUP BY clause. What is the cause?

A.Missing WHERE clause
B.Incorrect join type
C.Missing column in GROUP BY
D.Using an alias in WHERE
AnswerC

Aggregate queries collapse rows, so every non-aggregated SELECT column must appear in GROUP BY to define grouping keys. The named column is absent from that clause, leaving the engine unable to determine which value to return per group.

Why this answer

SQL requires that every column in the SELECT list be either aggregated (e.g., SUM, COUNT, AVG) or included in the GROUP BY clause when aggregation is used. The error 'column is not part of an aggregate or GROUP BY' means a non-aggregated column was selected without being listed in GROUP BY, so the engine cannot determine which value to return per group.

Exam trap

DS0-001 often tests whether candidates can distinguish the aggregate/GROUP BY error from other common SQL errors like alias misuse in WHERE or join mistakes, which are plausible but technically incorrect distractors.

How to eliminate wrong answers

Option A is wrong because a missing WHERE clause would simply return more rows — it does not cause an aggregate/GROUP BY validation error. Option B is wrong because an incorrect join type affects which rows are combined, not whether SELECT columns satisfy aggregate rules. Option D is wrong because using an alias in WHERE causes an 'invalid column name' or 'unknown column' error, not the aggregate/GROUP BY error described.

Page 2

Page 3 of 5

Page 4

All pages