SlideShare a Scribd company logo
Introduction to
SQL
What is SQL?
▶ Structured Query Language
▶ SQL is Structured Query Language, which is a
computer language for storing, manipulating and
retrieving data stored in relational database.
▶ SQL is the standard language for Relation Database
System. All relational database management systems
like “MySQL, MS Access, Oracle, Sybase, Informix,
postgres and SQL Server” use SQL as standard
database language.
SQL Commands
▶ DDL - Data Definition Language
▶ DML - Data Manipulation Language
▶ DCL - Data Control Language
▶ DQL - Data Query Language
SQL Commands
SQL Commands
SQL RDBMS Concepts
▶ TABLE
▶ RECORD
▶ COLUMN
▶ CELL
▶ NULL?
SQL RDBMS Concepts
▶ SQL Constraints: (applied on columns)
▶ NOT NULL Constraint
▶ UNIQUE Constraint
▶ PRIMARY Key
▶ FOREIGN Key
▶ CHECK Constraint
▶ Data Integrity:
▶ Entity Integrity: There are no duplicate rows in a table
▶ Domain Integrity: Enforces valid entries for a given column by
restricting the type
▶ Referential Integrity: Rows cannot be deleted which are used by
other records
▶ User-Defined Integrity: Enforces some specific business rules
SQL RDBMS Concepts
▶ Data Types:
▶ Character datatypes:
▶ CHAR
▶ NCHAR
▶ NVARCHAR2
▶ VARCHAR2
▶ Numeric datatypes:
▶ NUMBER
▶ BINARY_FLOAT
▶ BINARY_DOUBLE
▶ Date time datatype:
▶ DATE
DCL: CREATE USER
▶ 1) Define User with Username/Password
▶ 2) Grants Sufficient Privileges.
▶ Using SQL Developer (UI, Command)
▶ Using SQL *PLUS (Command)
SQL : DDL
▶ Create Table:
▶ COLUMNS
▶ CONSTRAINTS
SQL: DDL
▶ DROP TABLE:
▶ ALTER TABLE
▶ OTHER DDL COMMANDS!!!!
SQL: DML: INSERT
▶ INSERT INTO:
▶ NUMBER, CHAR/VARCHAR2, DATE?
SQL: DML: INSERT
▶ INSERT INTO:
▶ SPECIFIC COLUMNS
SQL: DML: INSERT
▶ INSERT INTO:
▶ FOREIGN KEY
▶ ALL DML COMMANDS NEED COMMIT
SQL: DML: UPDATE
▶ UPDATE
▶ WHERE CLAUSE
SQL: DML: DELETE
▶ DELETE (DELETE VS DROP????)
HR-Schema
SQL: DQL: SELECT
▶ SELECT
▶ *
▶ SPECIFIC COLUMNS
SQL: DQL: SELECT
▶ DISTINCT CLUASE
SQL: DQL: SELECT
▶ WHERE CLUASE
SQL: DQL: SELECT
▶ IN CLUASE
▶ NOT IN
▶ NULL IN WHERE?
▶ IS NULL
▶ IS NOT NULL
SQL: DQL: SELECT
▶ ORDER BY
SQL: DQL: SELECT
▶ GROUP BY
▶ AGGREGATE FUCTION
▶ MAX,MIN
▶ AVG
▶ COUNT
▶ SUM
▶ …
▶ HAVING CLAUSE
SQL: DQL: SELECT
▶ SELECT FROM MULTIPLE TABLES
▶ CARTESIAN MULTIPICATION
▶ JOIN

More Related Content

What's hot

SQL Overview
SQL OverviewSQL Overview
SQL Overview
Stewart Rogers
 
SQL
SQLSQL
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Crud tutorial en
Crud tutorial enCrud tutorial en
Crud tutorial en
forkgrown
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
Md.Mojibul Hoque
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
Ishucs
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
Vibrant Technologies & Computers
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
Danish Mehraj
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
Hasan Kata
 
SQL injection: Not only AND 1=1
SQL injection: Not only AND 1=1SQL injection: Not only AND 1=1
SQL injection: Not only AND 1=1
Bernardo Damele A. G.
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
Samir Sabry
 
Top 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | EdurekaTop 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | Edureka
Edureka!
 
Sql commands
Sql commandsSql commands
Sql commands
Prof. Dr. K. Adisesha
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
VARSHAKUMARI49
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
Sabana Maharjan
 
SQL
SQLSQL
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
Ram Sagar Mourya
 

What's hot (20)

SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
SQL
SQLSQL
SQL
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
Crud tutorial en
Crud tutorial enCrud tutorial en
Crud tutorial en
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
 
SQL injection: Not only AND 1=1
SQL injection: Not only AND 1=1SQL injection: Not only AND 1=1
SQL injection: Not only AND 1=1
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
 
Top 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | EdurekaTop 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | Edureka
 
Sql commands
Sql commandsSql commands
Sql commands
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
SQL
SQLSQL
SQL
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 

Similar to SQL .pptx

introductiontosql-161216154706.pdf
introductiontosql-161216154706.pdfintroductiontosql-161216154706.pdf
introductiontosql-161216154706.pdf
ssusere4c6aa
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ehsan Hamzei
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
Gong Haibing
 
SQL
SQLSQL
SQL 3.pptx
SQL 3.pptxSQL 3.pptx
SQL 3.pptx
Rishab Saini
 
Structured Query Language introduction..
Structured Query Language introduction..Structured Query Language introduction..
Structured Query Language introduction..
FerryKemperman
 
SQL overview and software
SQL overview and softwareSQL overview and software
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Shubham Shukla
 
SQL Introduction.pptx
SQL Introduction.pptxSQL Introduction.pptx
SQL Introduction.pptx
RUBAB79
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
Bala Ganesh
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
Highervista
 
Kace & SQL
Kace & SQLKace & SQL
Kace & SQL
Dell World
 
Lab
LabLab
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 
Introduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQLIntroduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQL
Collaboration Technologies
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
Nitesh Singh
 
database management system: sql commands lab sql
database management system: sql commands lab sqldatabase management system: sql commands lab sql
database management system: sql commands lab sql
trapeziumtrapezoid12
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
pnp @in
 
SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
RareDeath
 
Sql database development part 1
Sql database development part 1Sql database development part 1
Sql database development part 1
Sqlperfomance
 

Similar to SQL .pptx (20)

introductiontosql-161216154706.pdf
introductiontosql-161216154706.pdfintroductiontosql-161216154706.pdf
introductiontosql-161216154706.pdf
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
 
SQL
SQLSQL
SQL
 
SQL 3.pptx
SQL 3.pptxSQL 3.pptx
SQL 3.pptx
 
Structured Query Language introduction..
Structured Query Language introduction..Structured Query Language introduction..
Structured Query Language introduction..
 
SQL overview and software
SQL overview and softwareSQL overview and software
SQL overview and software
 
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}
 
SQL Introduction.pptx
SQL Introduction.pptxSQL Introduction.pptx
SQL Introduction.pptx
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
Kace & SQL
Kace & SQLKace & SQL
Kace & SQL
 
Lab
LabLab
Lab
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
 
Introduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQLIntroduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQL
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
database management system: sql commands lab sql
database management system: sql commands lab sqldatabase management system: sql commands lab sql
database management system: sql commands lab sql
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
 
Sql database development part 1
Sql database development part 1Sql database development part 1
Sql database development part 1
 

More from SityogInstituteOfTec1

dbms-1.pptx
dbms-1.pptxdbms-1.pptx
C++ basic.ppt
C++ basic.pptC++ basic.ppt
C++ basic.ppt
SityogInstituteOfTec1
 
MCQ fundamental-4 .pptx
MCQ fundamental-4 .pptxMCQ fundamental-4 .pptx
MCQ fundamental-4 .pptx
SityogInstituteOfTec1
 
diagram.pptx
diagram.pptxdiagram.pptx
diagram.pptx
SityogInstituteOfTec1
 
DBMS.pptx
DBMS.pptxDBMS.pptx
computer-generations.ppt
computer-generations.pptcomputer-generations.ppt
computer-generations.ppt
SityogInstituteOfTec1
 
block_diagram_of_computer.pptx
block_diagram_of_computer.pptxblock_diagram_of_computer.pptx
block_diagram_of_computer.pptx
SityogInstituteOfTec1
 

More from SityogInstituteOfTec1 (7)

dbms-1.pptx
dbms-1.pptxdbms-1.pptx
dbms-1.pptx
 
C++ basic.ppt
C++ basic.pptC++ basic.ppt
C++ basic.ppt
 
MCQ fundamental-4 .pptx
MCQ fundamental-4 .pptxMCQ fundamental-4 .pptx
MCQ fundamental-4 .pptx
 
diagram.pptx
diagram.pptxdiagram.pptx
diagram.pptx
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
computer-generations.ppt
computer-generations.pptcomputer-generations.ppt
computer-generations.ppt
 
block_diagram_of_computer.pptx
block_diagram_of_computer.pptxblock_diagram_of_computer.pptx
block_diagram_of_computer.pptx
 

Recently uploaded

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 

Recently uploaded (20)

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 

SQL .pptx

  • 2. What is SQL? ▶ Structured Query Language ▶ SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in relational database. ▶ SQL is the standard language for Relation Database System. All relational database management systems like “MySQL, MS Access, Oracle, Sybase, Informix, postgres and SQL Server” use SQL as standard database language.
  • 3. SQL Commands ▶ DDL - Data Definition Language ▶ DML - Data Manipulation Language ▶ DCL - Data Control Language ▶ DQL - Data Query Language
  • 6. SQL RDBMS Concepts ▶ TABLE ▶ RECORD ▶ COLUMN ▶ CELL ▶ NULL?
  • 7. SQL RDBMS Concepts ▶ SQL Constraints: (applied on columns) ▶ NOT NULL Constraint ▶ UNIQUE Constraint ▶ PRIMARY Key ▶ FOREIGN Key ▶ CHECK Constraint ▶ Data Integrity: ▶ Entity Integrity: There are no duplicate rows in a table ▶ Domain Integrity: Enforces valid entries for a given column by restricting the type ▶ Referential Integrity: Rows cannot be deleted which are used by other records ▶ User-Defined Integrity: Enforces some specific business rules
  • 8. SQL RDBMS Concepts ▶ Data Types: ▶ Character datatypes: ▶ CHAR ▶ NCHAR ▶ NVARCHAR2 ▶ VARCHAR2 ▶ Numeric datatypes: ▶ NUMBER ▶ BINARY_FLOAT ▶ BINARY_DOUBLE ▶ Date time datatype: ▶ DATE
  • 9. DCL: CREATE USER ▶ 1) Define User with Username/Password ▶ 2) Grants Sufficient Privileges. ▶ Using SQL Developer (UI, Command) ▶ Using SQL *PLUS (Command)
  • 10. SQL : DDL ▶ Create Table: ▶ COLUMNS ▶ CONSTRAINTS
  • 11. SQL: DDL ▶ DROP TABLE: ▶ ALTER TABLE ▶ OTHER DDL COMMANDS!!!!
  • 12. SQL: DML: INSERT ▶ INSERT INTO: ▶ NUMBER, CHAR/VARCHAR2, DATE?
  • 13. SQL: DML: INSERT ▶ INSERT INTO: ▶ SPECIFIC COLUMNS
  • 14. SQL: DML: INSERT ▶ INSERT INTO: ▶ FOREIGN KEY ▶ ALL DML COMMANDS NEED COMMIT
  • 15. SQL: DML: UPDATE ▶ UPDATE ▶ WHERE CLAUSE
  • 16. SQL: DML: DELETE ▶ DELETE (DELETE VS DROP????)
  • 18. SQL: DQL: SELECT ▶ SELECT ▶ * ▶ SPECIFIC COLUMNS
  • 19. SQL: DQL: SELECT ▶ DISTINCT CLUASE
  • 20. SQL: DQL: SELECT ▶ WHERE CLUASE
  • 21. SQL: DQL: SELECT ▶ IN CLUASE ▶ NOT IN ▶ NULL IN WHERE? ▶ IS NULL ▶ IS NOT NULL
  • 23. SQL: DQL: SELECT ▶ GROUP BY ▶ AGGREGATE FUCTION ▶ MAX,MIN ▶ AVG ▶ COUNT ▶ SUM ▶ … ▶ HAVING CLAUSE
  • 24. SQL: DQL: SELECT ▶ SELECT FROM MULTIPLE TABLES ▶ CARTESIAN MULTIPICATION ▶ JOIN