Data Manipulation Language Functions and How does it work :

 DATA DEFINITION LANGUAGE:


DATA DEFINITION LANGUAGE (DDL) is a subset of SQL (Structured Query Language) used for defining and managing the structure of a database. DDL provides a set of SQL commands that allow users to define, modify, and manage the various database objects such as tables, views, indexes, constraints, and schemas.

CREATE: Used to create new database objects such as tables, views, indexes, constraints, and schemas.

ALTER: Used to modify the structure of existing database objects such as tables, views, and schemas

DROP: Used to delete existing database objects such as tables, views, indexes, constraints, and schemas. 

TRUNCATE: Used to remove all data from a table while keeping the structure intact. For example:

RENAME: Used to rename existing database objects such as tables, views, indexes, constraints, and schemas. 

DDL commands are typically executed by users with appropriate privileges, such as database administrators or users with ownership rights on the objects being defined or modified. DDL is an important aspect of database management, as it allows users to define and maintain the structure of a database, ensuring data integrity and consistency.


 INTERACTIVE DATA MANIPULATION LANGUAGE:


INTERACTIVE DATA MANIPULATION LANGUAGE (IDML) is a subset of SQL (Structured Query Language) that allows users to interactively manipulate data stored in a relational database. IDML provides a set of SQL commands that enable users to perform operations such as querying, inserting, updating, and deleting data in a database.


SELECT: Used to retrieve data from one or more tables in a database based on specified conditions. SELECT allows users to query the database and retrieve data that meets certain criteria.

INSERT: Used to add new data into a table in a database. INSERT allows users to add new records to a table with specified values for each column.

UPDATE: Used to modify existing data in a table in a database. UPDATE allows users to change the values of one or more columns in existing records based on specified conditions. 

DELETE: Used to remove data from a table in a database. DELETE allows users to delete records from a table based on specified conditions.

IDML commands are typically executed by users with appropriate privileges, such as regular users with read and write access to the database. IDML is an essential part of interacting with a relational database, as it enables users to manipulate data stored in the database according to their requirements.


 EMBEDDED DATA MANIPULATION LANGUAGE:


EMBEDDED DATA MANIPULATION LANGUAGE (EDML) refers to the use of data manipulation commands within a programming language or application code to interact with a relational database. EDML allows for the integration of SQL (Structured Query Language) commands directly into the code of an application, which enables the application to interact with the underlying database for retrieving, inserting, updating, and deleting data.

EDML typically involves the use of special SQL statements that are embedded within the code of an application using placeholders or variables to dynamically substitute values. These statements are then processed by the database management system (DBMS) when the application is executed.


JDBC (Java Database Connectivity): This is a popular Java API that allows Java applications to interact with relational databases. JDBC includes SQL commands embedded within Java code using classes and methods provided by the JDBC API. 

PDO (PHP Data Objects): This is a database abstraction layer in PHP that allows PHP applications to interact with various databases using a unified API. PDO includes SQL commands embedded within PHP code using PDO classes and methods.

ActiveRecord (Ruby on Rails): This is an ORM (Object-Relational Mapping) framework in Ruby on Rails that allows Ruby applications to interact with databases using Ruby classes and objects. ActiveRecord includes SQL commands embedded within Ruby code using ActiveRecord methods.

EDML allows developers to leverage the power of SQL within their programming language of choice, making it easier to interact with relational databases and manipulate data as needed. It provides a more seamless and integrated approach to working with databases in applications, without the need for separate SQL scripts or files.

Comments

Popular posts from this blog

DBMS: Function, Advantage and Disadvantage

Mapping Interactions: The Use Case Model

Embracing Change: The Agile Methodology