9 - SQL Data Definition Language (DDL) — Topics & Learning Outcomes

📋 Module Topics🎯 Student Learning Outcomes

Module Topics

Introduction to SQL DDL

Overview of Data Definition Language and its role in database management. Students learn how DDL differs from other SQL sublanguages and why it is essential for defining database structures.

The CREATE Command

Covers how to use the CREATE statement to build new databases, schemas, and tables. Students practice defining table structures with appropriate column names and data types.

Data Types and Column Definitions

Explores the common SQL data types used when defining table columns, such as integers, strings, dates, and decimals. Students learn how to choose appropriate data types to ensure data integrity and storage efficiency.

Constraints in SQL

Introduces key constraints including PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE, and DEFAULT that enforce rules on table data. Students apply constraints during table creation to maintain data accuracy and relational integrity.

The ALTER Command

Explains how to modify existing database structures using ALTER TABLE to add, modify, or drop columns and constraints. Students practice evolving table designs without losing existing data.

The DROP and TRUNCATE Commands

Covers the DROP command for permanently removing database objects and TRUNCATE for quickly clearing all rows from a table. Students learn the differences, use cases, and risks associated with each command.

Working with Schemas

Introduces database schemas as logical containers for organizing related tables and objects. Students learn how to create and manage schemas to structure a database effectively.

Student Learning Outcomes

By the end of this module, students will be able to:

MO1
Distinguish DDL from other SQL sublanguages by classifying each sublanguage according to its purpose in database management
Level: UnderstandType: CognitiveCourse mapping: —
MO2
Construct CREATE TABLE statements that include appropriate column names, data types, and constraints to define a relational table structure
Level: ApplyType: CognitiveCourse mapping: —
MO3
Apply PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE, and DEFAULT constraints to enforce data integrity rules within a database schema
Level: ApplyType: CognitiveCourse mapping: —
MO4
Modify an existing table structure using ALTER TABLE to add, change, or remove columns and constraints without deleting existing data
Level: ApplyType: BehavioralCourse mapping: —
MO5
Differentiate between the DROP, TRUNCATE, and DELETE commands by comparing their effects on database objects and data to select the appropriate command for a given scenario
Level: AnalyzeType: CognitiveCourse mapping: —

Course Outcomes (reference)

CO1Analyze a problem and identify computing and user requirements to implement the proper solution capturing the impact of the implementation on the local and the global levels.
CO2Design, normalize, and implement database systems
CO3Develop the ability to manipulate databases using database management tools, techniques and their computer skills.
CO4Recognize professional, ethical, and legal issues associated with database and database management.