top of page

The 4 main commands to Structured Query Language

Structured Query Language (SQL) is a specific programming language for in Relational Database Management System (RDMS). It is developed by IBM in 1970s and recognized as ISO (International Organization for Standardization) standard for RDMS programming language. SQL is consistently popular because it is easy to use and effectively manipulates databases into valuable information. Generally, SQL has four main commands: Data Definition Language, Data Query Language, Data Manipulation Language, Data Control Language.



Data Definition Language are SQL commands use for creating and defining the structure and objects (e.g., lists, tables) in the database. Some example commands for Data Definition Language are CREATE, ALTER, and DROP. CREATE generates a new database or objects, ALTER change the structure of the database, DROP is used for deleting objects. Data Query Language are statements used for reading the data within the database. SELECT is the most used command for Data Query Language since it is very flexible to filtering the attributes by combining with other commands such as GROUP BY, USING, and WHERE.


Data Manipulation Language is a command for changing, updating, and manipulating data in the database. Examples for these commands are INSERT, UPDATE, and DELETE. INSERT command adds one or more values to the database, UPDATE modifies data within the database, and DELETE command removes the values within an object in the database.


Lastly, Data Control Language are commands for managing permissions and rights for accessing the database. In other words, it focuses on the security of relational databases for data leak prevention. Data Control Language only has three commands: GRANT, REVOKE, and DENY. GRANT command gives mention user privileges to access specific objects.


These privileges vary from read-only access to full control of the database. REVOKE is the opposite of GRANT, which is removing access from a user. Lastly, DENY commands prevent a user from obtaining permission. It is useful for preventing unnecessary permission inheritance.

1 view0 comments

Comentarios


bottom of page