Explain Database languages.
Data Definition Language
The language is used to create database, tables, alter them, etc. With this, you can also rename the database, or drop them. It specifies the database schema.
The DDL statements include −
- CREATE: Create new database, table, etc.
- ALTER: Alter existing database, table, etc.
- DROP: Drop the database
- RENAME: Set a new name for the table.
Data Manipulation Language
The language used to manipulate the database like inserting data, updating table, retrieving record from a table, etc. is known as Data Manipulation Language −
- SELECT: Retrieve data from the database
- INSERT: Insert data
- UPDATE: Update data
- DELETE: Delete all records
Data Control Language
Grant privilege to a user using the GRANT statement. In the same way, revoke the privilege using the REVOKE statement. Both of these statements come under the Data Control Language (DCL). −
- GRANT: Give privilege to access the database.
- REVOKE: Take back the privilege to access the database.
Transaction Control Language
Manage transactions in the Database using the Transaction Control Language −
- COMMIT: Save the work.
- SAVEPOINT: Set a point in transaction to rollback later
- ROLLBACK: Restores since last commit
Comments
Post a Comment