MANIPULATION LANGUAGES
### Definitions:
**A. Data Definition Language (DDL)**
- **Definition**: Data Definition Language (DDL) is a subset of SQL used to define, modify, and manage database schema objects, such as tables, indexes, and constraints.
- **Examples of DDL Commands**:
- `CREATE`: Used to create database objects like tables, views, and indexes.
- `ALTER`: Used to modify existing database objects.
- `DROP`: Used to delete database objects.
- `TRUNCATE`: Used to remove all records from a table, while keeping the table structure.
**B. Interactive Data Manipulation Language (IDML)**
- **Definition**: Interactive Data Manipulation Language (IDML) refers to SQL commands used interactively to query and modify data in a database. These commands are typically executed in a database management system (DBMS) interface or through SQL clients.
- **Examples of IDML Commands**:
- `SELECT`: Used to retrieve data from one or more tables.
- `INSERT`: Used to add new records to a table.
- `UPDATE`: Used to modify existing records in a table.
- `DELETE`: Used to remove records from a table.
**C. Embedded Data Manipulation Language (EDML)**
- **Definition**: Embedded Data Manipulation Language (EDML) involves embedding SQL commands within a host programming language (such as C, Java, or Python) to interact with a database. It allows for SQL operations to be integrated with the logic of a host program.
- **Examples of EDML Usage**:
- Using SQL commands within a Java program to interact with a database through JDBC (Java Database Connectivity).
- Embedding SQL in a C program using an embedded SQL preprocessor, such as SQL/CLI (Call-Level Interface).
- Executing SQL queries in a Python script using database connectivity libraries like `sqlite3` or `SQLAlchemy`.
Comments
Post a Comment