SlideShare a Scribd company logo
INTRODUCTION TO ORACLE AND SQL
UNIT-5
S. Vasuki, M.C.A.,
Assistant Professor,
Department of Computer Science
Sri Sarada Niketan College of Science for Women,
Karur.
Unlocking the Power of SQL
Functions
Welcome to our SQL Functions workshop! Today, we'll explore the versatility
of SQL functions and how they can be leveraged for data manipulation and
analysis.
Introduction to SQL Functions
Function Definition
A function is a pre-defined SQL code
block that performs a specific operation
on data.
Function Categories
SQL functions can be broadly
categorized as single-row and group
functions.
Function Benefits
Functions enhance data manipulation,
enable complex calculations, and
improve code readability.
Single Row Functions
1 String Functions
Functions like LENGTH,
SUBSTRING, and UPPERcase
manipulate text data.
2 Numeric Functions
Functions like ROUND, ABS,
and SQRT perform
calculations on numeric
data.
3 Date Functions
Functions like DATE_ADD,
DATEDIFF, and DAYOFWEEK
handle date and time
operations.
4 Conversion Functions
Functions like CAST and
CONVERT change data types
between text, numeric, and
date formats.
Group Functions
SUM
Calculates the total value of a
column.
AVG
Calculates the average value of
a column.
COUNT
Counts the number of rows in a
table or the number of non-null
values in a column.
MIN, MAX
Finds the minimum and
maximum values in a column.
Reporting Aggregated Data
GROUP BY
Groups rows based on a specified
column.
HAVING
Filters the grouped data based on
specified criteria.
Displaying Data from Multiple
Tables
1 INNER JOIN
Returns rows where values in both tables match.
2 LEFT OUTER JOIN
Returns all rows from the left table and matching rows from the right table.
3 RIGHT OUTER JOIN
Returns all rows from the right table and matching rows from the left table.
4 FULL OUTER JOIN
Returns all rows from both tables, regardless of match.
Sub Queries
Correlated Sub Queries
Subqueries referencing the outer query's data.
Non-Correlated Sub Queries
Subqueries independent of the outer query.
Nested Sub Queries
Subqueries embedded within other subqueries.
Normalization
1
1NF
Eliminate repeating groups.
2
2NF
Eliminate partial dependencies.
3
3NF
Eliminate transitive dependencies.
Denormalization
1
Reduced Queries
Fewer joins needed for data retrieval.
2
Increased Performance
Faster access to data for reporting.
3
Data Redundancy
Increased storage needs and potential for data
inconsistency.
Best Practices for Database
Design
1
Consistency
Follow naming conventions and data
types.
2
Efficiency
Optimize for performance and
resource use.
3
Security
Implement access control and data
encryption.
4
Scalability
Design for future growth and data
volume.
Ad

More Related Content

Similar to Unit 5 Introduction to Oracle and Sql.pptx (20)

MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
DubsmashTamizhan
 
Database testing
Database testingDatabase testing
Database testing
Pesara Swamy
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
ambika93
 
Viva voce
Viva voceViva voce
Viva voce
Sadhana Sreekanth
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
DraguClaudiu
 
SQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business AnalystSQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business Analyst
HireQuotient
 
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
MySQL Interview Questions and Answers PDF By ScholarHat.pdfMySQL Interview Questions and Answers PDF By ScholarHat.pdf
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
Scholarhat
 
SQL dabatase interveiw pdf for interveiw preparation
SQL dabatase  interveiw pdf for interveiw preparationSQL dabatase  interveiw pdf for interveiw preparation
SQL dabatase interveiw pdf for interveiw preparation
kumarvikesh2841998
 
SQL Interview Questions For Experienced
SQL Interview Questions For ExperiencedSQL Interview Questions For Experienced
SQL Interview Questions For Experienced
zynofustechnology
 
GROUP-4-Database-Connectivity-with-MySqL.pptx
GROUP-4-Database-Connectivity-with-MySqL.pptxGROUP-4-Database-Connectivity-with-MySqL.pptx
GROUP-4-Database-Connectivity-with-MySqL.pptx
JohnLhoydMaderable
 
Adbms
AdbmsAdbms
Adbms
jass12345
 
Database Basics
Database BasicsDatabase Basics
Database Basics
Abdel Moneim Emad
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…
Aaron Shilo
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorial
Mohd Tousif
 
SQL
SQLSQL
SQL
kaushal123
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
Syed Shah
 
HPD SQL Training - Beginner - 20220916.pptx
HPD SQL Training - Beginner - 20220916.pptxHPD SQL Training - Beginner - 20220916.pptx
HPD SQL Training - Beginner - 20220916.pptx
PatriceRochon1
 
sql-commands.pdf
sql-commands.pdfsql-commands.pdf
sql-commands.pdf
Prof. Dr. K. Adisesha
 
Sql commands
Sql commandsSql commands
Sql commands
Prof. Dr. K. Adisesha
 
Sql commands
Sql commandsSql commands
Sql commands
Prof. Dr. K. Adisesha
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
ambika93
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
DraguClaudiu
 
SQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business AnalystSQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business Analyst
HireQuotient
 
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
MySQL Interview Questions and Answers PDF By ScholarHat.pdfMySQL Interview Questions and Answers PDF By ScholarHat.pdf
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
Scholarhat
 
SQL dabatase interveiw pdf for interveiw preparation
SQL dabatase  interveiw pdf for interveiw preparationSQL dabatase  interveiw pdf for interveiw preparation
SQL dabatase interveiw pdf for interveiw preparation
kumarvikesh2841998
 
SQL Interview Questions For Experienced
SQL Interview Questions For ExperiencedSQL Interview Questions For Experienced
SQL Interview Questions For Experienced
zynofustechnology
 
GROUP-4-Database-Connectivity-with-MySqL.pptx
GROUP-4-Database-Connectivity-with-MySqL.pptxGROUP-4-Database-Connectivity-with-MySqL.pptx
GROUP-4-Database-Connectivity-with-MySqL.pptx
JohnLhoydMaderable
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…
Aaron Shilo
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorial
Mohd Tousif
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
Syed Shah
 
HPD SQL Training - Beginner - 20220916.pptx
HPD SQL Training - Beginner - 20220916.pptxHPD SQL Training - Beginner - 20220916.pptx
HPD SQL Training - Beginner - 20220916.pptx
PatriceRochon1
 

More from svasuki0708 (6)

Unit 4 Introduction to Oracle and Sql.pptx
Unit 4 Introduction to Oracle and Sql.pptxUnit 4 Introduction to Oracle and Sql.pptx
Unit 4 Introduction to Oracle and Sql.pptx
svasuki0708
 
Unit 4 internet and web applications.pptx
Unit 4 internet and web applications.pptxUnit 4 internet and web applications.pptx
Unit 4 internet and web applications.pptx
svasuki0708
 
Unit 1 Introduction to Oracle and sql (6).pptx
Unit 1 Introduction to Oracle and sql (6).pptxUnit 1 Introduction to Oracle and sql (6).pptx
Unit 1 Introduction to Oracle and sql (6).pptx
svasuki0708
 
Unit 3 introduction to Oracle and Sql.pptx
Unit 3 introduction to Oracle and Sql.pptxUnit 3 introduction to Oracle and Sql.pptx
Unit 3 introduction to Oracle and Sql.pptx
svasuki0708
 
unit 3 internet and web application.pptx
unit 3 internet and web application.pptxunit 3 internet and web application.pptx
unit 3 internet and web application.pptx
svasuki0708
 
Unit 2 Introduction to Oracle and Sql.pptx
Unit 2 Introduction to Oracle and Sql.pptxUnit 2 Introduction to Oracle and Sql.pptx
Unit 2 Introduction to Oracle and Sql.pptx
svasuki0708
 
Unit 4 Introduction to Oracle and Sql.pptx
Unit 4 Introduction to Oracle and Sql.pptxUnit 4 Introduction to Oracle and Sql.pptx
Unit 4 Introduction to Oracle and Sql.pptx
svasuki0708
 
Unit 4 internet and web applications.pptx
Unit 4 internet and web applications.pptxUnit 4 internet and web applications.pptx
Unit 4 internet and web applications.pptx
svasuki0708
 
Unit 1 Introduction to Oracle and sql (6).pptx
Unit 1 Introduction to Oracle and sql (6).pptxUnit 1 Introduction to Oracle and sql (6).pptx
Unit 1 Introduction to Oracle and sql (6).pptx
svasuki0708
 
Unit 3 introduction to Oracle and Sql.pptx
Unit 3 introduction to Oracle and Sql.pptxUnit 3 introduction to Oracle and Sql.pptx
Unit 3 introduction to Oracle and Sql.pptx
svasuki0708
 
unit 3 internet and web application.pptx
unit 3 internet and web application.pptxunit 3 internet and web application.pptx
unit 3 internet and web application.pptx
svasuki0708
 
Unit 2 Introduction to Oracle and Sql.pptx
Unit 2 Introduction to Oracle and Sql.pptxUnit 2 Introduction to Oracle and Sql.pptx
Unit 2 Introduction to Oracle and Sql.pptx
svasuki0708
 
Ad

Recently uploaded (20)

New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Ad

Unit 5 Introduction to Oracle and Sql.pptx

  • 1. INTRODUCTION TO ORACLE AND SQL UNIT-5 S. Vasuki, M.C.A., Assistant Professor, Department of Computer Science Sri Sarada Niketan College of Science for Women, Karur.
  • 2. Unlocking the Power of SQL Functions Welcome to our SQL Functions workshop! Today, we'll explore the versatility of SQL functions and how they can be leveraged for data manipulation and analysis.
  • 3. Introduction to SQL Functions Function Definition A function is a pre-defined SQL code block that performs a specific operation on data. Function Categories SQL functions can be broadly categorized as single-row and group functions. Function Benefits Functions enhance data manipulation, enable complex calculations, and improve code readability.
  • 4. Single Row Functions 1 String Functions Functions like LENGTH, SUBSTRING, and UPPERcase manipulate text data. 2 Numeric Functions Functions like ROUND, ABS, and SQRT perform calculations on numeric data. 3 Date Functions Functions like DATE_ADD, DATEDIFF, and DAYOFWEEK handle date and time operations. 4 Conversion Functions Functions like CAST and CONVERT change data types between text, numeric, and date formats.
  • 5. Group Functions SUM Calculates the total value of a column. AVG Calculates the average value of a column. COUNT Counts the number of rows in a table or the number of non-null values in a column. MIN, MAX Finds the minimum and maximum values in a column.
  • 6. Reporting Aggregated Data GROUP BY Groups rows based on a specified column. HAVING Filters the grouped data based on specified criteria.
  • 7. Displaying Data from Multiple Tables 1 INNER JOIN Returns rows where values in both tables match. 2 LEFT OUTER JOIN Returns all rows from the left table and matching rows from the right table. 3 RIGHT OUTER JOIN Returns all rows from the right table and matching rows from the left table. 4 FULL OUTER JOIN Returns all rows from both tables, regardless of match.
  • 8. Sub Queries Correlated Sub Queries Subqueries referencing the outer query's data. Non-Correlated Sub Queries Subqueries independent of the outer query. Nested Sub Queries Subqueries embedded within other subqueries.
  • 9. Normalization 1 1NF Eliminate repeating groups. 2 2NF Eliminate partial dependencies. 3 3NF Eliminate transitive dependencies.
  • 10. Denormalization 1 Reduced Queries Fewer joins needed for data retrieval. 2 Increased Performance Faster access to data for reporting. 3 Data Redundancy Increased storage needs and potential for data inconsistency.
  • 11. Best Practices for Database Design 1 Consistency Follow naming conventions and data types. 2 Efficiency Optimize for performance and resource use. 3 Security Implement access control and data encryption. 4 Scalability Design for future growth and data volume.