SlideShare a Scribd company logo
Data Manipulation Language
Jas Singh Bhasin
 The DBMS provides a set of operations or a
language called the data manipulation
language (DML) for modification of the
data.
 Data manipulation can be performed
either by typing SQL statements or by using
a graphical interface, typically called
Query-By-Example (QBE).
What is Data Manipulation Language?
2
High-level or Non-Procedural DML
1. It is called as set-at-a-time or set-
oriented DML.
2. It can be used on its own to specify
complex database operations
concisely.
3. It is declarative in nature.
4. DML requires a user to specify what
data are needed without
specifying how to get those data.
5. For e.g. : Each SQL statement is a
declarative command.
Low-level or Procedural DML
1. It is called as record-at-a-time DML.
2. Must be embedded in a general-
purpose programming language .
3. It is imperative in nature.
4. DML requires a user to specify what
data are needed and how to get
those data.
5. For e.g. : Oracle’s PL/SQL and DB2′s
SQL PL.
3
Types of DML
 Select (For Retrieval)
 Insert Into (For Insertion)
 Delete (For Deletion)
 Update (For Modification)
The main SQL DML statements are:
4
SELECT
The WHERE-clause specifies the conditions for selection and
join of tuples from the relations specified in the FROM-clause
Select
A query in SQL can consist of up to six clauses, but only the first two, SELECT
and FROM, are mandatory. The clauses are specified in the following order:
The SELECT-clause lists the attributes or functions to be
retrieved
The FROM-clause specifies all relations (or aliases) needed in
the query
GROUP BY specifies grouping attributes
HAVING specifies a condition for selection of groups
ORDER BY specifies an order for displaying the result of a query
SELECT
ORDER BY
FROM
WHERE
GROUP
BY
HAVING
6
7
An Example
Student
Enroll_No Name Course Semester Section
A1000712011 YASHIKA TYAGI MCA 3 A
A1000712014 PANKAJ NARAYAN MCA 3 A
A1000712023 AYUSHI GARG MCA 3 A
A1000712024 APOORVA GUPTA MCA 3 A
A1000712033 JAS BHASIN MCA 3 A
8
Select
SELECT * FROM Student
Enroll_No Name Course Semester Section
A1000712011 YASHIKA TYAGI MCA 3 A
A1000712014 PANKAJ NARAYAN MCA 3 A
A1000712023 AYUSHI GARG MCA 3 A
A1000712024 APOORVA GUPTA MCA 3 A
A1000712033 JAS BHASIN MCA 3 A
SELECT Enroll_No, Name
FROM Student
WHERE Enroll_NO=A1000712033
9
Select
Enroll_No Name
A1000712033 JAS BHASIN
INSERT INTO
 In its simplest form, it is used to add one or more tuples to a
relation.
 Attribute values should be listed in the same order as the
attributes were specified in the CREATE TABLE command.
 Syntax:
INSERT INTO table_name
VALUES (value1,value2,value3,...);
INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
INSERT INTO
11
INSERT INTO Student
VALUES (‘A1000712037’, ‘REMYA’, ‘MCA’, 3, ‘A’)
//You have made changes to the database. Rows affected: 1
12
INSERT INTO
Enroll_No Name Course Semester Section
A1000712011 YASHIKA TYAGI MCA 3 A
A1000712014 PANKAJ NARAYAN MCA 3 A
A1000712023 AYUSHI GARG MCA 3 A
A1000712024 APOORVA GUPTA MCA 3 A
A1000712033 JAS BHASIN MCA 3 A
A1000712037 REMYA MCA 3 A
Student
DELETE
 The DELETE statement is used to delete rows in a table.
 Syntax:
DELETE FROM table_name
WHERE some_column=some_value;
 The WHERE clause specifies which record or records that should
be deleted. If you omit the WHERE clause, all records will be
deleted!
DELETE
14
DELETE FROM Student
WHERE Enroll_No = ‘A1000712037’
//You have made changes to the database. Rows affected: 1
15
DELETE
Enroll_No Name Course Semester Section
A1000712011 YASHIKA TYAGI MCA 3 A
A1000712014 PANKAJ NARAYAN MCA 3 A
A1000712023 AYUSHI GARG MCA 3 A
A1000712024 APOORVA GUPTA MCA 3 A
A1000712033 JAS BHASIN MCA 3 A
Student
UPDATE
 The UPDATE statement is used to update existing records in a
table.
 Once data has been inserted into a table in the database, we
can access individual attributes to update them.
 Syntax:
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
 The WHERE clause specifies which record or records that should
be updated. If you omit the WHERE clause, all records will be
updated!
UPDATE
17
UPDATE Student
SET Name = ‘V.K. REMYA’
WHERE Name = REMYA
//You have made changes to the database. Rows affected: 1
18
UPDATE
Enroll_No Name Course Semester Section
A1000712011 YASHIKA TYAGI MCA 3 A
A1000712014 PANKAJ NARAYAN MCA 3 A
A1000712023 AYUSHI GARG MCA 3 A
A1000712024 APOORVA GUPTA MCA 3 A
A1000712033 JAS BHASIN MCA 3 A
A1000712037 V.K. REMYA MCA 3 A
Student
 The ORDER BY keyword is used to sort the result-set by one or more
columns.
 The ORDER BY keyword sorts the records in ascending order by
default. To sort the records in a descending order, you can use
the DESC keyword.
 Syntax:
SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;
 The GROUP BY statement is used in conjunction with the
aggregate functions to group the result-set by one or more
columns.
 Syntax:
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name;
ORDER BY & GROUP BY
19
ORDER BY EXAMPLE
20
cust_id item total price
1 balloon 1
2 apple 3
1 apple 4
1 pillow 25
3
plastic
bag
1
shopping
SELECT * FROM shopping ORDER BY total_price
cust_id item total price
1 balloon 1
3
plastic bag
1
2 apple 3
1 apple 4
1 pillow 25
GROUP BY EXAMPLE
21
cust_id item total price
1 balloon 1
2 apple 3
1 apple 4
1 pillow 25
3
plastic
bag
1
shopping
SELECT cust_id, SUM(total_price) FROM
shopping GROUP BY cust_id
cust_id SUM(total_price)
1 30
2 3
3 1
THANK YOU!

More Related Content

What's hot

SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
Sharad Dubey
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptx
Anusha sivakumar
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
Ravinder Kamboj
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbms
Vignesh Saravanan
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
SQL subquery
SQL subquerySQL subquery
SQL subquery
Vikas Gupta
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
Adeel Rasheed
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
Ordbms
OrdbmsOrdbms
Sequences and indexes
Sequences and indexesSequences and indexes
Sequences and indexes
Balqees Al.Mubarak
 
joins in database
 joins in database joins in database
joins in database
Sultan Arshad
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Shakila Mahjabin
 
DBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCLDBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCL
Sreedhar Chowdam
 
Aggregate function
Aggregate functionAggregate function
Aggregate function
Rayhan Chowdhury
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
Anusha sivakumar
 

What's hot (20)

SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptx
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbms
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL subquery
SQL subquerySQL subquery
SQL subquery
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Sequences and indexes
Sequences and indexesSequences and indexes
Sequences and indexes
 
joins in database
 joins in database joins in database
joins in database
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
DBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCLDBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCL
 
Aggregate function
Aggregate functionAggregate function
Aggregate function
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
 

Viewers also liked

DML Commands
DML CommandsDML Commands
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
SQL Data Manipulation
SQL Data ManipulationSQL Data Manipulation
SQL Data Manipulation
khalid alkhafagi
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
1keydata
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
1keydata
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
eVideoTuition
 
4. SQL in DBMS
4. SQL in DBMS4. SQL in DBMS
4. SQL in DBMSkoolkampus
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
Guru Ji
 
From crash to testcase
From crash to testcaseFrom crash to testcase
From crash to testcase
Roel Van de Paar
 
DBMS : Relational Algebra
DBMS : Relational Algebra DBMS : Relational Algebra
DBMS : Relational Algebra
Sridhar Baithi
 
Data integrity Dbms presentation 12 cs 18
Data integrity Dbms presentation 12 cs 18Data integrity Dbms presentation 12 cs 18
Data integrity Dbms presentation 12 cs 18
Engr Imran Ashraf
 
Nested Queries Lecture
Nested Queries LectureNested Queries Lecture
Nested Queries Lecture
Felipe Costa
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013
Prosanta Ghosh
 

Viewers also liked (20)

DML Commands
DML CommandsDML Commands
DML Commands
 
Dml and ddl
Dml and ddlDml and ddl
Dml and ddl
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
SQL Data Manipulation
SQL Data ManipulationSQL Data Manipulation
SQL Data Manipulation
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
 
4. SQL in DBMS
4. SQL in DBMS4. SQL in DBMS
4. SQL in DBMS
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
Dbms models
Dbms modelsDbms models
Dbms models
 
From crash to testcase
From crash to testcaseFrom crash to testcase
From crash to testcase
 
DBMS : Relational Algebra
DBMS : Relational Algebra DBMS : Relational Algebra
DBMS : Relational Algebra
 
Data integrity Dbms presentation 12 cs 18
Data integrity Dbms presentation 12 cs 18Data integrity Dbms presentation 12 cs 18
Data integrity Dbms presentation 12 cs 18
 
Nested Queries Lecture
Nested Queries LectureNested Queries Lecture
Nested Queries Lecture
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 
trigger dbms
trigger dbmstrigger dbms
trigger dbms
 

Similar to Data Manipulation Language

SQL commands
SQL commandsSQL commands
SQL commands
GirdharRatne
 
lab14444444444444444444444444444444444444444
lab14444444444444444444444444444444444444444lab14444444444444444444444444444444444444444
lab14444444444444444444444444444444444444444
227567
 
Dbms presentationnnnn
Dbms presentationnnnnDbms presentationnnnn
Dbms presentationnnnn
sumi haque
 
Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | Edureka
Edureka!
 
Structured Query Language (SQL).pptx
Structured Query Language (SQL).pptxStructured Query Language (SQL).pptx
Structured Query Language (SQL).pptx
EllenGracePorras
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
BhupendraShahi6
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SabrinaShanta2
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SaiMiryala1
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
KeerthanaP37
 
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdfCC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
ozaixyzo
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 
DBMS summer 19.pdf
DBMS summer 19.pdfDBMS summer 19.pdf
DBMS summer 19.pdf
SohamKotalwar1
 
Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
DrRShaliniVISTAS
 
Basics on SQL queries
Basics on SQL queriesBasics on SQL queries
Basics on SQL queries
Knoldus Inc.
 
Structured Query Language (SQL) Part 2.pptx
Structured Query Language (SQL) Part 2.pptxStructured Query Language (SQL) Part 2.pptx
Structured Query Language (SQL) Part 2.pptx
EllenGracePorras
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
 
Sql intro
Sql introSql intro
Sql introglubox
 
Database Programming using SQL
Database Programming using SQLDatabase Programming using SQL
Database Programming using SQL
Ajit Nayak
 

Similar to Data Manipulation Language (20)

SQL commands
SQL commandsSQL commands
SQL commands
 
lab14444444444444444444444444444444444444444
lab14444444444444444444444444444444444444444lab14444444444444444444444444444444444444444
lab14444444444444444444444444444444444444444
 
Dbms presentationnnnn
Dbms presentationnnnnDbms presentationnnnn
Dbms presentationnnnn
 
Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | Edureka
 
Structured Query Language (SQL).pptx
Structured Query Language (SQL).pptxStructured Query Language (SQL).pptx
Structured Query Language (SQL).pptx
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdfCC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
CC105-WEEK10-11-INTRODUCTION-TO-SQL.pdf
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
 
DBMS summer 19.pdf
DBMS summer 19.pdfDBMS summer 19.pdf
DBMS summer 19.pdf
 
Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
 
Basics on SQL queries
Basics on SQL queriesBasics on SQL queries
Basics on SQL queries
 
Structured Query Language (SQL) Part 2.pptx
Structured Query Language (SQL) Part 2.pptxStructured Query Language (SQL) Part 2.pptx
Structured Query Language (SQL) Part 2.pptx
 
Dbms record
Dbms recordDbms record
Dbms record
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Sql intro
Sql introSql intro
Sql intro
 
Database Programming using SQL
Database Programming using SQLDatabase Programming using SQL
Database Programming using SQL
 

Recently uploaded

一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 

Recently uploaded (20)

一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 

Data Manipulation Language

  • 2.  The DBMS provides a set of operations or a language called the data manipulation language (DML) for modification of the data.  Data manipulation can be performed either by typing SQL statements or by using a graphical interface, typically called Query-By-Example (QBE). What is Data Manipulation Language? 2
  • 3. High-level or Non-Procedural DML 1. It is called as set-at-a-time or set- oriented DML. 2. It can be used on its own to specify complex database operations concisely. 3. It is declarative in nature. 4. DML requires a user to specify what data are needed without specifying how to get those data. 5. For e.g. : Each SQL statement is a declarative command. Low-level or Procedural DML 1. It is called as record-at-a-time DML. 2. Must be embedded in a general- purpose programming language . 3. It is imperative in nature. 4. DML requires a user to specify what data are needed and how to get those data. 5. For e.g. : Oracle’s PL/SQL and DB2′s SQL PL. 3 Types of DML
  • 4.  Select (For Retrieval)  Insert Into (For Insertion)  Delete (For Deletion)  Update (For Modification) The main SQL DML statements are: 4
  • 6. The WHERE-clause specifies the conditions for selection and join of tuples from the relations specified in the FROM-clause Select A query in SQL can consist of up to six clauses, but only the first two, SELECT and FROM, are mandatory. The clauses are specified in the following order: The SELECT-clause lists the attributes or functions to be retrieved The FROM-clause specifies all relations (or aliases) needed in the query GROUP BY specifies grouping attributes HAVING specifies a condition for selection of groups ORDER BY specifies an order for displaying the result of a query SELECT ORDER BY FROM WHERE GROUP BY HAVING 6
  • 7. 7 An Example Student Enroll_No Name Course Semester Section A1000712011 YASHIKA TYAGI MCA 3 A A1000712014 PANKAJ NARAYAN MCA 3 A A1000712023 AYUSHI GARG MCA 3 A A1000712024 APOORVA GUPTA MCA 3 A A1000712033 JAS BHASIN MCA 3 A
  • 8. 8 Select SELECT * FROM Student Enroll_No Name Course Semester Section A1000712011 YASHIKA TYAGI MCA 3 A A1000712014 PANKAJ NARAYAN MCA 3 A A1000712023 AYUSHI GARG MCA 3 A A1000712024 APOORVA GUPTA MCA 3 A A1000712033 JAS BHASIN MCA 3 A
  • 9. SELECT Enroll_No, Name FROM Student WHERE Enroll_NO=A1000712033 9 Select Enroll_No Name A1000712033 JAS BHASIN
  • 11.  In its simplest form, it is used to add one or more tuples to a relation.  Attribute values should be listed in the same order as the attributes were specified in the CREATE TABLE command.  Syntax: INSERT INTO table_name VALUES (value1,value2,value3,...); INSERT INTO table_name (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO 11
  • 12. INSERT INTO Student VALUES (‘A1000712037’, ‘REMYA’, ‘MCA’, 3, ‘A’) //You have made changes to the database. Rows affected: 1 12 INSERT INTO Enroll_No Name Course Semester Section A1000712011 YASHIKA TYAGI MCA 3 A A1000712014 PANKAJ NARAYAN MCA 3 A A1000712023 AYUSHI GARG MCA 3 A A1000712024 APOORVA GUPTA MCA 3 A A1000712033 JAS BHASIN MCA 3 A A1000712037 REMYA MCA 3 A Student
  • 14.  The DELETE statement is used to delete rows in a table.  Syntax: DELETE FROM table_name WHERE some_column=some_value;  The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted! DELETE 14
  • 15. DELETE FROM Student WHERE Enroll_No = ‘A1000712037’ //You have made changes to the database. Rows affected: 1 15 DELETE Enroll_No Name Course Semester Section A1000712011 YASHIKA TYAGI MCA 3 A A1000712014 PANKAJ NARAYAN MCA 3 A A1000712023 AYUSHI GARG MCA 3 A A1000712024 APOORVA GUPTA MCA 3 A A1000712033 JAS BHASIN MCA 3 A Student
  • 17.  The UPDATE statement is used to update existing records in a table.  Once data has been inserted into a table in the database, we can access individual attributes to update them.  Syntax: UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value;  The WHERE clause specifies which record or records that should be updated. If you omit the WHERE clause, all records will be updated! UPDATE 17
  • 18. UPDATE Student SET Name = ‘V.K. REMYA’ WHERE Name = REMYA //You have made changes to the database. Rows affected: 1 18 UPDATE Enroll_No Name Course Semester Section A1000712011 YASHIKA TYAGI MCA 3 A A1000712014 PANKAJ NARAYAN MCA 3 A A1000712023 AYUSHI GARG MCA 3 A A1000712024 APOORVA GUPTA MCA 3 A A1000712033 JAS BHASIN MCA 3 A A1000712037 V.K. REMYA MCA 3 A Student
  • 19.  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the records in ascending order by default. To sort the records in a descending order, you can use the DESC keyword.  Syntax: SELECT column_name,column_name FROM table_name ORDER BY column_name,column_name ASC|DESC;  The GROUP BY statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.  Syntax: SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name; ORDER BY & GROUP BY 19
  • 20. ORDER BY EXAMPLE 20 cust_id item total price 1 balloon 1 2 apple 3 1 apple 4 1 pillow 25 3 plastic bag 1 shopping SELECT * FROM shopping ORDER BY total_price cust_id item total price 1 balloon 1 3 plastic bag 1 2 apple 3 1 apple 4 1 pillow 25
  • 21. GROUP BY EXAMPLE 21 cust_id item total price 1 balloon 1 2 apple 3 1 apple 4 1 pillow 25 3 plastic bag 1 shopping SELECT cust_id, SUM(total_price) FROM shopping GROUP BY cust_id cust_id SUM(total_price) 1 30 2 3 3 1