Daftar Isi [Tampil]
In short, Structured Query Language or SQL is a programming command that is used to access and manage data in a database system.
SQL is one of the important points in the study of computer network engineering. Therefore, this article will cover everything you need to know about SQL.
Starting from the history of development, understanding, function, to the type of structured query language.
What is SQL?
So, before going into the history of its development, it would be better if Qwords friends first understand what SQL is.
As previously discussed, SQL is a language or command used to access data in a database system.
SQL has the ability to set which data needs to be displayed and also make that data interact with each other.
Generally, SQL is used in relational-based data processing, whether it is accessing, changing, deleting, and manipulating the data.
The command, which is often also referred to as a query, is usually in the form of a simple syntax containing data manipulation instructions.
SQL Development History
SQL was first discussed by a researcher named Johnny Oracle in an article published in June 1970.
In this article, Jhonny Oracle discusses the meaning of a database system management language called SEQUEL (Structured English Query Language).
However, because the term was too long and difficult to spell, the term SQL began to be used until now.
After going through a standardization process from that year to 1986, SQL underwent its first improvement in 1989.
Thanks to its simplicity, SQL began to be used by various RDBMS (Relational Database Management System) with different versions.
From here, compatibility problems often arise between one database application and another because they do not use the same SQL implementation.
So, in 1986, ANSI (American National Standards Institute) set a standard for SQL which is expected to increase the diversity of the RDBMS application.
SQL Functions
- SQL itself also has many different functions in database management. The following are some of the uses of SQL and the commands used:
- Creating a database — the command used to create a database is create database database_name;
- Enabling the database — to activate the database, the following command is used usenama_database;
- Show databases — the command used to display databases is show databases;
- Delete a database — to delete a database, the command used is drop database database_name;
- Creating a table — — to create a table, the command used is create table table_name;
- Delete table — the command used to delete a table is drop table table_name;
- View table structure — the command used to view table structure is describe table_name; or desc table_name;
- Delete data — the query command used to delete data is delete from table_name
Three Types of SQL Database Commands
There are three types of database queries in SQL: data definition language, data manipulation language, and data control language. Here is a brief explanation of the three commands:
Data Definition Language (DDL)
DDL is a SQL query method used to define data in a database. This includes creating new tables, changing datasets, and deleting data.
There are 5 basic commands of DDL, here is a brief description of each command:
- Create — the command used to create a new database, either in the form of a new table or a new column.
- Alter — this query is usually used to change the structure of an existing table, it can be in terms of names, adding attributes, and deleting columns.
- Rename — this command is used to change the name in a table or column in the database.
- Drop — drop query is used to delete any database elements you want, from databases to tables to indexes.
- Show — the show command is used to display the data in the database.
Data Manipulation Language (DML)
As the name implies, DML or Data Manipulation Language is a query used to manipulate data in a database.
DML commands are also divided into several types, some of which are:
- Insert — the insert command is used to insert a new record or data in a database table.
- Select — this query can be used to display or retrieve data in a table, the data taken is not only limited to one type.
- Update — command used if you want to update data in a table, useful if there is an input error when creating the table.
- Delete — is used to delete an existing record in a database table.
Data Control Language (DCL)
Another SQL command is the DLC or data control language. This command is usually used to set the rights owned by the user in terms of databases, tables, and fields.
Through the DCL command, the database admin can easily maintain the confidentiality of a database. The basic DCL query is divided into several main commands, namely:
- Grant — the grant command is used when an admin grants access to a user.
- Revoke — this query is used to cancel the permissions of a user.
- Commit — the commit command is used to set the database storage.
- Rollback — the rollback query is used to cancel the database save.
Closing
So, that was a complete and brief explanation about SQL, friends of Qwords! In short, SQL is a programming language commonly used for database management.
SQL has many functions and benefits — especially for administrators and programmers alike to manipulate and analyze database data
0 Comments
PROHIBITED: Spam Comments, Promotions, Dirty Words, Insulting - Please give feedback so this blog can be even better