Introduces SQL DDL as a sublanguage of SQL responsible for defining database structure, distinguishing it from other SQL sublanguages, and giving learners a conceptual foundation before studying individual DDL commands.
Topics
This module covers 7 topics. Open a topic to see its subtopics.
Module Content
17 items.
-
-
Explains the CREATE statement's syntax and purpose for building database objects such as tables, giving learners a reference for writing and understanding CREATE commands within the broader DDL context.
-
Covers the major SQL data types (numeric, character, date/time, etc.) and how to define columns with appropriate types, helping learners make informed design decisions when creating or modifying tables.
-
Describes the SQL constraint types—such as PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE, and CHECK—explaining how each enforces data integrity rules at the database level so learners can apply them when defining or altering tables.
-
Explains the ALTER TABLE command and its operations (adding, modifying, or dropping columns and constraints), giving learners the knowledge to safely modify an existing table's structure as requirements change.
-
Compares the DROP and TRUNCATE commands, clarifying that DROP removes a table and its structure entirely while TRUNCATE deletes all rows but preserves the structure, helping learners choose the correct command for a given scenario.
-
Explains what a database schema is, how it acts as a named namespace to logically group related objects, and how to create, use, and manage schemas, helping learners organise objects in larger, more complex databases.
-
Explains what a database schema is, how it acts as a named namespace to logically group related objects, and how to create, use, and manage schemas, helping learners organise objects in larger, more complex databases.
-
An overview reading that positions DDL within the wider SQL family and introduces the CREATE, ALTER, DROP, and TRUNCATE commands used to define tables, columns, data types, constraints, indexes, views, and schemas, giving learners the conceptual framing for the rest of the module.
-
A lesson page on the CREATE statement that walks through the database object hierarchy from the outside in — creating a database, organizing objects into schemas, and defining individual tables and columns — for learners practicing their first DDL statements.
-
A reference-style reading covering SQL column data types, including numeric (INT, DECIMAL, FLOAT), character (CHAR, VARCHAR, TEXT), date/time (DATE, TIME, TIMESTAMP), and boolean/binary types, to help learners choose appropriate types when defining columns.
-
A lesson explaining table constraints — PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE, CHECK, and DEFAULT — and how they let the database itself enforce data integrity and valid relationships between tables.
-
A reading on the ALTER TABLE command showing how to modify an existing schema by adding, renaming, or dropping columns, changing data types and sizes, and adding or removing constraints as application requirements evolve.
-
A lesson contrasting the DROP and TRUNCATE commands, explaining how DROP permanently removes database objects such as tables, views, and schemas while TRUNCATE empties a table's rows, along with the risks of each.
-
A reading on database schemas as named logical containers that group related tables, views, and indexes, covering how to create schemas, qualify object names, and use them to organize objects by business area.
-
The consolidated module page that compiles all topics on SQL DDL — introduction, CREATE, data types, constraints, ALTER, DROP/TRUNCATE, and schemas — into a single document for continuous reading or review.
-
A timed, game-style interactive activity in which learners race a "Query Bot" (at easy, normal, or hard typing speeds) to correctly write ten SQL statements, earning points for beating the bot and generating a named result sheet — useful for drilling DDL syntax fluency under time pressure and for submitting evidence of practice.