Data Definition (DDL) and Data Manipulation (DML)
Data Definition (DDL) and Data Manipulation (DML) Data Definition Language (DDL) The DDL is a set of commands used to define the structure and content...
Data Definition (DDL) and Data Manipulation (DML) Data Definition Language (DDL) The DDL is a set of commands used to define the structure and content...
Data Definition (DDL) and Data Manipulation (DML)
Data Definition Language (DDL)
The DDL is a set of commands used to define the structure and content of the data warehouse.
It defines tables, columns, relationships, and constraints, providing a blueprint for the data warehouse.
Examples: `CREATE TABLE Customers (
`id INT PRIMARY KEY AUTO_INCREMENT,
`name VARCHAR(50) NOT NULL,
`email VARCHAR(100) UNIQUE
);`
Data Manipulation Language (DML)
The DML is a set of commands used to modify the existing data in the data warehouse.
It allows users to insert, update, delete, and query data, ensuring that the data is accurate and consistent.
Examples: `INSERT INTO Orders (customer_id, order_date) VALUES (1, '2023-03-01');
`UPDATE Customers SET email = 'johndoe@example.com' WHERE id = 1;
DELETE FROM Orders WHERE order_date < '2023-03-01';
Relationship between DDL and DML
The DDL defines the structure of the data warehouse, including tables, columns, and relationships.
The DML defines how data is loaded, modified, and accessed within the data warehouse.
The DDL and DML work together to ensure that the data in the data warehouse is accurate and accessible