Database Language in DBMS
- A
DBMS is software that used appropriate languages and interfaces to
express database queries and updates.
- Database
languages are used to read, store and update the data in the database.
Types of Database Language
1. Data Definition Language (DDL)
- Used
to define database structure, skeleton, or pattern.
- It is
used to create schema, tables, indexes, constraints, etc. in the database.
- Store
the information of metadata like the number of tables and schemas, their
names, indexes, columns in each table, constraints, etc.
DDL
performs the following commands:-
- Create: It is used to create
objects / database/ table/ view in the database with constraints.
- Alter: It is used to modify
the structure and add column/constraints/remove the column from the table with
help drop commands in the database.
- Drop: It is used to delete
objects/tables and databases.
- Truncate: It is used to remove
all records from a table and save table structure for reuse.
- Rename: It is used to rename
an object.
- Comment: It is used to comment
on the data dictionary.
2. Data Manipulation Language (DML)
- Used for accessing and manipulating data in a database.
- It handles user requests.
- Some tasks of DML:
- Select: It is used to retrieve
data from a database.
- Insert: It is used to insert
data into a table.
- Update: It is used to update
existing data within a table.
- Delete: It is used to delete
all records from a table.
3. Data Control Language (DCL)
- Used
to retrieve the stored or saved data.
- The
DCL execution is transactional. It also has rollback parameters.
(But in Oracle
database, the execution of data control language does not have the feature of
rolling back.)
Here
are some tasks that come under DCL:
- Grant: It is used to give
user access privileges to a database.
- Revoke: It is used to take
back permissions from the user.
4. Transaction Control Language (TCL)
- TCL is used for the changes by the DML statement.
- TCL can be grouped into logical transactions.
- Here are some tasks that come under TCL:
- Commit: It is used to save the
transaction on the database.
- Rollback: It is used to restore
the database to the original since the last Commit.
- Savepoint:- Used
to save parts of tasks.
==================================================================
0 Comments