SlideShare a Scribd company logo
5
Most read
10
Most read
13
Most read
Structured Query Language(SQL)
BY.,
B. Gowarthini
C. Divya
V. Suruthi
Agenda:
• Introduction
• Datatypes of SQL
• Operators of SQL
• Basic Database Concepts
• Processing capabilities of SQL
• Joins and its types
• Aggregate functions
• Stored procedures
• Index
• Triggers
Introduction:
• SQL is a non procedural language that is used to create,
manipulate and process the database.
Characteristics of SQL:
• Easy to learn and use.
• Large volume of DB can be handled easily.
Datatypes of SQL:
• Like programming languages, datatypes are also available in SQL
• Most commonly used types:
Int
Date
Long
Number
varchar/ nvarchar
Operators of SQL:
Operators in SQL:
 Arithmetic operators : +, -, *, / (Simple mathematical operations)
 Relational operators : =, <, >, <=, >=, <> (For comparing values)
 Logical operators : OR, AND, NOT (For condition clause)
Basic Database concepts:
• Data: -Raw facts and figures useful to an organization.
-Cannot take decisions on basis of data.
• Field : -Set of characters
• Record: -Collection of fields
• Primary key: -Uniquely identifies the records
-Never allow NULL and duplicates
• Foreign key: -Referential integrity
Processing capabilities of SQL
• Data Definition Language (DDL)
• Views
• Data Manipulation Language (DML)
• Data Control Language (DCL)
• Transaction Control Language (TCL)
Processing capabilities of SQL
Data Definition Language (DDL):
Common DDL statements are CREATE, ALTER, DROP.
CREATE – To create new DB, table, index, view etc..,
ALTER - To alter the table, DB etc..,
DROP - To delete objects from DB.
View:
- View is a kind of virtual table.
- It contains rows and columns like a real table.
- We can create a view by selecting fields.
Processing capabilities of SQL
Data Manipulation Language (DML):
- To manipulate the database objects
- Query the DB for information retrieval
- Common DML statements are
 SELECT
 INSERT
 DELETE
 UPDATE
Processing capabilities of SQL
Data Control Language(DCL):
- Controlling access to the data
- Common DCL commands are GRANT , REVOKE
Transaction Control Language (TCL):
- Control the transaction in DB system
- Common TCL commands are COMMIT, ROLLBACK
Joins and its types
• Used to combine rows from two or more tables, based on a
related column between them.
Types:
- Inner Join
- Left Join
- Right Join
- Full Join
- Self Join
Aggregate functions
Stored procedures
• It stored as an object in the database server.
• The code can be reused over and over again and then just call it
to execute it.
Syntax:
CREATE PROCEDURE procedure_name // Create stored proc.
AS
sql_statement
GO;
EXEC procedure_name; //Execute a stored procedure
Index
• Used to retrieve data from the DB very fast.
• Users cannot see the indexes, they are just used to speed up
searches/queries.
Syntax:
CREATE INDEX index_name
ON table_name (column1, column2, ...);
Types:
Clustered index - rows are stored physically on the disk in the
same order
Non Clustered index - second list that has pointers to the
physical rows.
Triggers
• Special kind of Stored procedure
• Automatically invokes whenever a DML and DDL events in DB
occurs
Syntax:
create trigger deep
on emp
for
insert,update,delete
as
print'you can not insert,update and delete this table i'
rollback;
Structured query language(sql)ppt

More Related Content

PPTX
Introduction to SQL
PPTX
introdution to SQL and SQL functions
PPT
PL/SQL Introduction and Concepts
PPT
Introduction to structured query language (sql)
PDF
SQL Overview
PPTX
Presentation slides of Sequence Query Language (SQL)
PDF
SQL - RDBMS Concepts
PDF
Introduction to DAX Language
Introduction to SQL
introdution to SQL and SQL functions
PL/SQL Introduction and Concepts
Introduction to structured query language (sql)
SQL Overview
Presentation slides of Sequence Query Language (SQL)
SQL - RDBMS Concepts
Introduction to DAX Language

What's hot (20)

PPTX
Basic SQL and History
PPTX
SQL - DML and DDL Commands
PPTX
Structured Query Language (SQL)
PPT
Oracle sql joins
ODP
Ms sql-server
PPTX
Sql commands
PPTX
Sql(structured query language)
PPTX
Sql - Structured Query Language
PDF
Introduction to SQL
PPTX
SQL Commands
PPT
SQL : introduction
PPTX
Structured Query Language
DOC
PDF
Codd's Rules for Relational Database Management Systems
PPTX
SQL Server Learning Drive
PPT
SQL Tutorial - Basic Commands
PPT
Sql Server Basics
PPT
Sql dml & tcl 2
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
PPTX
What is SQL Server?
Basic SQL and History
SQL - DML and DDL Commands
Structured Query Language (SQL)
Oracle sql joins
Ms sql-server
Sql commands
Sql(structured query language)
Sql - Structured Query Language
Introduction to SQL
SQL Commands
SQL : introduction
Structured Query Language
Codd's Rules for Relational Database Management Systems
SQL Server Learning Drive
SQL Tutorial - Basic Commands
Sql Server Basics
Sql dml & tcl 2
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
What is SQL Server?
Ad

Similar to Structured query language(sql)ppt (20)

PPTX
Using Basic Structured Query Language lo1.pptx
PPTX
Introduction to SQL, SQL*Plus
PPTX
DataBase Management systems (IM).pptx
PPTX
Introduction to Structured Query Language
PPTX
Relation Database Management Systems-23UITCC31.pptx
PPTX
Complete first chapter rdbm 17332
PDF
Database Systems - Introduction to SQL (Chapter 3/1)
PPTX
Lecture - MY-SQL/ SQL Commands - DDL.pptx
PDF
20CS402 - DATABASE MANAGEMENT SYSTEMS NOTES
PDF
SQL Intro
PPTX
Pl sql content
PPTX
data base programming chapter1 26 slides
PPT
Java Developers, make the database work for you (NLJUG JFall 2010)
PDF
SQL_NOTES.pdf
PPTX
SQL SERVER Training in Pune Slides
PDF
DBMS 1.pdf from computer application for business
PDF
APznzaa8jyCqEfOzIXqwAqxTBkpfxFd1OHN5G6XprVbamkoLUf3KcvZywfO4T71wgjvmg7lDxEuM5...
PPT
Implementing the Databese Server session 02
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Using Basic Structured Query Language lo1.pptx
Introduction to SQL, SQL*Plus
DataBase Management systems (IM).pptx
Introduction to Structured Query Language
Relation Database Management Systems-23UITCC31.pptx
Complete first chapter rdbm 17332
Database Systems - Introduction to SQL (Chapter 3/1)
Lecture - MY-SQL/ SQL Commands - DDL.pptx
20CS402 - DATABASE MANAGEMENT SYSTEMS NOTES
SQL Intro
Pl sql content
data base programming chapter1 26 slides
Java Developers, make the database work for you (NLJUG JFall 2010)
SQL_NOTES.pdf
SQL SERVER Training in Pune Slides
DBMS 1.pdf from computer application for business
APznzaa8jyCqEfOzIXqwAqxTBkpfxFd1OHN5G6XprVbamkoLUf3KcvZywfO4T71wgjvmg7lDxEuM5...
Implementing the Databese Server session 02
MYSQL Presentation for SQL database connectivity
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Ad

More from Gowarthini (6)

PPTX
PPTX
Oo ps
PPTX
Mvc ppt
PPTX
Cryptography ppt
PPTX
Git overview
PPTX
Basics of networking
Oo ps
Mvc ppt
Cryptography ppt
Git overview
Basics of networking

Recently uploaded (20)

PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
Trump Administration's workforce development strategy
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
master seminar digital applications in india
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Lesson notes of climatology university.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
Weekly quiz Compilation Jan -July 25.pdf
Final Presentation General Medicine 03-08-2024.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Microbial disease of the cardiovascular and lymphatic systems
Chinmaya Tiranga quiz Grand Finale.pdf
O7-L3 Supply Chain Operations - ICLT Program
Yogi Goddess Pres Conference Studio Updates
Trump Administration's workforce development strategy
FourierSeries-QuestionsWithAnswers(Part-A).pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.
O5-L3 Freight Transport Ops (International) V1.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
master seminar digital applications in india
A systematic review of self-coping strategies used by university students to ...
Lesson notes of climatology university.
2.FourierTransform-ShortQuestionswithAnswers.pdf
Orientation - ARALprogram of Deped to the Parents.pptx

Structured query language(sql)ppt

  • 1. Structured Query Language(SQL) BY., B. Gowarthini C. Divya V. Suruthi
  • 2. Agenda: • Introduction • Datatypes of SQL • Operators of SQL • Basic Database Concepts • Processing capabilities of SQL • Joins and its types • Aggregate functions • Stored procedures • Index • Triggers
  • 3. Introduction: • SQL is a non procedural language that is used to create, manipulate and process the database. Characteristics of SQL: • Easy to learn and use. • Large volume of DB can be handled easily.
  • 4. Datatypes of SQL: • Like programming languages, datatypes are also available in SQL • Most commonly used types: Int Date Long Number varchar/ nvarchar
  • 5. Operators of SQL: Operators in SQL:  Arithmetic operators : +, -, *, / (Simple mathematical operations)  Relational operators : =, <, >, <=, >=, <> (For comparing values)  Logical operators : OR, AND, NOT (For condition clause)
  • 6. Basic Database concepts: • Data: -Raw facts and figures useful to an organization. -Cannot take decisions on basis of data. • Field : -Set of characters • Record: -Collection of fields • Primary key: -Uniquely identifies the records -Never allow NULL and duplicates • Foreign key: -Referential integrity
  • 7. Processing capabilities of SQL • Data Definition Language (DDL) • Views • Data Manipulation Language (DML) • Data Control Language (DCL) • Transaction Control Language (TCL)
  • 8. Processing capabilities of SQL Data Definition Language (DDL): Common DDL statements are CREATE, ALTER, DROP. CREATE – To create new DB, table, index, view etc.., ALTER - To alter the table, DB etc.., DROP - To delete objects from DB. View: - View is a kind of virtual table. - It contains rows and columns like a real table. - We can create a view by selecting fields.
  • 9. Processing capabilities of SQL Data Manipulation Language (DML): - To manipulate the database objects - Query the DB for information retrieval - Common DML statements are  SELECT  INSERT  DELETE  UPDATE
  • 10. Processing capabilities of SQL Data Control Language(DCL): - Controlling access to the data - Common DCL commands are GRANT , REVOKE Transaction Control Language (TCL): - Control the transaction in DB system - Common TCL commands are COMMIT, ROLLBACK
  • 11. Joins and its types • Used to combine rows from two or more tables, based on a related column between them. Types: - Inner Join - Left Join - Right Join - Full Join - Self Join
  • 13. Stored procedures • It stored as an object in the database server. • The code can be reused over and over again and then just call it to execute it. Syntax: CREATE PROCEDURE procedure_name // Create stored proc. AS sql_statement GO; EXEC procedure_name; //Execute a stored procedure
  • 14. Index • Used to retrieve data from the DB very fast. • Users cannot see the indexes, they are just used to speed up searches/queries. Syntax: CREATE INDEX index_name ON table_name (column1, column2, ...); Types: Clustered index - rows are stored physically on the disk in the same order Non Clustered index - second list that has pointers to the physical rows.
  • 15. Triggers • Special kind of Stored procedure • Automatically invokes whenever a DML and DDL events in DB occurs Syntax: create trigger deep on emp for insert,update,delete as print'you can not insert,update and delete this table i' rollback;