?
Solved

What is DDL and DML? Why Do We Need Them? SQL - Relational Database Managment System

Posted on 2009-05-14
6
Medium Priority
?
1,160 Views
Last Modified: 2012-05-07
I'm new to SQL RDBMS, so this question might sound cheesy. Why do we need DDL and DML! Do they always come together? Can't i use DDL without DML and vice versa? Why? Are they two different set of languages?
0
Comment
Question by:F-J-K
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 1600 total points
ID: 24392330
DDL = data definition language -   the set of commands for creating, altering and dropping tables, indexes, views, triggers, etc.  The language of the "structure" of a database
DML= data manipulation language - the set of command for manipulating the data.  insert, select, update, delete, etc.  The language of the "actions" on a database.

So...
 yes, you need both.  Can't run DML unless you have tables,  and tables that never have DML against them are useless.
Yes they always come together.

They are two pieces of the same language of for each db vendor/version.

You could also have a theoretical debate about DML not "strictly" being SQL  since it's structural and not data related.
But I'll leave that debate to others as it's not really all that interesting on either side of the argument
0
 
LVL 7

Expert Comment

by:meispisces
ID: 24393589
Refer below link

http://cs.scu.edu.cn/~zuojie/oracle/appdev.101/b10795/adfns_dy.htm

The examples used in the link are quite tough for you to understand, but it would definitely make your SQL concepts very clear

these commands work in: SQL Server & even Oracle database

Also Refer http://searchoracle.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid41_gci1235584,00.html

Hope it helped you!

Still any doubts let me know

thanks
 
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 22

Assisted Solution

by:dportas
dportas earned 400 total points
ID: 24395908
DDL (Data Definition Language) and DML (Data Manipulation Language) refer to different parts of the SQL language. Both are part of the ISO SQL standard for the SQL language.

Since you are new to SQL you may be surprised to learn that SQL is not really a relational language and SQL DBMSs are not true RDBMSs even though the term "relational" is often used loosely to refer to both SQL concepts and relational concepts. SQL DDL is what is used to create tables and views. If you are familiar with the relational model you can think of SQL tables and views as the approximate equivalent of relation variables and DML as the approximate equivalent of the relational algebra and calculus. As with other languages, it's hard to do anything very useful without creating a variable. So the answer to your question is that you generally will need both DML and DDL.
0
 
LVL 1

Author Closing Comment

by:F-J-K
ID: 31581796
It Helped
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 24402260
glad we could help
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question