# Database Languages

Broadly speaking, there are two categories of database languages:

* Data Manipulation Language (DML)
* Data Definition Language (DDL)

## Data Manipulation Language (DML)

* It is also known as **query language**
* It is used to access and manipulate the data stored in a database
* It has two sub-categories: **procedural** (the user specifies what data is required and how to compute the data) and **declarative**/**non-procedural** (the user specifies what data is required without specifying how to compute the data)
* SQL (Structured Query Language) is the most widely used query language and is non-procedural
* Some common DML commands include **SELECT**, **INSERT**, **UPDATE**, **DELETE**

## Data Definition Language (DDL)

* It is used to define the database schema, the storage structure, integrity constraints and the authorizations on the database content and operations
* The DDL compiler generates a set of tables stored in a **data dictionary**
* The data dictionary contains metadata including the database schema, the storage structure (specified using *data storage and definition language*), integrity constraints (such as domain constraints, referential integrity, assertions etc) and authorization information
* Some common DDL commands include **CREATE**, **ALTER**, **DROP**

SQL is, therefore, both a DML and a DDL.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/data-models/database-languages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
