SlideShare a Scribd company logo
Database
Languages
Database languages can
be used to read, store and
update the data in the
database.
The DBMS languages are
pictorially represented as follows
Data Definition Language
Statements (DDL)
 Data Definition Language Statements (DDL)
statements are used to define the database
structure or schema. Different types of DDL
commands are
1. Create
2. Drop
3. Alter
4. Truncate
5. Describe
Create Command
 Create command is used to create Databases, Tables,
and Views etc.
 Syntax for Creating Databases:
 CREATE DATABASE <Database Name>;
 Example:
 If you want to create new database, then CREATE
DATABASE statement would be as follows:
 SQL> CREATE DATABASE university;
Create Command
 Syntax for Creating Table
 CREATE TABLE table_name(
column1 datatype,
column2 datatype,
column3 datatype,
.....
columnN datatype,
);
Drop command
 Drop command is used to drop the database or table.
 Syntax for Dropping the Database:
 DROP DATABASE <Database Name>;
 Example:
 If you want to delete an existing database testDB then DROP
DATABASE statement would be as follows:
 SQL> DROP DATABASE testDB;
 Syntax for Dropping Table:
 DROP TABLE table_name;
 Eg: Drop table student;
ALTER Command
 ALTER: It is used to alter the structure of the database object.
This change could be either to modify the characteristics of
an existing attribute or probably to add a new attribute.
 Syntax:
 To add a new column in the table
1. ALTER TABLE table_name ADD column_name COLUMN-
definition;
 To modify existing column in the table:
1. ALTER TABLE MODIFY(COLUMN DEFINITION....);
 EXAMPLE
1. ALTER TABLE STU_DETAILS ADD(ADDRESS VARCHAR2(20));
2. ALTER TABLE STU_DETAILS MODIFY (NAME VARCHAR2(20));
TRUNCATE Command
 TRUNCATE: It is used to delete all the rows from the table and
free the space containing the table.
 Syntax:
1. TRUNCATE TABLE table_name;
 Example:
1. TRUNCATE TABLE EMPLOYEE;
 DESCRIBE: It is used to describe the table
 Syntax:
1. DESCRIBE TABLE table_name;
 Example:
1. DESCRIBE TABLE EMPLOYEE;
Data Manipulation Language
Statements (DML)
 Data Manipulation Language
Statements (DML) statements are used to
put data, modify data and delete data from
the database tables. Different types of DML
commands are
1. Insert
2. Update
3. Delete
4. Select
INSERT Command
 INSERT: The INSERT statement is a SQL query. It is
used to insert data into the row of a table.
 Syntax:
1. INSERT INTO TABLE_NAME (col1, col2, col3,.... col N)
VALUES (value1, value2, value3, .... valueN);
 Or
 2.INSERT INTO TABLE_NAME VALUES (value1, value2,
value3, .... valueN);
 For example:
1. INSERT INTO javatpoint (Author, Subject) VALUES
("Sandy", "DBMS");
UPDATE Command
 UPDATE: This command is used to update or modify the
value of a column in the table.
 Syntax:
1. UPDATE table_name SET [column_name1= value1,...column
_nameN = valueN] [WHERE CONDITION]
 For example:
1. UPDATE students SET User_Name = 'Sandy'
WHERE Student_Id = '3'
 DELETE: It is used to remove one or more row from a table.
 Syntax:
1. DELETE FROM table_name [WHERE condition];
 For example:
 DELETE FROM java WHERE Author=“sandy";
SELECT Command
 SELECT: This is used to select the attribute based on the
condition described by WHERE clause.
 Syntax:
 SELECT expressions
 FROM TABLES
 WHERE conditions;
 For example:
 SELECT emp_name
 FROM employee
 WHERE age > 20;
DCL command
 DCL commands are used to grant and take back
authority from any database user.
 Here are some commands that come under DCL:
 a. Grant
 b. Revoke
a. Grant: It is used to give user access privileges to a
database.
b. Revoke: It is used to take back permissions from the
user.
TCL command
 TCL commands can only be used with DML commands like INSERT,
DELETE and UPDATE only.
 These operations are automatically committed in the database that's
why they cannot be used while creating tables or dropping them.
The commands include:
 COMMIT
 ROLLBACK
 SAVEPOINT
 a. Commit: Commit command is used to save all the transactions to
the database.
 b. Rollback: Rollback command is used to undo transactions that
have not already been saved to the database.
 c. Savepoint: It is used to roll the transaction back to a certain point
without rolling back the entire transaction

More Related Content

PPTX
GFGC CHIKKABASUR ( DDL COMMANDS )
PPTX
DOCX
ii bcom dbms SQL Commands.docx
PPTX
Database Management System PART- II.pptx
PPTX
SQL-SHORT-NOTES.pptx
PPTX
Introduction to database and sql fir beginers
DOC
Oracle sql material
PPTX
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
GFGC CHIKKABASUR ( DDL COMMANDS )
ii bcom dbms SQL Commands.docx
Database Management System PART- II.pptx
SQL-SHORT-NOTES.pptx
Introduction to database and sql fir beginers
Oracle sql material
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx

Similar to Database Languages power point presentation (20)

DOCX
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
PDF
Sql smart reference_by_prasad
PDF
Sql smart reference_by_prasad
PDF
DBMS.pdf
PDF
SQL Basics, DDL, DML, DQL, Learn The BAsics Of SQL.pdf
PPT
Sql presentation 1 by chandan
PPTX
SQl data base management and design
ODP
My sql Syntax
PPTX
Ddl &amp; dml commands
DOCX
COMPUTERS SQL
ODP
My sql
PPT
Sql Commands_Dr.R.Shalini.ppt
PPTX
DBMS UNIT-2.pptx ggggggggggggggggggggggg
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
PPTX
SQL: Data Definition Language(DDL) command
PPTX
MySQL Essential Training
DOC
Oracle SQL AND PL/SQL
PPTX
8. sql
PPTX
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
PDF
STRUCTURED QUERY LANGUAGE
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Sql smart reference_by_prasad
Sql smart reference_by_prasad
DBMS.pdf
SQL Basics, DDL, DML, DQL, Learn The BAsics Of SQL.pdf
Sql presentation 1 by chandan
SQl data base management and design
My sql Syntax
Ddl &amp; dml commands
COMPUTERS SQL
My sql
Sql Commands_Dr.R.Shalini.ppt
DBMS UNIT-2.pptx ggggggggggggggggggggggg
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
SQL: Data Definition Language(DDL) command
MySQL Essential Training
Oracle SQL AND PL/SQL
8. sql
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
STRUCTURED QUERY LANGUAGE
Ad

More from AshokRachapalli1 (20)

PPTX
structure of dbms1 power point presentation
PPTX
DBMS Introduction-Unit 1 power point presentation
PPT
215-Database-Recovery presentation document
PPTX
transactionprocessing-220423112118 (1).pptx
PPTX
unit-1 lecture 7 Types of system calls.pptx
PPTX
DATA MODEL Power point presentation for dbms
PPTX
WEEK-2 DML and operators power point presentation
PPTX
Relational Algebra in DBMS 2025 power point
PPTX
CLOSURE OF AN ATTRIBUTE powerpontpresentatio
PPT
Relational algebra in database management system
PPT
DBMS-3.1 Normalization upto boyscodd normal form
PPTX
Data base Users and Administrator pptx
PPTX
Relational Algebra in DBMS power ppoint pesenetation
PPTX
using Java Exception Handling in Java.pptx
PPTX
Multi-Threading in Java power point presenetation
PPT
ARRAYS in java with in details presentation.ppt
PPT
lecture-a-java-review .. this review ppt will help to the lectureres
PPTX
17.INTRODUCTION TO SCHEMA REFINEMENT.pptx
PPTX
joins in dbms its describes about how joins are important and necessity in d...
PPTX
6.Database Languages lab-1.pptx
structure of dbms1 power point presentation
DBMS Introduction-Unit 1 power point presentation
215-Database-Recovery presentation document
transactionprocessing-220423112118 (1).pptx
unit-1 lecture 7 Types of system calls.pptx
DATA MODEL Power point presentation for dbms
WEEK-2 DML and operators power point presentation
Relational Algebra in DBMS 2025 power point
CLOSURE OF AN ATTRIBUTE powerpontpresentatio
Relational algebra in database management system
DBMS-3.1 Normalization upto boyscodd normal form
Data base Users and Administrator pptx
Relational Algebra in DBMS power ppoint pesenetation
using Java Exception Handling in Java.pptx
Multi-Threading in Java power point presenetation
ARRAYS in java with in details presentation.ppt
lecture-a-java-review .. this review ppt will help to the lectureres
17.INTRODUCTION TO SCHEMA REFINEMENT.pptx
joins in dbms its describes about how joins are important and necessity in d...
6.Database Languages lab-1.pptx
Ad

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Insiders guide to clinical Medicine.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Business Ethics Teaching Materials for college
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
01-Introduction-to-Information-Management.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Institutional Correction lecture only . . .
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
Cell Structure & Organelles in detailed.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Insiders guide to clinical Medicine.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Business Ethics Teaching Materials for college
TR - Agricultural Crops Production NC III.pdf
RMMM.pdf make it easy to upload and study
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Pharmacology of Heart Failure /Pharmacotherapy of CHF
01-Introduction-to-Information-Management.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Final Presentation General Medicine 03-08-2024.pptx
PPH.pptx obstetrics and gynecology in nursing
Institutional Correction lecture only . . .
STATICS OF THE RIGID BODIES Hibbelers.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Cell Structure & Organelles in detailed.
2.FourierTransform-ShortQuestionswithAnswers.pdf

Database Languages power point presentation

  • 1. Database Languages Database languages can be used to read, store and update the data in the database.
  • 2. The DBMS languages are pictorially represented as follows
  • 3. Data Definition Language Statements (DDL)  Data Definition Language Statements (DDL) statements are used to define the database structure or schema. Different types of DDL commands are 1. Create 2. Drop 3. Alter 4. Truncate 5. Describe
  • 4. Create Command  Create command is used to create Databases, Tables, and Views etc.  Syntax for Creating Databases:  CREATE DATABASE <Database Name>;  Example:  If you want to create new database, then CREATE DATABASE statement would be as follows:  SQL> CREATE DATABASE university;
  • 5. Create Command  Syntax for Creating Table  CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype, ..... columnN datatype, );
  • 6. Drop command  Drop command is used to drop the database or table.  Syntax for Dropping the Database:  DROP DATABASE <Database Name>;  Example:  If you want to delete an existing database testDB then DROP DATABASE statement would be as follows:  SQL> DROP DATABASE testDB;  Syntax for Dropping Table:  DROP TABLE table_name;  Eg: Drop table student;
  • 7. ALTER Command  ALTER: It is used to alter the structure of the database object. This change could be either to modify the characteristics of an existing attribute or probably to add a new attribute.  Syntax:  To add a new column in the table 1. ALTER TABLE table_name ADD column_name COLUMN- definition;  To modify existing column in the table: 1. ALTER TABLE MODIFY(COLUMN DEFINITION....);  EXAMPLE 1. ALTER TABLE STU_DETAILS ADD(ADDRESS VARCHAR2(20)); 2. ALTER TABLE STU_DETAILS MODIFY (NAME VARCHAR2(20));
  • 8. TRUNCATE Command  TRUNCATE: It is used to delete all the rows from the table and free the space containing the table.  Syntax: 1. TRUNCATE TABLE table_name;  Example: 1. TRUNCATE TABLE EMPLOYEE;  DESCRIBE: It is used to describe the table  Syntax: 1. DESCRIBE TABLE table_name;  Example: 1. DESCRIBE TABLE EMPLOYEE;
  • 9. Data Manipulation Language Statements (DML)  Data Manipulation Language Statements (DML) statements are used to put data, modify data and delete data from the database tables. Different types of DML commands are 1. Insert 2. Update 3. Delete 4. Select
  • 10. INSERT Command  INSERT: The INSERT statement is a SQL query. It is used to insert data into the row of a table.  Syntax: 1. INSERT INTO TABLE_NAME (col1, col2, col3,.... col N) VALUES (value1, value2, value3, .... valueN);  Or  2.INSERT INTO TABLE_NAME VALUES (value1, value2, value3, .... valueN);  For example: 1. INSERT INTO javatpoint (Author, Subject) VALUES ("Sandy", "DBMS");
  • 11. UPDATE Command  UPDATE: This command is used to update or modify the value of a column in the table.  Syntax: 1. UPDATE table_name SET [column_name1= value1,...column _nameN = valueN] [WHERE CONDITION]  For example: 1. UPDATE students SET User_Name = 'Sandy' WHERE Student_Id = '3'  DELETE: It is used to remove one or more row from a table.  Syntax: 1. DELETE FROM table_name [WHERE condition];  For example:  DELETE FROM java WHERE Author=“sandy";
  • 12. SELECT Command  SELECT: This is used to select the attribute based on the condition described by WHERE clause.  Syntax:  SELECT expressions  FROM TABLES  WHERE conditions;  For example:  SELECT emp_name  FROM employee  WHERE age > 20;
  • 13. DCL command  DCL commands are used to grant and take back authority from any database user.  Here are some commands that come under DCL:  a. Grant  b. Revoke a. Grant: It is used to give user access privileges to a database. b. Revoke: It is used to take back permissions from the user.
  • 14. TCL command  TCL commands can only be used with DML commands like INSERT, DELETE and UPDATE only.  These operations are automatically committed in the database that's why they cannot be used while creating tables or dropping them. The commands include:  COMMIT  ROLLBACK  SAVEPOINT  a. Commit: Commit command is used to save all the transactions to the database.  b. Rollback: Rollback command is used to undo transactions that have not already been saved to the database.  c. Savepoint: It is used to roll the transaction back to a certain point without rolling back the entire transaction