SlideShare a Scribd company logo
1 of 12
DATA MANIPULATION
LANGUAGE
Dr.SNS RAJALAKSHMI COLLEGE OF ARTS AND SCIENCE
COIMBATORE-49
(AUTONOMOUS)
Accredited by NAAC (Cycle-III) with ‘A+’ Grade
DEPARTMENT OF COMMERCE WITH FINANCE
CONTENTS
Introduction
SQL Commands
Data manipulation Language
Conclusion
INTRODUCTION
• A Relational database management system (RDBMS) is a database
management system (DBMS) that is based on the relational model as
introduced by E. F. Codd.
• RDBMS is the basis for SQL, and for all modern database systems like
MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Accss.
• MySQL is an open source SQL database, which is developed by a
Swedish company – MySQL AB.
• MySQL comes with a very fast, multi-threaded, multi-user and robust
SQL database server.
SQL COMMANDS
CREATE
ALTER
DROP
TRUNCATE
INSERT
UPDATE
DELETE
MERGE
GRANT
REVOKE
DDL DML DCL
Second Page
DATA MANIPULATION LANGUAGE
DML represents a collection of programming languages explicitly
used to make changes in the database.
 CRUD operations to create, read, update, and delete data
 Using the INSERT, SELECT, UPDATE and Delete commands.
In the beginning, DML commands were par of computer
programs only, but with the popularity of SQL, they have now
become a part of database management.
• DML have two primary classifications: Procedural and Non-
procedural programming (declarative programming).
SELECT: Command to fetch data or values from the database
INSERT: Command to add new or fresh value to the database
UPDATE: Command to change or update the present/existing
data to a newer value inside the database
DELETE: Command to remove or delete the values or data
information from the database’s current table
MERGE: Command to merge two or more data tables inside a
database.
SELECT COMMAND
• It is used to retrieve data from the database.
• This command allows database users to retrieve the specific
information they desire from an operational database.
• It returns a result set of records from one or more tables.
• For Example,
SELECT * FROM employee
where salary >=10,000;
Syntax:
SELECT * FROM <table_name>;
INSERT COMMAND
• It is used for inserting a data into a table.
• Using this command, you can add one or more records to any
single table in a database.
• It is also used to add records to an existing code.
For Examples,
INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (1, Kritesh, 45, ‘Delhi’, 2500.00
); INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (2, Mehta, 35,Kochi,
1500.00 );
All the above records will fetch the following result on checking the CUSTOMERS table as following:
| ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Kritesh | 45 | Delhi | 2500.00 ||
2 | Mehta | 35 | Kochi | 1500.00 ||
Syntax:
INSERT INTO <table_name> (`column_name1` <datatype>, `column_name2`
<datatype>, . . . , `column_name_n` <database>) VALUES (`value1`,
`value2`, . . . , `value n`);
UPDATE COMMAND
• It is used to modify the records present in existing table.
• This command updates existing data within a table.
• It changes the data of one or more records in a table.
UPDATE CUSTOMERSSET ADDRESS = ‘Indore’WHERE ID = 2;On
checking, the customer records will fetch the following result:
| ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Kritesh | 45 | Delhi | 2500.00 ||
2 | Mehta | 35 | Indore | 1500.00 ||
UPDATE CUSTOMERSSET ADDRESS = ‘Indore’, SALARY = 3000.00;
ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Kritesh | 45 | Delhi | 2500.00 ||
2 | Mehta | 35 | Indore | 3000.00 ||
Syntax:
UPDATE <table_name>
SET <column_name = value>
WHERE condition;
DELETE COMMAND
• DELETE command is used to delete some or all records from
the existing table.
• It deletes all the records from a table.
SQL>DELETE FROM employee WHERE emp_id = '1';
SQL> DELETE FROM CUSTOMERS;
This will delete all records of the customers from a specific database,
respectively.
Syntax:
DELETE FROM
<table_name> WHERE
<condition>;
data manipulation language

More Related Content

What's hot (20)

Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation Language
 
Group By, Order By, and Aliases in SQL
Group By, Order By, and Aliases in SQLGroup By, Order By, and Aliases in SQL
Group By, Order By, and Aliases in SQL
 
Sql commands
Sql commandsSql commands
Sql commands
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
SQL
SQLSQL
SQL
 
Dbms
DbmsDbms
Dbms
 
Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
Cursores.ppt
Cursores.pptCursores.ppt
Cursores.ppt
 
Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In Sql
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Sql queries presentation
Sql queries presentationSql queries presentation
Sql queries presentation
 
SQL UNION
SQL UNIONSQL UNION
SQL UNION
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Sql operator
Sql operatorSql operator
Sql operator
 
SQL logical operators
SQL logical operatorsSQL logical operators
SQL logical operators
 
Sql Constraints
Sql ConstraintsSql Constraints
Sql Constraints
 

Similar to data manipulation language

hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxEliasPetros
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxEliasPetros
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowPavithSingh
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxBhupendraShahi6
 
Mysql-overview.pptx
Mysql-overview.pptxMysql-overview.pptx
Mysql-overview.pptxTamilHunt
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSabrinaShanta2
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSaiMiryala1
 
Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptDrRShaliniVISTAS
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL ISankhya_Analytics
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETEAbrar ali
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...Jürgen Ambrosi
 

Similar to data manipulation language (20)

hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
 
Lab
LabLab
Lab
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
Mysql-overview.pptx
Mysql-overview.pptxMysql-overview.pptx
Mysql-overview.pptx
 
chapter 8 SQL.ppt
chapter 8 SQL.pptchapter 8 SQL.ppt
chapter 8 SQL.ppt
 
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
 
Module02
Module02Module02
Module02
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
 
intro for sql
intro for sql intro for sql
intro for sql
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
lovely
lovelylovely
lovely
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 

Recently uploaded

Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 

Recently uploaded (20)

Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 

data manipulation language

  • 1. DATA MANIPULATION LANGUAGE Dr.SNS RAJALAKSHMI COLLEGE OF ARTS AND SCIENCE COIMBATORE-49 (AUTONOMOUS) Accredited by NAAC (Cycle-III) with ‘A+’ Grade DEPARTMENT OF COMMERCE WITH FINANCE
  • 3. INTRODUCTION • A Relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. • RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Accss. • MySQL is an open source SQL database, which is developed by a Swedish company – MySQL AB. • MySQL comes with a very fast, multi-threaded, multi-user and robust SQL database server.
  • 4.
  • 6. Second Page DATA MANIPULATION LANGUAGE DML represents a collection of programming languages explicitly used to make changes in the database.  CRUD operations to create, read, update, and delete data  Using the INSERT, SELECT, UPDATE and Delete commands. In the beginning, DML commands were par of computer programs only, but with the popularity of SQL, they have now become a part of database management. • DML have two primary classifications: Procedural and Non- procedural programming (declarative programming).
  • 7. SELECT: Command to fetch data or values from the database INSERT: Command to add new or fresh value to the database UPDATE: Command to change or update the present/existing data to a newer value inside the database DELETE: Command to remove or delete the values or data information from the database’s current table MERGE: Command to merge two or more data tables inside a database.
  • 8. SELECT COMMAND • It is used to retrieve data from the database. • This command allows database users to retrieve the specific information they desire from an operational database. • It returns a result set of records from one or more tables. • For Example, SELECT * FROM employee where salary >=10,000; Syntax: SELECT * FROM <table_name>;
  • 9. INSERT COMMAND • It is used for inserting a data into a table. • Using this command, you can add one or more records to any single table in a database. • It is also used to add records to an existing code. For Examples, INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (1, Kritesh, 45, ‘Delhi’, 2500.00 ); INSERT INTO CUSTOMERS (ID,NAME,AGE,CITY,COMPENSATION)VALUES (2, Mehta, 35,Kochi, 1500.00 ); All the above records will fetch the following result on checking the CUSTOMERS table as following: | ID | NAME | AGE | ADDRESS | SALARY | | 1 | Kritesh | 45 | Delhi | 2500.00 || 2 | Mehta | 35 | Kochi | 1500.00 || Syntax: INSERT INTO <table_name> (`column_name1` <datatype>, `column_name2` <datatype>, . . . , `column_name_n` <database>) VALUES (`value1`, `value2`, . . . , `value n`);
  • 10. UPDATE COMMAND • It is used to modify the records present in existing table. • This command updates existing data within a table. • It changes the data of one or more records in a table. UPDATE CUSTOMERSSET ADDRESS = ‘Indore’WHERE ID = 2;On checking, the customer records will fetch the following result: | ID | NAME | AGE | ADDRESS | SALARY | | 1 | Kritesh | 45 | Delhi | 2500.00 || 2 | Mehta | 35 | Indore | 1500.00 || UPDATE CUSTOMERSSET ADDRESS = ‘Indore’, SALARY = 3000.00; ID | NAME | AGE | ADDRESS | SALARY | | 1 | Kritesh | 45 | Delhi | 2500.00 || 2 | Mehta | 35 | Indore | 3000.00 || Syntax: UPDATE <table_name> SET <column_name = value> WHERE condition;
  • 11. DELETE COMMAND • DELETE command is used to delete some or all records from the existing table. • It deletes all the records from a table. SQL>DELETE FROM employee WHERE emp_id = '1'; SQL> DELETE FROM CUSTOMERS; This will delete all records of the customers from a specific database, respectively. Syntax: DELETE FROM <table_name> WHERE <condition>;