Home | Computer | Database Languages-Data Definition Language (DDL), Data Manipulation Language (DML)

Database Languages-Data Definition Language (DDL), Data Manipulation Language (DML)

August 27, 2022

DDL and DML are two sublanguages, DDL specifies the database schema, and DML is used to specify and read/update a database, respectively. Data sublanguages don’t provide all the constructs needed for computing needs, like conditional or iterative statements.

However, different DBMSs allow these sublanguages to be embedded in a high-level programming language, such as COBOL, Fortran, C++, Java, and Visual Basic. In this case, the high-level language is called the host language.

Data Definition Language (DDL)

Data definition language DDL is used to describe or modify a schema. It is not used to manipulate data. It is not used to describe how the data is stored or how it is manipulated. Data manipulation language is used to manipulate data.

DDL statements compile to create a set of tables within a file called the system catalog, data dictionary, or data directory. This file contains metadata- data about data. Metadata defines records, data items, and other objects within the database system. Consult the data dictionary before reading or modifying actual data.

Data Manipulation Language

A language that supports the basic data manipulation operations on data in databases is called data manipulation language. It is similar to database query language in that it lets us retrieve information from the database. Data manipulation language is beneficial in handling data and updating databases.

There are four main ways to interact with a database:

  • Insertion
  • Modification
  • Retrieval
  • Deletion.

Data-type-specific low-level procedures are essential for rapid data access. On the other hand, ease of use is more important at higher levels of abstraction. Adequate data-type-agnostic procedures are necessary for integrated systems design.

The goal of DML is to provide people with an efficient way to interact with the system. DML uses a query language when data needs to be retrieved from the database. This high-level, special-purpose language makes retrieving data much easier.

 There are basically two types of DML:

Procedural DML:

 It requires a user needs to state what data is needed and how it can be retrieved for the required task.

Nonprocedural DML:

It requires the user to input what is needed without giving a step-by-step guide on how to find the required information.

Nonprocedural DML is usually easier to learn and use than procedural DML. The user does not specify how to get data. These languages may generate code that is not as efficient as produced by procedural languages.

File Under: