Counting data modification operations:\nEvaluate the claim:\n\n"There are three SQL data modification operations: insert, modify, and delete."

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
The classic SQL DML (Data Manipulation Language) operations are INSERT, UPDATE, and DELETE. The question uses the word “modify” to refer to UPDATE, which is the standard term. Understanding this trio is foundational to writing transactional applications.


Given Data / Assumptions:

  • Baseline SQL without considering vendor-specific statements like MERGE/UPSERT.
  • Focus is on row-level changes to existing tables.


Concept / Approach:
INSERT adds new rows; UPDATE modifies existing rows; DELETE removes rows. Many vendors also implement MERGE (or INSERT ... ON CONFLICT/REPLACE variants) to combine insert/update logic, but these are built upon the same fundamental operations. Therefore, describing “three data modification operations” is pedagogically correct.


Step-by-Step Solution:

INSERT INTO t (...) VALUES (...); — create new rows.UPDATE t SET col = value WHERE ...; — change existing rows.DELETE FROM t WHERE ...; — remove rows.MERGE and UPSERT patterns conceptually orchestrate these basics.


Verification / Alternative check:
SQL documentation and reference cards universally present INSERT/UPDATE/DELETE as the primary DML trio.


Why Other Options Are Wrong:

  • Incorrect: Ignores the accepted trio.
  • Only correct if MERGE is excluded: MERGE is an additional convenience; it does not negate the foundational three.
  • OLTP vs. OLAP: DML applies in both contexts.
  • Isolation level: Affects concurrency behavior, not the count of DML verbs.


Common Pitfalls:
Confusing TRUNCATE (bulk delete semantics) with the core DML triad; assuming MERGE is fundamental rather than syntactic sugar around inserts/updates/deletes.


Final Answer:
Correct

More Questions from SQL for Database Construction

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion