§ — — Database Administration
A DBA must know SQL not only for querying data, but also for controlling database structures.
Three categories are especially important:
| Category | Meaning | Common commands |
|---|---|---|
| DDL | Data Definition Language | CREATE, ALTER, DROP |
| DML | Data Manipulation Language | INSERT, UPDATE, DELETE, SELECT |
| TCL | Transaction Control Language | COMMIT, ROLLBACK, SAVEPOINT |
For database administration, DDL is central because schema changes affect the whole system. Creating a table is easy in class. In production, it requires more care:
A careless ALTER TABLE can break reports, increase downtime, or invalidate application code. That is why DBAs prefer controlled changes, documented versions, and test validation before production release.
Schema objects help organize logic and control access.
A view is a saved query presented like a table. Views are useful when:
Example idea: a cashier may need student balances, but not confidential profile details.
Depending on the DBMS, you may create stored procedures or functions. These package SQL logic on the server side. DBAs care about them because they affect:
A trigger runs automatically when an event occurs, such as an insert or update. Triggers can support:
But triggers should be used carefully. Hidden automatic behavior can make systems harder to debug. A DBA should ask whether the logic is truly best placed in the database.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
Done with this module? Track it — your progress shows on the subject list.
Up next
Lesson 5: Transactions, Concurrency Control, and Recovery Basics→←Previous: Lesson 3: Physical Storage, File Organization, and Indexing