DS0-001 · Question #97
DS0-001 Question #97: Real Exam Question with Answer & Explanation
The correct answer is C: Add a check constraint to the column and change it to int.. Option C is correct because changing the column to INT enforces the right data type at the storage level, while adding a CHECK constraint provides an additional layer of validation to reject any future invalid entries - together, these two steps represent a complete, proactive da
Question
Given the following value from a VARCHAR column that is used to store integer values: 12A Which of the following is the best way for a DBA to increase the data quality for this column?
Options
- AKeep the value and change the column to integer.
- BCorrect the value and change it to integer.
- CAdd a check constraint to the column and change it to int.
- DKeep the column as VARCHAR and correct the value.
Explanation
Option C is correct because changing the column to INT enforces the right data type at the storage level, while adding a CHECK constraint provides an additional layer of validation to reject any future invalid entries - together, these two steps represent a complete, proactive data quality solution. Option A fails because you cannot change a column containing '12A' directly to INT without first correcting the bad value, and it also skips adding any future-proofing constraint. Option B partially works (fixing the bad value and converting to INT), but without a constraint, nothing prevents new non-integer values from being inserted later. Option D only fixes the symptom (the bad value) while leaving the door open for recurring problems, since VARCHAR imposes no numeric validation. Memory tip: Think "fix + prevent" - the best data quality answer always both corrects existing data and adds a mechanism to prevent future bad data; only option C does both.
Community Discussion
No community discussion yet for this question.