+91-90427 10472
         
Dot net training in Chennai -Maria Academy

SQL – Programming language

16 Jul 2022

Database:

A database is an organized collection of structured information stored electronically in a computer system. It is controlled by a database management system (DBMS). A database most often contains one or more tables. Each table is identified by a name, the tables contain records with data.

SQL

SQL stands for Structured Query Language.

SQL is a standard language for relational database management system. Unlike Excel, SQL can handle over one million fields of data easily. SQL queries are more flexible than MS Excel formulas.

SQL is widely used in data science and analytics. SQL can be used in all modern relational database management systems like SQL Server, Oracle, mysql, etc.

SQL allows to

  • Create new databases, tables and stored procedures.
  • Insert, update, delete or retrieve any data from databases.
  • Execute queries in a database.

SQL commands is classified as below:

  • DDL Commands
  • DML Commands
  • DQL Commands
  • TCL Commands
  • DCL Commands

DDL Commands (Data Definition language) – used to define the database schemas, i.e. to create / modify / delete database structures.

  • Create – Command is used to create database, tables, and views.
  • Drop – Used to drop databases.
  • Alter – It is used to alter the structure of the table and databases
  • Truncate – It is used to completely remove all records from a table
  • Comment – used to add comment in data dictionary
  • Rename – used to rename an existing object in database

DML Commands (Data Manipulation Language) – used to manipulate the data present in database.

  • Insert: used to insert data into a table
  • Update: it updates existing data within a table
  • Delete: it deletes all records from a table

DQL Commands (Data Query Language) – used to perform queries on data within scheme objects.

  • Select: used to retrieve the data from the database

TCL commands (Transaction Control Language) – Used to maintain consistency of the database and to manage the transactions made by the DML commands.

  • Commit: used to permanently save any transaction into the database.
  • Rollback: it restores the database to last saved state.
  • Savepoint: used to temporarily save a transaction

DCL Commands (Data Control Language) – Used to control access to data stored in a database.

  • Grant: allows to perform specified tasks by specified users.
  • Revoke: cancels the previously granted or denied permissions.

 

Social tagging: >