Posts Tagged ‘data base administrator’
What is DDL & DML?
All SQL commands are divided into two broad categories according to its function,namely:
DDL - Data Definition Language
is a collection of SQL commands used to create, modify and delete metadata structuresand definitions of database objects.DML - Data Manipulation Language
is a collection of SQL commands that are used for processing the contents of the data inthe table such as insert, modify and delete the contents of the data - and not associatedwith changes in the structure and data type definitions of database objects.Let us see from the definition and more examples in the following sections below.
DDL - Data Definition LanguageAs the definition described above, DDL is a set of SQL commands that are used to make(create), modify (alter) and delete (drop) the structure and data type definitions ofdatabase objects.
DDL - Data Definition Language
is a collection of SQL commands used to create, modify and delete metadata structuresand definitions of database objects.DML - Data Manipulation Language
is a collection of SQL commands that are used for processing the contents of the data inthe table such as insert, modify and delete the contents of the data - and not associatedwith changes in the structure and data type definitions of database objects.Let us see from the definition and more examples in the following sections below.
DDL - Data Definition LanguageAs the definition described above, DDL is a set of SQL commands that are used to make(create), modify (alter) and delete (drop) the structure and data type definitions ofdatabase objects.
Objects in the database in question - in MySQL - is as follows:
database
table
View
index
Procedure (Stored Procedure)
function
trigger
example:
DDL Commands list on the MySQL 5.0Here are examples of DDL commands used in MySQL. Click on the link to see details ofthe use of the command.
Making (CREATE)
CREATE DATABASE
CREATE FUNCTION
CREATE INDEX
CREATE PROCEDURE
CREATE TABLE
CREATE TRIGGER
CREATE VIEWChanges (ALTER & RENAME)
ALTER DATABASE
ALTER FUNCTION
ALTER PROCEDURE
ALTER TABLE
ALTER VIEW
RENAME TABLEElimination (DROP)
DROP DATABASE
DROP FUNCTION
DROP INDEX
DROP PROCEDURE
DROP TABLE
DROP TRIGGER
DROP VIEW
Making (CREATE)
CREATE DATABASE
CREATE FUNCTION
CREATE INDEX
CREATE PROCEDURE
CREATE TABLE
CREATE TRIGGER
CREATE VIEWChanges (ALTER & RENAME)
ALTER DATABASE
ALTER FUNCTION
ALTER PROCEDURE
ALTER TABLE
ALTER VIEW
RENAME TABLEElimination (DROP)
DROP DATABASE
DROP FUNCTION
DROP INDEX
DROP PROCEDURE
DROP TABLE
DROP TRIGGER
DROP VIEW
Matrix table DDL commands MySQL 5.0
| OBJECT | CREATE | ALTER | DROP | RENAME |
| DATABASE | Yes | Yes | Yes | |
| FUNCTION | Yes | Yes | Yes | |
| INDEX | Yes | Yes | ||
| PROCEDURE | Yes | Yes | Yes | |
| TABLE | Yes | Yes | Yes | Yes |
| TRIGGER | Yes | Yes | ||
| VIEW | Yes | Yes | Yes |
DML - Data Manipulation LanguageDML it self is a collection of SQL statements that relate to the job processing the data in thetable - and not associated with changes in the structure and data type definitions ofdatabase objects such as table, column, and so on.Examples of DML: Taking All the Row Data from the table MS_KARYAWAN
DML Example: Inserting data into tables ms_karyawan
Some DML Commands list of MySQL 5.0CALL
DELETE
DO
HANDLER
INSERT
LOAD DATA INFILE
REPLACE
SELECT
TRUNCATE
UPDATE
