Practice Flashcards
Flip to reveal answersWhat is the difference between DDL and DML?
Track your progress — Sign up free to save your progress and get smart review reminders based on spaced repetition.
All 5 Flashcards — SQL language types
Sign up free to track progress and get spaced-repetition review schedules.
Question
What is the difference between DDL and DML?
Answer
DDL, data definition language, changes the structure of the database — tables, columns, keys. DML, data manipulation language, reads and changes the rows inside tables that already exist. The test is shape versus contents.
Question
Name the main DDL statements and what each does.
Answer
CREATE makes a new table with its columns, types and keys; ALTER changes an existing structure, such as adding a column; DROP removes a table entirely, along with everything in it.
Question
Name the main DML statements and what each does.
Answer
SELECT reads rows matching a condition; INSERT INTO adds a new row; UPDATE SET changes values in existing rows; DELETE removes rows from a table.
Question
What is the difference between DELETE and DROP?
Answer
DELETE removes rows and the table stays, ready for more data — it is DML. DROP removes the table itself, with its structure and all its contents — it is DDL.
Question
Who runs DDL and who runs DML?
Answer
DDL is run rarely, by a database administrator, when the design genuinely changes. DML is run constantly, by the application, every time somebody uses the system.
Read the notes
Full study notes for SQL language types
Topic 3.3 hub
Database programming
More from Topic 3.3
All flashcards in this topic
Computer Science exam skills
Paper structures & tips
Track your progress with spaced repetition
Sign up free — Aimnova tells you exactly which cards to review and when, so you remember everything before your IB exam.
Start Free