0% found this document useful (0 votes)
21 views

SQL Commands

These are sql commands

Uploaded by

jr
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

SQL Commands

These are sql commands

Uploaded by

jr
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

School of Computing

Science and Engineering

Program: B.Tech
Course Code:E2UC302B
Course Name:Database Management
System

Dr.Manikant Panthi
School of Computing Science and Engineering
Course Code :E2UC302B Course Name: DBMS

Recommended Books
Text books
• Abraham Silberschatz, Henry F. Korth and S. Sudarshan- “Database System
Concepts”, Fourth Edition, McGraw-Hill, 2002.

Reference Book
• Ramez Elmasri and Shamkant B. Navathe, “Fundamental Database
Systems”, Third Edition, Pearson Education, 2003.
• Raghu Ramakrishnan, “Database Management System”, Tata McGraw- Hill
Publishing Company, 2003.
• Hector Garcia–Molina, Jeffrey D.Ullman and Jennifer Widom- “Database
System Implementation”- Pearson Education- 2000.
• Peter Rob and Corlos Coronel- “Database System, Design, Implementation
and Management”, Thompson Learning Course Technology- Fifth edition,
2003

Program Name: B.Tech Program Code: E2UC302B


Continuous Assessment Pattern
School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Continuous Assessment Pattern

Mid Term Test End Term Test


Practical Total Marks
(MTE) (ETE)

25+25=50 50 100 200

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Database Management System


A Database Management System (DBMS) is a collection of
database and stored procedures. A DBMS enables you to store,
extract and manage important information from a database. It is
software that is used to maintain data security and data integrity in
a structured database.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Database Management System


DBMS helps in maintaining and retrieving data in different form.
There are various tools available for DBMS:
-Oracle
-INGRES
-Sybase
-Microsoft SQL Server
-Ms-Access
-IBM-DB-II
-My SQL

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Application of DBMS
-Banking: For account holder information, amount with draw and
deposit, load and other transactions
-Airlines: For reservations, cancelation, fare detail and airline
schedules

-Universities: For student registration, examination, fee detail,


course detail and other information.

-Manufacturing: For inventory, production, sale and purchase orders


-Human Resources: Employee records, salaries, tax deductions,
allowances
-Multimedia application
-Graphical Information System (GIS)
Program Name: B.Tech Program Code: E2UC302B
School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Introduction to SQL
 Structured Query Language or SQL is a standard computer
language for accessing and manipulating database systems.

 SQL comprises one of the fundamental building blocks of modern


database architecture.

 SQL defines methods using which user can create and manipulate
databases on all major platforms.

 SQL is a procedural language like C or BASIC.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B Course Name: DBMS

Characteristics of SQL
 SQL allows the user to create, update, delete, and retrieve data from a database.

 SQL is very simple and easy to learn.

 High Speed

 Allows users to create view, stored procedure, functions in a database.

 Allows users to set permissions on tables, procedures, and views


 SQL commands are instructions. It is used to communicate with the database. It is also
used to perform specific tasks, functions, and queries of data.
 SQL can perform various tasks like create a table, add data to tables, drop the table,
modify the table, set permission for users.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering

Types of SQL Commands


 SQL Categorizes its commands on the basis of functionalities performed by
them.
 There are five types of SQL Commands which can be depicted below:

Data query
Data Control Language
Transaction
Language
Control
Data Language
Data Definition Language Manipulation
Language

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

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.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Definition Language (DDL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Definition Language (DDL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Definition Language (DDL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

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.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Manipulation Language (DML)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Manipulation Language (DML)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Manipulation Language (DML)


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Control Language (DCL)


 TCL commands mainly provides special privilege access to users and is
also used to specify the roles of users accordingly.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Control Language (DCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Control Language (DCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Control Language (DCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

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.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Query Language (DQL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Query Language (DQL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Query Language (DQL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Data Query Language (DQL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)


Transaction Control Language (TCL) commands are used to manage transactions
in a database, ensuring that they are processed reliably. The primary TCL
commands are COMMIT, ROLLBACK, SAVEPOINT, and SET TRANSACTION.
These commands are essential for controlling and managing changes made by
DML operations like INSERT, UPDATE, and DELETE.

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B


School of Computing Science and Engineering
Course Code : E2UC302B
Course Name: DBMS

Transaction Control Language (TCL)

Program Name: B.Tech Program Code: E2UC302B

You might also like