SlideShare a Scribd company logo
1 of 26
SUBJECT : DATABASE SYSTEM
TOPIC : DATABASE LANGUAGES
PREPARED BY
Ms.J.Monica -III-B.Sc - Information Technology
Ms.V.K.Vidhyaa lakshmi -III-B.Sc-Information Technology
UNDER THE GUIDANCE OF
Mrs.P.Anusha M.Sc(IT).,M.Phil.,D.P.T.T.,(Ph.D).,
Assistant professor,
Department of Information Technology,
Bon secours college for women,
Thanjavur.
DATABASE
LANGUAGE
DEFINITION :
 A DBMS has appropriate languages and interface to
express database queries and updates.
 Database languages can be used to read, store and
update the date in the database.
CLASSIFICATION OF DBMS
LANGUAGE
1. CREATE 1. SELECT 1. COMMIT 1. GRANT
2. ALTER 2. INSERT 2. ROLLBACK 2. REVOKE
3. DROP 3. UPDATE 3. TRANSACTION
4. TRUNCATE 4. DELETE 4. SAVEPOINT
5. RENAME 5. MERGE
6. CALL
DATABASE LANGUAGES
DATA
DEFINITION
LANGUAGES
DATA
MANIPULATION
LANGUAGES
DATA CONTROL
LANGUAGES
TRANSACTION
LANGUAGES
DATABASE DEFINITION LANGUAGE
(DDL)
 DDL stands for Data Definition Language.
 It is used to define database structure or pattern.
 It is used to create schema, tables, indexes, constraints, etc. in the database.
 Data definition language is used to store the information of metadata like the
number of tables and schemas, their names, indexes, columns in each table,
constraints, etc.
 Using the DDL statements, you can create the skeleton of the database.
QUERY
 CREATE
- It is used to create objects in the database.
 ALTER
- It is used to alter the structure of the database.
 DROP
- It is used to delete objects from the database.
 TRUNCATE
- It is used to remove all records from a table.
 RENAME
- It is used to rename an object.
CREATE DATABASE
The CREATE DATABASE command is used to create a new SQL
database.
SYNTAX :
CREATE DATABASE databasename ;
EXAMPLE :
CREATE DATABASE bon secours ;
DROP DATABASE
The DROP DATABASE command is used to delete an
existing SQL database.
SYNTAX :
DROP DATABASE databasename ;
EXAMPLE :
DROP DATABASE bon secours ;
CREATE TABLE
The CREATE TABLE command creates a new table in the database.
SYNTAX :
CREATE TABLE Tablename(column1 datatype, column2
datatype, column3 datatype);
EXAMPLE :
CREATE TABLE Student(stud-id int, name varchar(255), age
int);
01 IVAN 25
02 JOSHIYA 30
03 VARUN 24
ALTER TABLE
 The ALTER TABLE command adds, deletes, or modifies columns in a table.
 The ALTER TABLE command also adds and deletes various constraints in a table.
(ALTER TABLE – ADD COLUMN)
SYNTAX:
ALTER TABLE tablename add columnname datatype;
EXAMPLE :
ALTER TABLE student add mobile int;
(ALTER TABLE – DROP COLUMN)
SYNTAX :
ALTER TABLE tablename drop column columnname;
EXAMPLE :
ALTER TABLE student drop column mobile;
01 Malini 20 1234456
02 mano 23 2345673
01 Malini 20
02 Mano 23
ALTER COLUMN
 The ALTER COLUMN command is used to change the data
type of a column in a table.
 The following SQL changes the data type of the column named
“BirthDate” in the “Employees” table to type year:
EXAMPLE :
ALTER TABLE Employees ALTER COLUMN BirthDate
year;
DROP TABLE
The DROP TABLE command deletes a table in the database.
SYNTAX :
DROP TABLE Tablename;
EXAMPLE :
DROP TABLE student ;
CREATED TABLE :
RESULT :
EMPTY SET
EMPTY SET
01 MOUNA 22
02 MARIYAM 23
TRUNCATE TABLE
The TRUNCATE TABLE command deletes the data inside a table, but not the table itself.
SYNTAX :
TRUNCATE TABLE Tablename;
EXAMPLE :
TRUNCATE TABLE student;
CREATED TABLE :
RESULT :
EMPTY SET
EMPTY SET
01 mano 34
02 velu 45
DATA MANUPULATION
LANGUAGE (DML)
 DML stands for Data Manipulation Language.
 It is used for accessing and manipulating data in a database.
 It handles user requests.
 A data-manipulation language (DML) is a language that
enables users to access or manipulate data as organized by
the appropriate data model.
The types of access are:
• Retrieval of information stored in the
database
• Insertion of new information into the
database
• Deletion of information from the
database
• Modification of information stored in the
database
CLASSIFICATION OF DML
DATA MANIPULATION LANGUAGE
PROCEDURAL DECLARATIVE
PROCEDURAL DML :
Procedural DMLs require a user to specify
what data are needed and how to get those data.
DECLARATIVE DML :
Declarative DMLs (also referred to as nonprocedural
DMLs) require a user to specify what data are needed
without specifying how to get those data.
QUERY
 SELECT :
- It is used to retrieve data from a database.
 INSERT :
- It is used to insert data into a table.
 UPDATE :
-It is used to update existing data within a table.
 DELETE :
- It is used to delete all records from a table.
 MERGE :
- It performs UPSERT operation, i.e., insert or update
operations.
 CALL :
- It is used to call a structured query language or a Java
subprogram.
SELECT
The SELECT command is used to select data from a database. The
data returned is stored in a result table, called the result set.
• To display the column:
SYNTAX : SELECT column name1, column name2 from table
name;
EXAMPLE : SELECT customername, city from employee;
• To Display the Table:
SYNTAX : SELECT * from table name;
EXAMPLE : SELECT * from employee;
EXAMPLES
DISPLAY COLUMN
CUSTOMER
NAME
CITY
MOUNI TANJORE
MEGNA TRICHY
DISPLAY TABLE
CUSTOMER
NAME
CITY STATE
MOUNI TANJORE TAMILNADU
MEGNA TRICHY TAMILNADU
INSERT
The INSERT INTO command is used to insert new rows in a table.
SYNTAX :
INSERT INTO tablename (column1, column2, column3,
...)values (value1, value2, value3, ...);
(or)
INSERT INTO tablename values(value1,value2,value3,...valueN);
EXAMPLE :
INSERT INTO student (stud-id, name, age)values(‘01,’meli’,’20’); (or)
INSERT INTO student values(‘02’,’mouni’,’18’);
Stud-id name age
01 meli 20
02 mouni 18
UPDATE
The UPDATE statement is used to modify the existing records.
SYNTAX :
UPDATE tablename set column1 = value1, column2 = value2, ...where condition;
EXAMPLE :
UPDATE student set age = ‘40’ where stud-id = ‘01’;
CREATED TABLE : RESULT :
Stud-id name age
01 meli 20
02 stella 30
Stud-id name age
01 meli 40
02 stella 30
DELETE
The DELETE statement is used to delete existing records in a table.
SYNTAX :
DELETE FROM tablename where condition;
EXAMPLE :
DELETE FROM student where stud-id = ‘ 01 ‘ ;
CREATED TABLE :
RESULT :
Stud-id name age
01 meli 20
02 hema 30
Stud-id name age
02 hema 30
Delete All Records
It is possible to delete all rows in a table without deleting the table. This means that the
table structure, attributes, and indexes will be intact.
SYNTAX :
DELETE FROM tablename;
EXAMPLE :
DELETE FROM student ;
CREATED TABLE :
RESULT :
EMPTY SET
Stud-id name age
01 farana 30
02 doly 20
DATA CONTROL
LANGUAGES
 DCL stands for Data Control Language.
 It is used to retrieve the stored or saved data.
 The DCL execution is transactional.
 It also has rollback parameters.
 DCL consists of statements that controls security concurrent
access to table.
 The DCL has two commands and they are GRANT and
REVOKE.
TRANSACTIONAL CONTROL
LANGUAGES
 TCL is used to run the changes made by the DML
statement.
 TCL can be grouped into a logical transaction.
 TCL commands are manage transactions in
database.
 The TCL commands are COMMIT, ROLLBACK,
SAVEPOINT.

More Related Content

What's hot (20)

1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
Dbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureDbms 3: 3 Schema Architecture
Dbms 3: 3 Schema Architecture
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation Language
 
Characteristic of dabase approach
Characteristic of dabase approachCharacteristic of dabase approach
Characteristic of dabase approach
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
Trigger
TriggerTrigger
Trigger
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Triggers
TriggersTriggers
Triggers
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMS
 
Database Language.docx
Database Language.docxDatabase Language.docx
Database Language.docx
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
DML Commands
DML CommandsDML Commands
DML Commands
 

Similar to Database Languages Overview

Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptDrRShaliniVISTAS
 
Database models and DBMS languages
Database models and DBMS languagesDatabase models and DBMS languages
Database models and DBMS languagesDivyaKS12
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL Rc Os
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleFarhan Aslam
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxEliasPetros
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfKeerthanaP37
 
BASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptxBASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptxNiyatiMandaliya
 
Sql queries - Basics
Sql queries - BasicsSql queries - Basics
Sql queries - BasicsPurvik Rana
 
Sql basics and DDL statements
Sql basics and DDL statementsSql basics and DDL statements
Sql basics and DDL statementsMohd Tousif
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETEAbrar ali
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxEliasPetros
 

Similar to Database Languages Overview (20)

Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
 
Database models and DBMS languages
Database models and DBMS languagesDatabase models and DBMS languages
Database models and DBMS languages
 
Sql
SqlSql
Sql
 
Data base.ppt
Data base.pptData base.ppt
Data base.ppt
 
Module 3
Module 3Module 3
Module 3
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
 
DBMS LAB M.docx
DBMS LAB M.docxDBMS LAB M.docx
DBMS LAB M.docx
 
unit-5 sql notes.docx
unit-5 sql notes.docxunit-5 sql notes.docx
unit-5 sql notes.docx
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
BASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptxBASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptx
 
Sql queries - Basics
Sql queries - BasicsSql queries - Basics
Sql queries - Basics
 
ppt.pdf
ppt.pdfppt.pdf
ppt.pdf
 
Sql basics and DDL statements
Sql basics and DDL statementsSql basics and DDL statements
Sql basics and DDL statements
 
SQL
SQLSQL
SQL
 
DBMS.pdf
DBMS.pdfDBMS.pdf
DBMS.pdf
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
 

More from Anusha sivakumar

More from Anusha sivakumar (13)

deadline.pptx
deadline.pptxdeadline.pptx
deadline.pptx
 
Evolution of Computers ppt.pptx
Evolution of Computers ppt.pptxEvolution of Computers ppt.pptx
Evolution of Computers ppt.pptx
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
 
PURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptxPURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptx
 
NESTED SUBQUERY.pptx
NESTED SUBQUERY.pptxNESTED SUBQUERY.pptx
NESTED SUBQUERY.pptx
 
join relation.pptx
join relation.pptxjoin relation.pptx
join relation.pptx
 
fundamental relation algebra.pptx
fundamental relation algebra.pptxfundamental relation algebra.pptx
fundamental relation algebra.pptx
 
DBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptxDBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptx
 
Database user and administrator.pptx
Database user and administrator.pptxDatabase user and administrator.pptx
Database user and administrator.pptx
 
AGGREGATE FUNCTION.pptx
AGGREGATE FUNCTION.pptxAGGREGATE FUNCTION.pptx
AGGREGATE FUNCTION.pptx
 
CSS
CSSCSS
CSS
 
Greedy method
Greedy methodGreedy method
Greedy method
 
Heap sort
Heap sortHeap sort
Heap sort
 

Recently uploaded

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Recently uploaded (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

Database Languages Overview

  • 1. SUBJECT : DATABASE SYSTEM TOPIC : DATABASE LANGUAGES
  • 2. PREPARED BY Ms.J.Monica -III-B.Sc - Information Technology Ms.V.K.Vidhyaa lakshmi -III-B.Sc-Information Technology UNDER THE GUIDANCE OF Mrs.P.Anusha M.Sc(IT).,M.Phil.,D.P.T.T.,(Ph.D)., Assistant professor, Department of Information Technology, Bon secours college for women, Thanjavur.
  • 3. DATABASE LANGUAGE DEFINITION :  A DBMS has appropriate languages and interface to express database queries and updates.  Database languages can be used to read, store and update the date in the database.
  • 4. CLASSIFICATION OF DBMS LANGUAGE 1. CREATE 1. SELECT 1. COMMIT 1. GRANT 2. ALTER 2. INSERT 2. ROLLBACK 2. REVOKE 3. DROP 3. UPDATE 3. TRANSACTION 4. TRUNCATE 4. DELETE 4. SAVEPOINT 5. RENAME 5. MERGE 6. CALL DATABASE LANGUAGES DATA DEFINITION LANGUAGES DATA MANIPULATION LANGUAGES DATA CONTROL LANGUAGES TRANSACTION LANGUAGES
  • 5. DATABASE DEFINITION LANGUAGE (DDL)  DDL stands for Data Definition Language.  It is used to define database structure or pattern.  It is used to create schema, tables, indexes, constraints, etc. in the database.  Data definition language is used to store the information of metadata like the number of tables and schemas, their names, indexes, columns in each table, constraints, etc.  Using the DDL statements, you can create the skeleton of the database.
  • 6. QUERY  CREATE - It is used to create objects in the database.  ALTER - It is used to alter the structure of the database.  DROP - It is used to delete objects from the database.  TRUNCATE - It is used to remove all records from a table.  RENAME - It is used to rename an object.
  • 7. CREATE DATABASE The CREATE DATABASE command is used to create a new SQL database. SYNTAX : CREATE DATABASE databasename ; EXAMPLE : CREATE DATABASE bon secours ;
  • 8. DROP DATABASE The DROP DATABASE command is used to delete an existing SQL database. SYNTAX : DROP DATABASE databasename ; EXAMPLE : DROP DATABASE bon secours ;
  • 9. CREATE TABLE The CREATE TABLE command creates a new table in the database. SYNTAX : CREATE TABLE Tablename(column1 datatype, column2 datatype, column3 datatype); EXAMPLE : CREATE TABLE Student(stud-id int, name varchar(255), age int); 01 IVAN 25 02 JOSHIYA 30 03 VARUN 24
  • 10. ALTER TABLE  The ALTER TABLE command adds, deletes, or modifies columns in a table.  The ALTER TABLE command also adds and deletes various constraints in a table. (ALTER TABLE – ADD COLUMN) SYNTAX: ALTER TABLE tablename add columnname datatype; EXAMPLE : ALTER TABLE student add mobile int; (ALTER TABLE – DROP COLUMN) SYNTAX : ALTER TABLE tablename drop column columnname; EXAMPLE : ALTER TABLE student drop column mobile; 01 Malini 20 1234456 02 mano 23 2345673 01 Malini 20 02 Mano 23
  • 11. ALTER COLUMN  The ALTER COLUMN command is used to change the data type of a column in a table.  The following SQL changes the data type of the column named “BirthDate” in the “Employees” table to type year: EXAMPLE : ALTER TABLE Employees ALTER COLUMN BirthDate year;
  • 12. DROP TABLE The DROP TABLE command deletes a table in the database. SYNTAX : DROP TABLE Tablename; EXAMPLE : DROP TABLE student ; CREATED TABLE : RESULT : EMPTY SET EMPTY SET 01 MOUNA 22 02 MARIYAM 23
  • 13. TRUNCATE TABLE The TRUNCATE TABLE command deletes the data inside a table, but not the table itself. SYNTAX : TRUNCATE TABLE Tablename; EXAMPLE : TRUNCATE TABLE student; CREATED TABLE : RESULT : EMPTY SET EMPTY SET 01 mano 34 02 velu 45
  • 14. DATA MANUPULATION LANGUAGE (DML)  DML stands for Data Manipulation Language.  It is used for accessing and manipulating data in a database.  It handles user requests.  A data-manipulation language (DML) is a language that enables users to access or manipulate data as organized by the appropriate data model.
  • 15. The types of access are: • Retrieval of information stored in the database • Insertion of new information into the database • Deletion of information from the database • Modification of information stored in the database
  • 16. CLASSIFICATION OF DML DATA MANIPULATION LANGUAGE PROCEDURAL DECLARATIVE
  • 17. PROCEDURAL DML : Procedural DMLs require a user to specify what data are needed and how to get those data. DECLARATIVE DML : Declarative DMLs (also referred to as nonprocedural DMLs) require a user to specify what data are needed without specifying how to get those data.
  • 18. QUERY  SELECT : - It is used to retrieve data from a database.  INSERT : - It is used to insert data into a table.  UPDATE : -It is used to update existing data within a table.  DELETE : - It is used to delete all records from a table.  MERGE : - It performs UPSERT operation, i.e., insert or update operations.  CALL : - It is used to call a structured query language or a Java subprogram.
  • 19. SELECT The SELECT command is used to select data from a database. The data returned is stored in a result table, called the result set. • To display the column: SYNTAX : SELECT column name1, column name2 from table name; EXAMPLE : SELECT customername, city from employee; • To Display the Table: SYNTAX : SELECT * from table name; EXAMPLE : SELECT * from employee;
  • 20. EXAMPLES DISPLAY COLUMN CUSTOMER NAME CITY MOUNI TANJORE MEGNA TRICHY DISPLAY TABLE CUSTOMER NAME CITY STATE MOUNI TANJORE TAMILNADU MEGNA TRICHY TAMILNADU
  • 21. INSERT The INSERT INTO command is used to insert new rows in a table. SYNTAX : INSERT INTO tablename (column1, column2, column3, ...)values (value1, value2, value3, ...); (or) INSERT INTO tablename values(value1,value2,value3,...valueN); EXAMPLE : INSERT INTO student (stud-id, name, age)values(‘01,’meli’,’20’); (or) INSERT INTO student values(‘02’,’mouni’,’18’); Stud-id name age 01 meli 20 02 mouni 18
  • 22. UPDATE The UPDATE statement is used to modify the existing records. SYNTAX : UPDATE tablename set column1 = value1, column2 = value2, ...where condition; EXAMPLE : UPDATE student set age = ‘40’ where stud-id = ‘01’; CREATED TABLE : RESULT : Stud-id name age 01 meli 20 02 stella 30 Stud-id name age 01 meli 40 02 stella 30
  • 23. DELETE The DELETE statement is used to delete existing records in a table. SYNTAX : DELETE FROM tablename where condition; EXAMPLE : DELETE FROM student where stud-id = ‘ 01 ‘ ; CREATED TABLE : RESULT : Stud-id name age 01 meli 20 02 hema 30 Stud-id name age 02 hema 30
  • 24. Delete All Records It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact. SYNTAX : DELETE FROM tablename; EXAMPLE : DELETE FROM student ; CREATED TABLE : RESULT : EMPTY SET Stud-id name age 01 farana 30 02 doly 20
  • 25. DATA CONTROL LANGUAGES  DCL stands for Data Control Language.  It is used to retrieve the stored or saved data.  The DCL execution is transactional.  It also has rollback parameters.  DCL consists of statements that controls security concurrent access to table.  The DCL has two commands and they are GRANT and REVOKE.
  • 26. TRANSACTIONAL CONTROL LANGUAGES  TCL is used to run the changes made by the DML statement.  TCL can be grouped into a logical transaction.  TCL commands are manage transactions in database.  The TCL commands are COMMIT, ROLLBACK, SAVEPOINT.