What are database Sub languages?
A data sublanguage mainly has two parts:
The Data Definition Language is used for specifying the database schema and the Data Manipulation Language is used for both reading and updating the database. These languages are called data sub-languages as they do not include constructs for all computational requirements.
Computation purposes include conditional or iterative statements that are supported by the high-level programming languages. Many DBMSs have a capability to embed the sublanguage in a high-level programming language such as ‘Fortran’, ‘C’, C++, Java, or Visual Basic. Here, the high-level language is sometimes referred to as the host language as it is acting like a host for this language. To compile the embedded file, the commands in the data sub-language are first detached from the host-language program and are substituted by function calls. The pre-processed file is then compiled and placed in an object module which gets linked with a DBMS-specific library that is having the replaced functions, and executed based on requirement. Most data sub-languages also supply non-embedded or interactive commands which can be input directly using terminal.
Data Definition Language
Data Definition Language (DDL) statements are used to classify the database structure or schema. It is a type of language that allows the DBA or user to depict and name those entities, attributes, and relationships that are required for the application along with any associated integrity and security constraints. Here are the lists of tasks that come under DDL:
Data Manipulation Language
A language that offers a set of operations to support the fundamental data manipulation operations on the data held in the database. Data Manipulation Language (DML) statements are used to manage data within schema objects. Here are the lists of tasks that come under DML:
Data Control Language
There is another two forms of database sub-languages. The Data Control Language (DCL) is used to control privilege in Database. To perform any operation in the database, such as for creating tables, sequences or views we need privileges. Privileges are of two types,
Transaction Control Language (TCL)
Transaction Control statements are used to run the changes made by DML statements. It allows statements to be grouped together into logical transactions.