SlideShare a Scribd company logo
5
Most read
6
Most read
7
Most read
Database Management Systems
DBMS Languages/
Types of SQL Commands
by
GOWRU BHARATH KUMAR
M.Tech, (Ph.D)
Assistant Professor
You are My creator, But I am Your Master
Queries in a DBMS
• Here, we will consider the Sample University Database
1) Students(sid: string, name: string, login: string, age: integer,
gpa: real)
2) Faculty(fid: string, fname: string, sal: real)
3) Courses( cid: string, cname: string, credits: integer)
4) Rooms(no: integer, address: string, capacity: integer)
5) Enrolled (sid: string, cid: string, grade: string)
6) Teaches(fid: string, cid: string)
7) Meets_In( cid: string, rno: integer, time: string)
Queries in a DBMS Cont…
Here are some questions a user might ask:
1) What is the name of the student with student ID 1234567
2) What is the average salary of professors who teach course
CS5647
3) How many students are enrolled in CS5647
4) What fraction of students in CS564 received a grade better
than B7
5) Is any student with a CPA less than 3.0 enrolled in CS564
Queries in a DBMS Cont…
• Such questions involving the data stored in a DBMS are called queries.
• A DBMS provides a specialized language, called the query language, in
which queries can be posed.
• A very attractive feature of the relational model is that it supports
powerful query languages.
• Relational calculus is a formal query language based on mathematical
logic, and queries in this language have an intuitive, precise meaning.
• Relational algebra is another formal query language, based on a collection
of operators for manipulating relations, which is equivalent in power to the
calculus.
• A DBMS takes great care to evaluate queries as efficiently as possible.
DBMS Languages
• A DBMS has appropriate languages to express database queries and updates.
• Database languages can be used to read, store and update the data in the
database.
Data Definition Language
• 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.
• Using the DDL statements, you can create the skeleton of the database.
• DDL is used to store the information of metadata like the number of tables and
schemas, their names, indexes, columns in each table, constraints, etc.
• DDL is used to define the external and Conceptual Schemas.
Here are some tasks that come under DDL:
• 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.
Data Manipulation Language
• DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.
• The DDL and DML are collectively referred to as the data sublanguage
when embedded within a host language (Ex: C or COBOL)
Here are some tasks that come under DML:
• 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.
Data Control Language
• 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.
Here are some tasks that come under DCL:
• Grant: It is used to give user access privileges to a database.
• Revoke: It is used to take back permissions from the user.
Transaction Control Language
• TCL is used to run the changes made by the DML statement. TCL can be
grouped into a logical transaction.
Here are some tasks that come under TCL:
• Commit: It is used to save the transaction on the database.
• Rollback: It is used to restore the database to original since the last
Commit.
DBMS languages/ Types of SQL Commands

More Related Content

PPTX
Relational database
PPT
Indexing and Hashing
PPTX
Relational algebra ppt
PPTX
database language ppt.pptx
PDF
Database users
PPTX
Database abstraction
PPTX
Database management system
Relational database
Indexing and Hashing
Relational algebra ppt
database language ppt.pptx
Database users
Database abstraction
Database management system

What's hot (20)

PPT
Entity Relationship Diagram
PPTX
Database architecture
PPTX
Introduction to Database
PPTX
Integrity Constraints
PPTX
File system vs DBMS
PPTX
DBMS Keys
PPTX
Types Of Keys in DBMS
PPTX
All data models in dbms
PPTX
Chapter-1 Introduction to Database Management Systems
PPTX
Data warehouse architecture
PPTX
Slide 4 dbms users
PPTX
Data definition language
PPTX
The Relational Database Model
PPTX
DBMS and its Models
PPT
Joins in SQL
PPTX
3 Level Architecture
PDF
Relational algebra in dbms
PPTX
SQL Basics
PPTX
SQL Commands
Entity Relationship Diagram
Database architecture
Introduction to Database
Integrity Constraints
File system vs DBMS
DBMS Keys
Types Of Keys in DBMS
All data models in dbms
Chapter-1 Introduction to Database Management Systems
Data warehouse architecture
Slide 4 dbms users
Data definition language
The Relational Database Model
DBMS and its Models
Joins in SQL
3 Level Architecture
Relational algebra in dbms
SQL Basics
SQL Commands
Ad

Similar to DBMS languages/ Types of SQL Commands (20)

PPTX
dbms (3436737839399388838388383860).pptx
PPTX
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
PPTX
6.Database Languages lab-1.pptx
PPTX
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
PPTX
Database Management System
PPTX
PDF
Unit 3 rdbms study_materials-converted
PPTX
Lecture 2 DATABASE LANGUAGE.pptx
PPTX
Basic Concept of Database
PPTX
Relation Database Management Systems-23UITCC31.pptx
PDF
Dbms Notes Lecture 3 : Types of database users
PPTX
Database management system.pptx
PPTX
Week 1 and 2 Getting started with DBMS.pptx
PPT
8028.ppt
PPTX
DATABASE MANAGEMENT SYSTEMS PPT .pptx
PPTX
Complete first chapter rdbm 17332
PPTX
Pl sql content
PDF
01-Database Administration and Management.pdf
PPTX
Relational Database management Models-MCA.pptx
dbms (3436737839399388838388383860).pptx
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
6.Database Languages lab-1.pptx
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Database Management System
Unit 3 rdbms study_materials-converted
Lecture 2 DATABASE LANGUAGE.pptx
Basic Concept of Database
Relation Database Management Systems-23UITCC31.pptx
Dbms Notes Lecture 3 : Types of database users
Database management system.pptx
Week 1 and 2 Getting started with DBMS.pptx
8028.ppt
DATABASE MANAGEMENT SYSTEMS PPT .pptx
Complete first chapter rdbm 17332
Pl sql content
01-Database Administration and Management.pdf
Relational Database management Models-MCA.pptx
Ad

More from BHARATH KUMAR (16)

PPTX
Object-Oriented concepts.pptx
PPTX
Java buzzwords.pptx
PPTX
history and evaluation of java.pptx
PPTX
Data Models
PPTX
Structure of a DBMS/Architecture of a DBMS
PPTX
1.4 data independence
PPTX
data abstraction in DBMS
PPTX
DBMS introduction
DOCX
Trees and Graphs in data structures and Algorithms
DOCX
Sorting
DOCX
Linked List
DOCX
ADT STACK and Queues
PPTX
Why we study LMC? by GOWRU BHARATH KUMAR
PDF
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
PDF
A Survey on Big Data Analytics
PPTX
Relation between Languages, Machines and Computations
Object-Oriented concepts.pptx
Java buzzwords.pptx
history and evaluation of java.pptx
Data Models
Structure of a DBMS/Architecture of a DBMS
1.4 data independence
data abstraction in DBMS
DBMS introduction
Trees and Graphs in data structures and Algorithms
Sorting
Linked List
ADT STACK and Queues
Why we study LMC? by GOWRU BHARATH KUMAR
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
A Survey on Big Data Analytics
Relation between Languages, Machines and Computations

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Well-logging-methods_new................
PPTX
Sustainable Sites - Green Building Construction
PPT
Mechanical Engineering MATERIALS Selection
PDF
Digital Logic Computer Design lecture notes
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Geodesy 1.pptx...............................................
PDF
R24 SURVEYING LAB MANUAL for civil enggi
Operating System & Kernel Study Guide-1 - converted.pdf
573137875-Attendance-Management-System-original
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
OOP with Java - Java Introduction (Basics)
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
bas. eng. economics group 4 presentation 1.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Well-logging-methods_new................
Sustainable Sites - Green Building Construction
Mechanical Engineering MATERIALS Selection
Digital Logic Computer Design lecture notes
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Geodesy 1.pptx...............................................
R24 SURVEYING LAB MANUAL for civil enggi

DBMS languages/ Types of SQL Commands

  • 1. Database Management Systems DBMS Languages/ Types of SQL Commands by GOWRU BHARATH KUMAR M.Tech, (Ph.D) Assistant Professor You are My creator, But I am Your Master
  • 2. Queries in a DBMS • Here, we will consider the Sample University Database 1) Students(sid: string, name: string, login: string, age: integer, gpa: real) 2) Faculty(fid: string, fname: string, sal: real) 3) Courses( cid: string, cname: string, credits: integer) 4) Rooms(no: integer, address: string, capacity: integer) 5) Enrolled (sid: string, cid: string, grade: string) 6) Teaches(fid: string, cid: string) 7) Meets_In( cid: string, rno: integer, time: string)
  • 3. Queries in a DBMS Cont… Here are some questions a user might ask: 1) What is the name of the student with student ID 1234567 2) What is the average salary of professors who teach course CS5647 3) How many students are enrolled in CS5647 4) What fraction of students in CS564 received a grade better than B7 5) Is any student with a CPA less than 3.0 enrolled in CS564
  • 4. Queries in a DBMS Cont… • Such questions involving the data stored in a DBMS are called queries. • A DBMS provides a specialized language, called the query language, in which queries can be posed. • A very attractive feature of the relational model is that it supports powerful query languages. • Relational calculus is a formal query language based on mathematical logic, and queries in this language have an intuitive, precise meaning. • Relational algebra is another formal query language, based on a collection of operators for manipulating relations, which is equivalent in power to the calculus. • A DBMS takes great care to evaluate queries as efficiently as possible.
  • 5. DBMS Languages • A DBMS has appropriate languages to express database queries and updates. • Database languages can be used to read, store and update the data in the database.
  • 6. Data Definition Language • 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. • Using the DDL statements, you can create the skeleton of the database. • DDL is used to store the information of metadata like the number of tables and schemas, their names, indexes, columns in each table, constraints, etc. • DDL is used to define the external and Conceptual Schemas. Here are some tasks that come under DDL: • 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. Data Manipulation Language • DML stands for Data Manipulation Language. It is used for accessing and manipulating data in a database. It handles user requests. • The DDL and DML are collectively referred to as the data sublanguage when embedded within a host language (Ex: C or COBOL) Here are some tasks that come under DML: • 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.
  • 8. Data Control Language • 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. Here are some tasks that come under DCL: • Grant: It is used to give user access privileges to a database. • Revoke: It is used to take back permissions from the user.
  • 9. Transaction Control Language • TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical transaction. Here are some tasks that come under TCL: • Commit: It is used to save the transaction on the database. • Rollback: It is used to restore the database to original since the last Commit.