Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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,165 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

604 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