aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer ScienceTopic 3.3SQL language types
Back to Computer Science Topics
3.3.13 min read

SQL language types

IB Computer Science • Unit 3

AI-powered feedback

Stop guessing — know where you lost marks

Get instant, examiner-style feedback on every answer. See exactly how to improve and what the markscheme expects.

Try It Free

Contents

  • Two jobs, one language
  • DDL — defining the structure
  • DML — working with the data
  • Exam-style question
The big idea: SQL does two quite different things, and the exam names them separately.

DDL builds the containers — the tables and columns themselves. DML puts things into those containers and takes them out again.
The test: Ask: does this statement change the shape of the database, or its contents?

Shape is DDL. Contents is DML.

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime
Data definition language: DDL statements create, change and remove the structures that hold data — tables, columns, keys, indexes.

They are run rarely: when the database is first built, and when its design genuinely changes.

CREATE

  • Makes a new table, with its columns and types
  • Where PRIMARY KEY and FOREIGN KEY are declared
  • Also used for indexes and whole databases

ALTER

  • Changes an existing structure
  • Adds, removes or changes a column
  • Slow and disruptive on a table with millions of rows

DROP

  • Removes a table, and everything in it
  • Not the same as deleting rows — the table itself is gone
  • There is no undo

Stop wasting time on topics you know

Our AI identifies your weak areas and focuses your study time where it matters. No more overstudying easy topics.

Try Smart Study FreeYour first topic is free to keep • No credit card required
Data manipulation language: DML statements read and change the rows inside tables that already exist.

These are the statements a running application uses, thousands of times a day.
DELETE and DROP are not the same: DELETE removes rows; the table stays, ready for more.

DROP removes the table itself, with its structure and all its data. Confusing them is the most expensive mistake in this topic.
Who runs which: DDL is usually run by a database administrator, occasionally, under supervision.

DML is run by the application, constantly. That difference is often what a question is really about.

How this is tested — you must classify a statement and say what it acts on — structure or rows. It comes up two ways:

Paper 1 Section A

  • Outline the difference between DDL and DML, 2-3 marks
  • Classify given SQL statements
  • Name a statement belonging to each

Paper 1 Section B — case study

  • Identify the SQL the case study would need
  • Say who would run each kind, and when
The classic trap: Putting DELETE with DROP because both remove things. DELETE is DML — it removes rows from a table that stays. DROP is DDL and removes the table itself.
IB-style questionOutline[4 marks]

Outline the difference between DDL and DML, giving two examples of each and saying who would typically run them.

Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on SQL language types. Write your answer and get instant AI feedback — just like a real IB examiner.

how many rows are returned by selecting the distinct class codes from a table of 800 students spread across 32 classes. [2 marks]

Related Computer Science Topics

Continue learning with these related topics from the same unit:

3.1.1Relational databases
3.2.1Database schemas
3.2.2ERDs
3.2.3Data types
View all Computer Science topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Computer Science

Previous
3.2.7Denormalisation
Next
Joining two tables3.3.2

20 questions to test your understanding

Reading is just the start. Students who tested themselves scored 82% on average — try IB-style questions with AI feedback.

Start FreeView All Computer Science Topics