Introduction to SQL

SQL stands for Structured Query Language. In the previous tutorials, we have discussed about the database with different operations and their properties.

To get to know much about the SQL, read the database tutorials for better understanding of the concepts. 

SQL is useful to communicate with the databases. It can store, retrieve and perform multiple operations on the databases. SQL acts as a medium to work with the databases. Using SQL one can work with several databases like Mysql, SQLserver, MSaccess, Oracle and other databases. 

Database

Unlike the other programming languages, SQL is present in the general English commands which can be easy to understand and work with the databases. 

Some of the features of the SQL are:

  • Simple Language
  • Most powerful and reliable
  • Easy to run
  • Can perform the complex operations in a better manner

SQL  is considered as the standard language to communicate with the different databases by American National Standard Institute (ANSI) committee.

RDBMS (Relational Database Management System) is considered as the support for the SQL. Generally, SQL is useful to work on the RDBMS databases.

Database Schema

The data in the RDBMS databases are stored in the form of the tables and different relations are present between the different tables. Each table consists of the rows and columns with different fields or attributes. The database schema shows the relations between the various tables and the structure that shows how the data is stored in the database.

Table Representing the Student Details

Student IDStudent NameStudent AgeStudent Branch
01Ram16CSE
02Vikas17IT
03Vishnu16ECE
04Suresh18MECH
05Vishal17ECM
06Raghav17CSE
07Vignesh16ECE

Considering the above Table as the student table stored in the database, some of the important terms to be identified are:

Attributes or Fields

Student IDStudent NameStudent AgeStudent Branch

Record or row

01Ram16CSE

Column

Student ID
01
02
03
04
05
06
07

SQL Commands

There are different SQL commands that can perform various operations on the databases. Some of the important SQL commands that are briefly discussed in the further upcoming tutorials are:

  • SELECT
  • UPDATE
  • DELETE
  • INSERT
  • DROP TABLE
  • CREATE INDEX
  • DROP INDEX
  • INTO
  • ALTER
  • CREATE DATABASE
  • ALTER DATABASE
  • CREATE TABLE

And much more… 

SQL Constraints

Along with the SQL commands, there are certain SQL constraints that will restrict some of the actions accordingly. The constraints are generally applied to the columns of a table stored in the database to restrict some actions. The most used SQL constraints that will be briefly discussed in the upcoming tutorials are:

  • NOT NULL
  • DEFAULT
  • CHECK 
  • INDEX
  • UNIQUE
  • PRIMARY KEY
  • FOREIGN KEY

The SQL commands and constraints are case sensitive, that means ALTER and alter, both of them will resemble a similar meaning. 

This is all about the basic introduction to the SQL and its importance of working with the databases. If you are a beginner it is very much important to know about the database relations and concepts that are discussed in the previous tutorials under this section. For any sort of doubts or the questions, you can let us know through the comment box.

Spread knowledge

Leave a Comment

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