
CompTIADataSys+
Domain 1Objective 2
SQL Code Development DS0-001 Practice Questions (Page 2)
Part of the Database fundamentals domain, which accounts for 24% of the DS0-001 exam. CompTIA does not publish an official question count, but from its 90-minute exam (~35–60 total, ~8–14 in this domain), expect 2–4 from this objective — we provide 22 practice questions to prepare you well beyond it. (estimate)
22questions here
5free pages
6concepts
24%of the exam
Questions 6–10
- 6
A company has a stored procedure that processes payroll. The procedure reads employee data, calculates salaries, and updates the `payments` table. Recently, the procedure has been failing intermittently due to deadlocks. The DBA wants to reduce the likelihood of deadlocks without changing the business logic. Which approach is most effective?
Select an answer first - 7
A logistics company has a frequently executed process that inserts a new shipment record, updates the inventory count, and logs the action to an audit table. The application team wants to ensure these three operations always run together and that the SQL logic is maintained in one place rather than in application code. What should they implement?
Select an answer first - 8
A university database has a `students` table with columns `student_id`, `first_name`, `last_name`, and `enrollment_date`. The registrar's office needs to add a new column `email` to store student email addresses. They also want to ensure that the `email` column cannot contain NULL values. Which DDL command should be used?
Select an answer first - 9
A transaction transfers funds between two bank accounts. If the transaction fails halfway through, the database must ensure that neither account is left with a partial update. Which ACID property guarantees that the transaction is treated as a single, indivisible unit?
Select an answer first - 10
A banking application transfers funds between two accounts. The code performs an UPDATE to debit account A, then an UPDATE to credit account B. A junior developer suggests wrapping these in a transaction with COMMIT at the end. However, the application must ensure that if the credit to account B fails due to a constraint violation, the debit to account A is also rolled back. Which additional TCL command must be included to guarantee this behavior?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by CompTIA. “DS0-001” is a trademark of its owner, used for identification only.