What is SQL

SQL stands for Structured Query Language.

SQL is a database language which is used to insert, manipulate and retrieve data from a Database.

 

What is Database?

A Database is used to store the Data.

It stores the data in the form of Tables. A Table consist of Rows and Columns.

Columns are the properties/attributes which define an object and rows contain the values for all those properties.

 

For example, look at the diagram shown below. In this diagram there is a table with 5 columns and 4 rows.

Image

 

SQL and Relational Databases

As now, we know that a Relational Database stores data in the form of tables .

Tables of a database are related to each other with the help of primary and foreign keys and we use SQL to read, write, update and delete data from a database table.

SQL provides a way to perform various operations on the Data like Insert, Update, Delete etc.

Image

 

In the diagram shown above, Student and Department are two tables which store the information about Students and Departments respectively. Each student must belong to a Department, so the Student table contains a column of DepartmentId which stores the Id of the Department to which a student belongs. The Department Table stores the Id and Name of all departments. For example in the above two tables Raj & Minali has department id=302 which is the Id for Computer Science department and Sahil belongs to Mechanical Engg department which has department Id of 303.

If we want to perform read, write, update or delete operations on the above two tables we can use SQL queries.

Related Questions

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp