What Is SQL?

SQL full form is Structured Query Language. SQL is a domain-specific language. It is used in application development language to enable a programmer to work with the data. The data is stored in a relational database. To manage this data, we have relational database management systems like SQL Server, MySQL, MS Access, etc. that use SQL as a standard database language.

Become a SQL professional with this complete SQL Training Course!

Watch this Introduction to SQL and SQL Commands video

What is SQL - Basic SQL Commands with example

This introduction to SQL tutorial will give you a quick overview on:

What Is Data?

Data is distinct pieces of information, which can be facts, figures, or details that are stored in or used by a computer.
What Is Data

What Is a Database?

A database is a well-organized collection of data that is stored in an electronic format. To be more specific, a SQL database is an electronic system that allows to easily access, manipulate, and update the data.
What Is a Database

Wish to crack SQL job interviews? Intellipaat’s Top SQL Interview Questions are meant only for you!

What Is a Database Management System?

Consider a School SQL Database which has a record of the present students and the previously studied students in the Student Details table. Similarly, it may contain Faculty Details, Management Details, Staff Details, and many more depending on the school’s requirement. As the data is in huge amounts, to manage it we need a database management system.
Database Management System
Almost all modern databases are managed by a Database Management System (DBMS). Basically, it is a system software used for creating data in a systematic way and managing databases.

Want to get certified in SQL! Learn from our top SQL blog written by experts.

How Does SQL Database manage Data?

DBMS provides, for both users and programmers, a fundamental way to create, retrieve, update, and manage data.
Consider a scenario where a student XYZ wants to change his address. The DBMS searches the details of XYZ in the table ‘Student Details’ from the database ‘School Database’ and displays it for the user, and then the user edits it.

Watch this SQL Full Course Tutorial

What is SQL - Basic SQL Commands with example

Now, we have a clear picture of a database and its managing system. Let’s move on.

Types of Database Architecture

We have two types of database architecture:

  • File Server
  • Client Server

Still have queries? Come to Intellipaat’s SQL Community, clarify all your doubts, and excel in your career!

File Server Architecture

File Server Architecture
In the file server architecture, files are located on the local system. It is useful for sharing information across a network. The client sends a request for a file over the network, and the file server forwards the file to the client. This is considered to be the most primitive type of data service used for exchanging information over a network. The file server provides access to remote server processors too.
Here is an example to understand the implementation of the file server.
File Server Architecture 2Suppose, you have an Excel file and one of your friends requests you to send that file for some information. So, you send a copy to your friend. Now when you make any changes in your original Excel file, those changes would not be reflected in the file which is with your friend.
In this example, you are a file server and your friend is the device requesting the information. We can conclude on the file server architecture by quoting that the server acts as a sorting device and only one person at a time can have access to it.

Client Server Architecture

In the client server architecture, the database is the server and any application that uses the data is a client.
Here is an example to explain the working of this server. Consider, three OLE DB components or client systems accessing the database at the same time. The systems have logged into the IRCTC website to know the number of trains running from X destination to Y destination.
Client Server Architecture
The client system sends the request to the network server. The network server sends the same request to the database and the final result is sent to the client system. This process is conducted when one system sends the request. But in real time, there will be n number of systems and there can be multiple requests that are sent at a time for the same data. The database server will have to process all the requests simultaneously and send back the requested data to the client systems.

What Is SQL?

Now we are good to go with SQL! As discussed before SQL full form is a structured query language, it helps you to communicate with the database by commands. Here are some of the features of SQL Database:

  • It allows users to extract data from relational database.
  • It allows to create database and tables.
  • It allows updating, inserting, deleting and altering database and tables.
  • It provide security and allow to set a permission.
  • Allows people to handle data in new ways.

A Brief Explanation on SQL

Become a Database Architect

Types of SQL Commands

SQL commands are traditionally divided into four categories:

  • Data Query Language (DQL Commands in SQL)
  • Data Definition Language (DDL Commands in SQL)
  • Data Manipulation Language (DML Commands in SQL)
  • Data Control Language (DCL Commands in SQL)

Categories of SQL Commands

Data Query Language (DQL Commands in SQL)

Data Query Language comprises only one command ‘select.’ This command can be accompanied by many other clauses to compose queries.

Data Definition Language (DDL Commands in SQL)

Data Definition Language is power for SQL, which allows a user to create and restructure database objects. The basic DDL commands in SQL are Create Tables, Alter Tables, and Drop Tables.

CREATE TABLE It creates a new table
DROP TABLE It deletes the ENTIRE table.
ALTER TABLE Modifies the existing table

Data Manipulation Language (DML Commands in SQL)

Data Manipulation Language is used to manipulate data within the tables. The basic DML commands in SQL are Insert, Update and Delete.

SELECT Retrieve information from database
INSERT Add new information to a database
UPDATE Modifies the information currently stored in a database
DELETE Delete information from the database

Data Control Access Language (DCL Commands in SQL)

And finally, we have Data Control Access which allows the user to control access to data within the database. These DCA commands are generally used to control the distribution of privileges among users and create objects related to user access. The basic DCL commands in SQL are Grant and Revoke.
This brings us to the end of the Introduction to SQL. Here we have learnt what is SQL, SQL full form, SQL Database, all basic SQL commands and its types – DDL, DCL, DML and DQL with examples.

Course Schedule

Name Date
Database Architect 2021-03-13 2021-03-14
(Sat-Sun) Weekend batch
View Details
Database Architect 2021-03-20 2021-03-21
(Sat-Sun) Weekend batch
View Details
Database Architect 2021-03-27 2021-03-28
(Sat-Sun) Weekend batch
View Details

1 thought on “What is SQL - Basic SQL Commands with example”

Leave a Reply

Your email address will not be published. Required fields are marked *