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)

Relational model
Relational modelRelational model
Relational model
 
Data structures using c
Data structures using cData structures using c
Data structures using c
 
Arrays
ArraysArrays
Arrays
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
DML Commands
DML CommandsDML Commands
DML Commands
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
SQL commands
SQL commandsSQL commands
SQL commands
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
Database Objects
Database ObjectsDatabase Objects
Database Objects
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
stack & queue
stack & queuestack & queue
stack & queue
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 

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 (14)

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
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.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

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

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.