A DBMS must provide appropriate languages and interfaces for each category of users to express database queries and updates. Database Languages are used to create and maintain database on computer. There are large numbers of database languages like Oracle, MySQL, MS Access, dBase, FoxPro etc. SQL statements commonly used in Oracle and MS Access can be categorized as data definition language (DDL), data control language (DCL) and data manipulation language (DML).
Below are the database languages. Click them for more details.
DDL | Data Definition Language |
DML | Data Manipulation Language |
DCL | Data Control Language |
TCL DQL | Transaction Control Language Data Query Language |
DDL : Data Definition Language
All DDL commands are auto-committed. That means it saves all the changes permanently in the database.
Command | Description |
---|---|
create | to create new table or database |
alter | for alteration |
truncate | delete data from table |
drop | to drop a table |
rename | to rename a table |
DML : Data Manipulation Language
DML commands are not auto-committed. It means changes are not permanent to database, they can be rolled back.
Command | Description |
---|---|
insert | to insert a new row |
update | to update existing row |
delete | to delete a row |
merge | merging two rows or two tables |
TCL : Transaction Control Language
These commands are to keep a check on other commands and their affect on the database. These commands can annul changes made by other commands by rolling back to original state. It can also make changes permanent.
Command | Description |
---|---|
commit | to permanently save |
rollback | to undo change |
savepoint | to save temporarily |
DCL : Data Control Language
Data control language provides command to grant and take back authority.
Command | Description |
---|---|
grant | grant permission of right |
revoke | take back permission. |
DQL : Data Query Language
Command | Description |
---|---|
select | retrieve records from one or more table |
No comments:
Post a Comment