One language to define, another to touch — DDL and DML
A DBMS speaks two distinct sub-languages, has distinct kinds of users with distinct responsibilities, and has its own internal software structure — all of which becomes concrete once you meet SQL in Unit 3.
After this lesson
You should be able to
- Distinguish DDL (defining structure) from DML (touching data) with an example of each.
- List the distinct categories of database users and what each one is responsible for.
DDL builds the shape, DML moves the data
The Data Definition Language (DDL) is used to define schema — creating a table, adding a column, setting a rule like "roll number cannot repeat." This is a one-time, structural act, similar to writing a struct definition in C: you do it once, and the shape stays until you deliberately change it.
The Data Manipulation Language (DML) is used to touch the actual data inside that shape — inserting a new student row, updating a fee status, deleting a graduated student, or retrieving rows that match a condition. This happens constantly, the moment any application runs. SQL, which Unit 3 covers in full, is actually both a DDL and a DML combined into one language.
Not everyone who touches a database has the same job
Naive users interact through pre-written applications — a student checking a fee status on a portal never sees SQL. Application programmers write those applications, embedding DML calls inside general-purpose code, the same way you would embed a search-function call inside a larger C program. Sophisticated users write queries directly, without an application in between — someone doing data analysis. Specialized users build custom database applications beyond traditional data processing.
The Database Administrator (DBA) has central control over the entire system — defining schema, granting authorization, monitoring performance, and handling backup and recovery. One more layer sits underneath all of this: transaction management, which guarantees a group of DML operations either all happen or none do, and database system structure, the internal modules (query processor, storage manager) that make all of the above actually work. Both get their own full unit — transactions in Unit 4, storage structure in Unit 5.
Try it yourself
For a college database, name one action a DBA would take, one a naive user would take, and one an application programmer would take, using the vocabulary from this lesson.
Need a hint?
The DBA's action changes the system itself; the naive user's action happens through an app they did not write; the programmer's action is writing the code behind that app.
Check the worked solution
A DBA might grant a new staff member read access to the fee table (schema-level, authorization). A naive user checks their own attendance percentage on the student portal, with no SQL knowledge required. An application programmer writes the code behind that portal, including the DML query that fetches the attendance rows.
Quick check
A staff member runs "ALTER TABLE Student ADD phone_number VARCHAR(10)" to add a new column. Which language category is this, and why?
Why this lesson exists
Syllabus mapping
Database Languages, DDL, DML, Database Access for applications programs · Database Users and Administrator, Transaction Management, Database System Structure
Maps to course outcome CO1.