Database Languages
Database languages are used to create and maintain database on computer. There is large number of database languages like Oracle, MS- Access, dbase, FoxPro, etc.
SQL statements commonly used in Oracle and MSA Access can be categorized as data definition languages (DDL), data control language (DCL), and data manipulation language (DML).
1. Data Definition Languages (DDL): - It is a language that allows the users to define data and their relationship to other types of data. It is mainly used to create files, databases, dictionary and tables within databases.It is also used to specify the structure of each table, set of associated values with each attribute, integrity constraints, security and authorization information for each table and physical storage structure of each table on the disk.
S.No. | Need And Usage | The SQL DDL Statement |
1 | Create schema objects | CREATE |
2 | Alter schema objects | ALTER |
3 | Delete schema objects | DROP |
4 | Rename schema objects | RENAME |
2. Data Manipulation language (DML): - It is a language that provides a set of operations to support the basic data manipulation operations on the data held in the databases. It allows users to insert, update, delete and retrieve data from the table. The part of DML that involves data retrieval is called a query language.
S.No. | Need And Usage | The SQL DDL Statement |
1 | Remove rows from tables or views | DELETE |
2 | Add new rows of data into table or view | INSERT |
3 | Retrieve data from one or more tables | SELECT |
4 | Change columns values in existing rows of a table or view | UPDATE |
3. Data Control Language (DCL): - DCL statements control access to data and the database using statements such as GRANT and REVOKE. A privilege can either be granted to a user with the help of GRANT statement. The privileges assigned can be SELECT, ALTER, DELETE,EXECUTE, INSERT, INDEX etc. in addition to granting of privileges , you can also revoke it by using REVOKE command.
S.No | Need And Usage | The SQL DDL Statement |
1 | Grant and take away privileges and roles | GRANT and REVOKE |
2 | Add a comment to the data dictionary | COMMENT |