Top Posts
Host IT Smart – An Honest Review about...
Life cycle of a thread in Java
Multithreading in Java
Python Keywords and Identifiers
Java Database Connections | JDBC Tutorial
CSJMU BCA 1 SEM QUESTION PAPERS
C++ Structure
Data Transmission in Network
Computer Network and its Component
OSI Model
TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • CONTACT US
  • WRITE +
  • ABOUT US
  • HIRE US
Dbms Tutorials

SQL Tutorial

by anupmaurya April 6, 2022
written by anupmaurya 1 comment 1757 views

SQL (Structured Query Language) is used to perform operations on the records stored in the database such as updating records, deleting records, creating and modifying tables, views, etc.

History of the SQL

Table of Contents

    • History of the SQL
  • What is SQL
  • Why SQL is required
  • SQL Commands
      • DDL Commands
      • DML Commands
      • DCL Commands
      • TCL -Transaction Control Language

The SQL language was originally developed at the IBM research laboratory in San José, in connection with a project developing a prototype for a relational database management system called System R in the early 70s. The first database management systems based on SQL became available commercially by the end of the 70s.

What is SQL

  • SQL stands for Structured Query Language.
  • It is designed for managing data in a relational database management system (RDBMS).
  • It is pronounced as S-Q-L or sometime See-Qwell.
  • SQL is a database language, it is used for database creation, deletion, fetching rows, and modifying rows, etc.
  • SQL is based on relational algebra and tuple relational calculus.

All DBMS like MySQL, Informix, PostgreSQL, Oracle, MS Access, Sybase, and SQL Server use SQL as standard database language.

Why SQL is required

SQL is required:

  • To create new databases, tables and views
  • To insert records in a database
  • To update records in a database
  • To delete records from a database
  • To retrieve data from a database

SQL Commands

The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following groups based on their nature −

DDL Commands

  • DDL stands for Data Definition Language
  • DDL commands are used to change the structure of the table like creating a table, deleting a table, altering a table, etc.
  • DDL commands are auto-committed, which means changes are permanent, rollback is not possible.
Sr.No.Command & Description
1CREATE: Creates a new table, a view of a table, or other objects in the database.
2ALTER: Modifies an existing database object, such as a table.
3DROP: Deletes an entire table, a view of a table, or other objects in the database.
Data Definition Language

DML Commands

  • DDL stands for Data Manipulation Language
  • DML commands are used to modify the database. It is responsible for all forms of changes in the database.
  • DML commands are not auto-committed as DDL, they can be rollback.
Sr.No.Command & Description
1SELECT: Retrieves certain records from one or more tables.
2INSERT: Creates a record.
3UPDATE: Modifies records.
4DELETE: Deletes records.
Data Manipulation Language

DCL Commands

  • DCL stands for Data Control Language
  • DCL commands are used to grant and take back authority from any database user.
Sr.No.Command & Description
1GRANT: Gives a privilege to the user.
2REVOKE: Takes back privileges granted from the user.
Data Control Language

TCL -Transaction Control Language

  • TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.
  • They are auto-committed to the database that’s why they cannot be used while creating tables or dropping them.
Sr.No.Command & Description
1COMMIT: Commit command is used to save all the transactions to the database.
2ROLLBACK: Rollback command is used to undo transactions that have not already been saved to the database.
3SAVEPOINT: It is used to roll the transaction back to a certain point without rolling back the entire transaction.
Transaction Control Language

Once the commands are executed, the structure created is stored or saved automatically.

mySqlSQLsql commandsSQLlite
Share
12
FacebookTwitterLinkedinRedditWhatsappTelegramEmail
anupmaurya

Hey there, My name is Anup Maurya. I was born with love with programming and works at TCS. One of best global (IT) services and consulting company as System Administrator . I also love graphics designing. It's my pleasure to have you here.

previous post
Covid-19 Tracker Application Using Python
next post
SQL Datatypes

You may also like

DBMS Interview Questions

Functional Dependency

Normalization in DBMS

Boyce Codd normal form (BCNF)

Third Normal form (3NF)

Second Normal Form (2NF)

SQL Commands

SQL Datatypes

Entity Relationship Diagram – ER Diagram in DBMS

Relational DBMS

1 comment

Adam November 23, 2020 - 10:41 am

Excellent post however , I was wondering if you could write a
litte more on this topic? I’d be very grateful if you could elaborate a little bit further.

Kudos!

Comments are closed.

SQL Tutorial

  • SQL Introduction
  • SQL Datatypes
  • SQL Commands

Recent Posts

  • Host IT Smart – An Honest Review about this Indian Hosting Company

    May 24, 2022
  • Life cycle of a thread in Java

    May 24, 2022
  • Multithreading in Java

    May 23, 2022

EDUCATIONAL

  • PyScript: Python in the Browser

  • Best Fake Email Generators (Free Temporary Email Address)

  • How to Find Out Who Owns a Domain Name

  • Mobile phone brands by country of origin

  • Best way to use google search you won’t believe exist

  • 10 mostly asked questions related to WhatsApp

  • Top 8 Programming Languages That Will Rule in 2022

  • Google Cloud Platform

  • Best Online Code Editors For Web Developers

  • How to Write a Synopsis for Project Work

CHEATSHEET

  • Git and Github 2022 Cheat Sheet

  • ReactJs Cheatsheet

  • Linux Commands Cheat Sheet

  • C Programming language Cheatsheet

  • Scala Cheatsheet

  • MySQL Cheatsheet

  • Javascript Cheatsheet

PROJECTS

  • Python Rock Paper Scissors Game

  • Currency Converter in Python

  • Alarm clock GUI application with tkinter

  • Print emojis using python without any module

  • Country Date and Time using Python

  • Covid-19 Tracker Application Using Python

  • Python | GUI Calendar using Tkinter

  • Python: Shutdown Computer with Voice

  • Python GUI Calculator using Tkinter

  • Convert an Image to ASCII art using Python

  • Python YouTube Downloader with Pytube

  • Tic-Tac-Toe using Python

TUTORIALS

  • JAVA TUTORIAL
  • COMPUTER NETWORK
  • DBMS TUTORIAL
  • E-COMMERCE TUTORIAL
  • KNOWLEDGE MANAGEMENT
  • C++ PROGRAMMING
  • COMPUTER NETWORK SECURITY
  • AMAZON WEB SERVICES

TECH NEWS

  • PyScript: Python in the Browser

  • HalloApp is a secure alternative to WhatsApp, made by two early WhatsApp employees

  • 5+ Best Humanoid Robots In The World

  • Windows 11 Now Official, Brings Fresh UI, Centrally-Placed Start Menu

TERMS & POLICY

  • PRIVACY POLICY
  • TERMS AND CONDITIONS

COMPILERS

  • JAVA COMPILER
  • PYTHON COMPILER
  • JS COMPILER
  • C++ COMPILER
  • C COMPILER

JOBS AND INTERNSHIPS

  • TCS off-campus hiring 2022 for software engineers- 2019, 2020, & 2021 Batches

    February 27, 2022
  • Deloitte Recruitment For Any Graduates as Learning Operations Associate Analyst

    February 18, 2022
  • HP Recruitment For Tech Support Intern Position

    February 16, 2022
  • EY Hiring- PAS Global Immigration Advanced Analyst

    February 14, 2022
  • Amazon Recruitment Drive for Virtual Customer Support Associate Position

    February 12, 2022

@2019-21 - All Right Reserved. Designed and Developed by Techarge

TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • CONTACT US
  • WRITE +
  • ABOUT US
  • HIRE US