Difference Between Data Definition Language (DDL) and Data Manipulation Language (DML)

When working with Structured Query Language (SQL), Data Definition Language (DDL) and Data Manipulation Language (DML) are two subcategories of SQL that have two distinct purposes.

DDL is used to change the structure of the database. It’s a set of commands used to create, modify, delete data structure but not data (Lithmee, 2017). Think of it as setting the rules for defining how your data is going to be stored. For example, a database designer can use DDL to create database objects (tables, indexes, views etc.) and define the access rights to those objects (Coronel, Morris, & Rob, 2010). Here are some examples of DDL commands:

DML is used to manage the data in the database. It’s a set of commands used to add, remove, modify or retrieve data (Lithmee, 2017). Think of it as once we have defined how data is stored (DDL), DML is how we interact with the data. For example, a database user can use DML to insert, delete, update, and retrieve data inside of a database (Coronel, Morris, & Rob, 2010).

The easy way to remember the difference between the two is that if it affects your scheme and the database structure it is DDL. If modifies your content (the rows) then it is DML.

References:

Lithmee. (2017, December 30). Difference between DDL and DML. Retrieved from https://www.differencebetween.com/difference-between-ddl-and-vs-dml/

Coronel, C., Morris, S., & Rob, P. (2010). Database systems: design, implementation, and management. (9th ed.). Boston: Cengage Learning, Inc.

Author: Dru Macasieb

Hi, I'm Dru. I am a a life-long learner, educator, web designer, and entreprenur. I am a US Army veteran, business professional, and I currently work in higher education. Academically, I have holds a BA in Liberal Studies, BS in Web Design and Development, an MBA, and MA in Organizational Leadership. He is currently facinated with AWS, UX/UI, and Dropshipping.

Leave a Reply. You know you want to...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s