SQL For Beginners - Introduction

Introduction

SQL stands for Structured Query Language. SQL is a language that helps us to work with databases. The database does not understand English or any other language. Just as to create software, we use Java or C#, and in a similar way to work with databases, we use SQL. SQL is the standard language of a Database and is also pronounced as a Sequel by many people.

In my previous article "Introduction To DBMS", I mentioned that DBMS allows us to create databases, maintain databases, retrieve data, analyze data, etc. But, how exactly DBMS allows us to achieve all this functionality? The answer is SQL.

SQL is a language that allows you to define, manipulate and retrieve data from relational databases. Relational Databases are databases that store data in the form of objects (like tables) that may be related to each other.

The diagram below displays a relation (table) and its components.

RDBMS

Table in RDBMS

SQL allows us to create such tables, insert data, delete data, view data from such tables, and much more. The table is made up of rows (tuples) and columns (domains). Column headings are also called Attributes. A field is a basic building block of the table. A record is a horizontal row of data.

SQL COMMANDS

SQL Language is made up of various types of SQL Commands. The SQL language commands are divided into four main sections.

  1. DML (Data Manipulation Language) Commands

    DML commands are used to insert, update and delete data in the database. As the name suggests, they are used to manipulate the data in the database. The DML commands are INSERT, UPDATE and DELETE. Find more about DML Commands here- DML Commands in SQL 

  2. DDL (Data Definition Language) Commands

    DDL commands are used to manipulate the database itself. They deal with the creation of a database, altering its structure, and deleting the database. The DDL Commands are CREATE, ALTER, and DROP. Find more about DDL Commands here- DDL Commands in SQL

  3. DCL (Data Control Language) Commands

    DCL commands are used to control access to the database. They are used to give privileges to the users and take away privileges from the users. The DCL Commands are GRANT and REVOKE. Find more about DCL Commands here- DCL Commands in SQL

  4. DQL (Data Query Language) Command

    Data is accessed from the database by firing queries. DQL command allows us to fire queries to the database and get the data from the database. The DQL command is SELECT.

Conclusion

We will learn about each of these commands in detail in the upcoming series of articles. Stay tuned. Happy Learning!

Reference

Introduction To DBMS

DML Commands in SQL 

DDL Commands in SQL

DCL Commands in SQL


Similar Articles