What’s the difference between a data definition language (DDL) and a query language?
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I assume that you mean SQL in this question. SQL stands for “Structured Query Language,” which implies (erroneously) that the language can be used only for querying. Of course, it CAN be used for querying – but it can also be used to create database components.
So SQL is split into sections, one of which is the query language. As the name implies, this part of SQL is for writing queries – for example:
SELECT EmployeeNo, FirstName, LastName, DateOfBirth, DateEmployed
WHERE EmployeeNo = 2;
The data definition language (also known as the data descriptive language) is composed of statements that can be used to create, or modify, components of a database, such as its tables. For example:
CREATE TABLE [dbo].[tblDataSheet](
[SheetID] [int] IDENTITY(1,1) NOT NULL,
[TDStamp] [datetime] NULL,
[Family] [varchar](50) NULL,
[Genus] [varchar](50) NULL,
[Species] [varchar](50) NULL,
… lots more columns described here….
[BarCode] [varchar](50) NULL,
CONSTRAINT [pkSheet] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Dig Deeper on Enterprise data architecture best practices
Related Q&A from Mark Whitehorn
The unstructured data types common in big data systems are often better managed by a NoSQL database than relational software, Mark Whitehorn says.continue reading
IT managers should ask cloud providers some pointed questions about the security of data stored in cloud databases, says expert Mark Whitehorn.continue reading
Expert Mark Whitehorn explains what skills are required for predictive modeling -- and whether business users can do the work of data scientists.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.