Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

INTRODUCTION TO

SQL SCRIPTING

MUHAIMIN P. MACAPUNDAG
INTRODUCTION TO SQL SCRIPTING

What is SQL?
 It is a standard programming language specifically designed for storing,
retrieving, managing or manipulating the data inside a relational
database management system (RDBMS).
INTRODUCTION TO SQL SCRIPTING

What you can do in SQL?


 Create a database
 Create tables in a database
 Query or request information from a database
 Insert records in a database
 Update or modify records in a database
 Delete records from the database
 Set permissions or access control within the database for data security
 Create transactions and store procedures for a more efficient database
management
INTRODUCTION TO SQL SCRIPTING

Types of SQL Commands


 Data Definition Language (DDL)
 Data Manipulation Language (DML)
 Data Control Language (DCL)
 Data Query Language (DQL)
 Transaction Control Language (TCL)
INTRODUCTION TO SQL SCRIPTING

Data Definition Language (DDL)


 In order to make/perform changes on the physical structure of any
table residing inside a database, DDL is used.
 These commands when executed are auto commit in nature and all
the changes in the table are reflected and saved immediately.
INTRODUCTION TO SQL SCRIPTING

Data Definition Language (DDL)


INTRODUCTION TO SQL SCRIPTING

Data Definition Language (DDL)


INTRODUCTION TO SQL SCRIPTING

Data Definition Language (DDL)


INTRODUCTION TO SQL SCRIPTING

Data Manipulation Language (DML)


 Once the tables are created and database is generated using DDL
commands, manipulation inside those tables and databases is done
using DML commands.
 he advantage of using DML commands is, if in case any wrong changes
or values are made, they can be changes and rolled back easily.
INTRODUCTION TO SQL SCRIPTING

Data Manipulation Language (DML)


INTRODUCTION TO SQL SCRIPTING

Data Manipulation Language (DML)


INTRODUCTION TO SQL SCRIPTING

Data Control Language (DCL)


 DCL commands as the name suggests manages the matters and issues
related to the data control in any database.
 TCL commands mainly provides special privilege access to users and
is also used to specify the roles of users accordingly.
INTRODUCTION TO SQL SCRIPTING

Data Control Language (DCL)


INTRODUCTION TO SQL SCRIPTING

Data Query Language (DQL)


 Data query language consists of only one command over which data
selection in SQL relies.
 SELECT command in combination with other SQL clauses is used to
retrieve and fetch data from database/tables on the basis of certain
conditions applied by user.
INTRODUCTION TO SQL SCRIPTING

Data Query Language (DQL)


INTRODUCTION TO SQL SCRIPTING

Transaction Control Language (TCL)


 Transaction Control Language as the name suggests manages the
issues and matters related to the transactions in any database.
 They are used to rollback or commit the changes in the database.
 Roll back means “Undo” the changes and Commit means “Applying”
the changes.
INTRODUCTION TO SQL SCRIPTING

Transaction Control Language (TCL)

You might also like