SlideShare a Scribd company logo
MY SQL(DATABASE SOFTWARE)
MySQL is a relational database management system ( RDBMS ) and which runs a server, providing multi-user access to a number of databases.
MySQL is currently the most popular o pen source  database server in existence.  MY SQL
For example: SELECT * FROM table; Where  'SELECT',  'FROM' and  'table'  are in  English,   but  '*'  is a  symbol  that means all.
USES: Many web applications use MySQL as the  database component of a  LAMP  software stack.
Its popularity for use with web applications is  closely tied to the popularity of  PHP , which is  often combined with MySQL.
Several  high-traffic web sites  includes: Flickr,
Facebook,
Wikipedia,
Google,
Nokia and
YouTube  use  MySQL  for data storage and logging of user data.
CREATE  Command - is used to  create  a  database/table.
SELECT  Command - is used to  retrieve  data from  the database.
DELETE  Command - is used to  delete  data from t  the database. . BASIC QUERIES COMMANDS
INSERT  Command - is used to  insert  data into a database.
UPDATE  Command - is used to  update  the data in a table.
DROP  Command - is used to  delete or drop  the database/table.
CREATE  Command : The Create command is used to create a table by specifying the tablename, fieldnames and constraints. Syntax: $createSQL=("CREATE TABLE tblName");
SELECT  Command:   It is used to select the records from a table using its field names. To select all the fields in a table, '*' is used in the command. Syntax: $selectSQL=("SELECT field_names FROM tablename");
DELETE  Comman d:   The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=("DELETE * FROM tablename WHERE condition");
INSERT  Command: It is used to insert records into a table. The values are assigned to the field names as shown below: Syntax : $insertSQL=("INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) ");
UPDATE  Command: It is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them. Syntax: $updateSQL=("UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber");
DROP  Command: The Drop command is used to delete all the records in a table using the table name as shown below:  Syntax: $dropSQL=("DROP tblName");
Advanced functions and queries that can be useful when building more complex applications. Some of the Advanced queries: *INNER JOIN   *REPLACE *LTRIM,RTRIM  *DATE AND TIME *SIGN  *SQRT *CEILING  *FLOOR ADVANCED QUERIES
INNER JOIN: It is used to retrieve the data from all tables listed based on condition listed after keyword ON.  REPLACE: The REPLACE function searches a character string and replaces characters found in search string with characters listed in replacement Str.
LTRIM: The LTRIM function removes any leading (left-hand) spaces in a character string. RTRIM: The RTRIM function works like LTRIM, but it removes trailing spaces.
SIGN:   The SIGN function takes in a numeric expression and returns the following values based on the sign of the input number: Return Value   Meaning − 1 Input number is negative   0 Input number is zero   1 Input number is positive Null Input number is null
SQRT :   The  SQRT  function takes in a single numeric expression and returns its square root.  CEILING (CEIL): The  CEILING  function returns the smallest integer that is greater than or equal to the value of the numeric expression provided as an input parameter.
FLOOR:   It returns the integer that is less than or equal to the value of the numeric expression provided as an input parameter.
MySQL supports "routines" and there are two  kinds of routines:
stored procedures  or functions
whose return values we use in other SQL  statements.
A stored procedure is a procedure (like a  subprogram in a regular computing language)  that is stored (in the database). PROCEDURES

More Related Content

What's hot (20)

PPS
Procedures/functions of rdbms
jain.pralabh
 
PPT
ORACLE PL SQL
Srinath Maharana
 
RTF
Trigger and cursor program using sql
Sushil Mishra
 
PPT
Basic cursors in oracle
Suhel Firdus
 
PPT
Plsql
Mandeep Singh
 
PPT
Les22[1]Advanced Explicit Cursor Concepts
siavosh kaviani
 
PPTX
Oracle: PLSQL Introduction
DataminingTools Inc
 
PPTX
PL-SQL DIFFERENT PROGRAMS
raj upadhyay
 
DOCX
Functions oracle (pl/sql)
harman kaur
 
PPT
Oracle: PLSQL
DataminingTools Inc
 
PPTX
Oracle: Basic SQL
DataminingTools Inc
 
PPT
Les18[1]Interacting with the Oracle Server
siavosh kaviani
 
PPTX
Oracle: Cursors
DataminingTools Inc
 
PPTX
PLSQL Tutorial
Quang Minh Đoàn
 
PPT
Les09[1]Manipulating Data
siavosh kaviani
 
PPTX
PL/SQL Fundamentals I
Nick Buytaert
 
PPT
7a advanced tsql
Nauman R
 
PPTX
DDL,DML,SQL Functions and Joins
Ashwin Dinoriya
 
PPT
Les16[1]Declaring Variables
siavosh kaviani
 
PPT
Sequences and indexes
Balqees Al.Mubarak
 
Procedures/functions of rdbms
jain.pralabh
 
ORACLE PL SQL
Srinath Maharana
 
Trigger and cursor program using sql
Sushil Mishra
 
Basic cursors in oracle
Suhel Firdus
 
Les22[1]Advanced Explicit Cursor Concepts
siavosh kaviani
 
Oracle: PLSQL Introduction
DataminingTools Inc
 
PL-SQL DIFFERENT PROGRAMS
raj upadhyay
 
Functions oracle (pl/sql)
harman kaur
 
Oracle: PLSQL
DataminingTools Inc
 
Oracle: Basic SQL
DataminingTools Inc
 
Les18[1]Interacting with the Oracle Server
siavosh kaviani
 
Oracle: Cursors
DataminingTools Inc
 
PLSQL Tutorial
Quang Minh Đoàn
 
Les09[1]Manipulating Data
siavosh kaviani
 
PL/SQL Fundamentals I
Nick Buytaert
 
7a advanced tsql
Nauman R
 
DDL,DML,SQL Functions and Joins
Ashwin Dinoriya
 
Les16[1]Declaring Variables
siavosh kaviani
 
Sequences and indexes
Balqees Al.Mubarak
 

Viewers also liked (6)

ODP
Linuxppt
poornima sugumaran
 
ODP
Linuxppt
poornima sugumaran
 
PDF
Zend Server
Jagat Kothari
 
PPTX
Introducing drupal
Gokul Muralidharan
 
Ad

Similar to Mysqlppt (20)

PPT
My sql with querys
NIRMAL FELIX
 
PPTX
Database COMPLETE
Abrar ali
 
ODP
Mysql1
rajikaa
 
PPT
MYSQL
ARJUN
 
DOCX
Sq lite
Revuru Bharadwaja
 
PPT
Mysql
Rathan Raj
 
PDF
Complete SQL in one video by shradha.pdf
rahulashu699
 
DOC
Oracle notes
Prashant Dadmode
 
PPTX
Structure Query Language Advance Training
parisaxena1418
 
PPTX
Unit 2 web technologies
tamilmozhiyaltamilmo
 
PPT
Myth busters - performance tuning 101 2007
paulguerin
 
PPTX
PostgreSQL Database Slides
metsarin
 
PDF
Database development coding standards
Alessandro Baratella
 
PPTX
Introduction to sql new
SANTOSH RATH
 
DOC
Sql Queries
webicon
 
PDF
9 Python programming notes for ktu physics and computer application semester 4
ebindboby1
 
PPTX
sql.pptx
slavskrillex
 
PPT
Mysql Ppt
Hema Prasanth
 
My sql with querys
NIRMAL FELIX
 
Database COMPLETE
Abrar ali
 
Mysql1
rajikaa
 
MYSQL
ARJUN
 
Mysql
Rathan Raj
 
Complete SQL in one video by shradha.pdf
rahulashu699
 
Oracle notes
Prashant Dadmode
 
Structure Query Language Advance Training
parisaxena1418
 
Unit 2 web technologies
tamilmozhiyaltamilmo
 
Myth busters - performance tuning 101 2007
paulguerin
 
PostgreSQL Database Slides
metsarin
 
Database development coding standards
Alessandro Baratella
 
Introduction to sql new
SANTOSH RATH
 
Sql Queries
webicon
 
9 Python programming notes for ktu physics and computer application semester 4
ebindboby1
 
sql.pptx
slavskrillex
 
Mysql Ppt
Hema Prasanth
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 

Mysqlppt

  • 2. MySQL is a relational database management system ( RDBMS ) and which runs a server, providing multi-user access to a number of databases.
  • 3. MySQL is currently the most popular o pen source database server in existence. MY SQL
  • 4. For example: SELECT * FROM table; Where 'SELECT', 'FROM' and 'table' are in English, but '*' is a symbol that means all.
  • 5. USES: Many web applications use MySQL as the database component of a LAMP software stack.
  • 6. Its popularity for use with web applications is closely tied to the popularity of PHP , which is often combined with MySQL.
  • 7. Several high-traffic web sites includes: Flickr,
  • 12. YouTube use MySQL for data storage and logging of user data.
  • 13. CREATE Command - is used to create a database/table.
  • 14. SELECT Command - is used to retrieve data from the database.
  • 15. DELETE Command - is used to delete data from t the database. . BASIC QUERIES COMMANDS
  • 16. INSERT Command - is used to insert data into a database.
  • 17. UPDATE Command - is used to update the data in a table.
  • 18. DROP Command - is used to delete or drop the database/table.
  • 19. CREATE Command : The Create command is used to create a table by specifying the tablename, fieldnames and constraints. Syntax: $createSQL=("CREATE TABLE tblName");
  • 20. SELECT Command: It is used to select the records from a table using its field names. To select all the fields in a table, '*' is used in the command. Syntax: $selectSQL=("SELECT field_names FROM tablename");
  • 21. DELETE Comman d: The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=("DELETE * FROM tablename WHERE condition");
  • 22. INSERT Command: It is used to insert records into a table. The values are assigned to the field names as shown below: Syntax : $insertSQL=("INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) ");
  • 23. UPDATE Command: It is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them. Syntax: $updateSQL=("UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber");
  • 24. DROP Command: The Drop command is used to delete all the records in a table using the table name as shown below: Syntax: $dropSQL=("DROP tblName");
  • 25. Advanced functions and queries that can be useful when building more complex applications. Some of the Advanced queries: *INNER JOIN *REPLACE *LTRIM,RTRIM *DATE AND TIME *SIGN *SQRT *CEILING *FLOOR ADVANCED QUERIES
  • 26. INNER JOIN: It is used to retrieve the data from all tables listed based on condition listed after keyword ON. REPLACE: The REPLACE function searches a character string and replaces characters found in search string with characters listed in replacement Str.
  • 27. LTRIM: The LTRIM function removes any leading (left-hand) spaces in a character string. RTRIM: The RTRIM function works like LTRIM, but it removes trailing spaces.
  • 28. SIGN: The SIGN function takes in a numeric expression and returns the following values based on the sign of the input number: Return Value Meaning − 1 Input number is negative 0 Input number is zero 1 Input number is positive Null Input number is null
  • 29. SQRT : The SQRT function takes in a single numeric expression and returns its square root. CEILING (CEIL): The CEILING function returns the smallest integer that is greater than or equal to the value of the numeric expression provided as an input parameter.
  • 30. FLOOR: It returns the integer that is less than or equal to the value of the numeric expression provided as an input parameter.
  • 31. MySQL supports "routines" and there are two kinds of routines:
  • 32. stored procedures or functions
  • 33. whose return values we use in other SQL statements.
  • 34. A stored procedure is a procedure (like a subprogram in a regular computing language) that is stored (in the database). PROCEDURES
  • 35. A stored procedure has a name, a parameter list, and an SQL statement, which can contain many more SQL statements.
  • 37. The general syntax of Creating a Stored Procedure is : CREATE PROCEDURE proc_name ([proc_parameter[......]]) routine_body
  • 38. proc_name : procedure name
  • 39. proc_parameter : [ IN | OUT | INOUT ] param_name type
  • 40. routine_body : Valid SQL procedure statement
  • 41. An IN parameter is used to pass value into procedure.
  • 42. An INOUT parameter is initialized by the caller and it can be modified by the procedure.
  • 43. Functions can return string, integer, or real values and can accept arguments of same types.
  • 44. We can define simple functions that operate on a single row at a time, or aggregate functions that operate on groups of rows.
  • 45. Information is provided to functions that enables them to check the number, types, and names of the arguments passed to them. FUNCTIONS
  • 46. CREATE FUNCTION Syntax: CREATE FUNCTION func_name ([func_parameter[,...]]) RETURNS type routine_body
  • 47. func_name : Function name func_parameter : param_name type type : Any valid MySQL datatype routine_body : Valid SQL procedure statement The RETURN clause is mandatory for FUNCTION. It used to indicate the return type of function.
  • 48. List of all important MySQL functions. MySQL Group By Clause - It means of grouping the result dataset by certain database table column(s).
  • 49. MySQL IN Clause - used alongwith any MySQL query to specify a condition.
  • 50. MySQL BETWEEN Clause - used to specify a condition.
  • 51. MySQL UNION Keyword - Use a UNION operation to combine multiple result sets into one.
  • 52. MySQL COUNT Function - used to count the number of rows in a database table.
  • 53. MySQL MAX Function - allows us to select the highest (maximum) value for a certain column.
  • 54. MySQL RAND Function - used to generate a random number using MySQL command.
  • 55. MySQL CONCAT Function - used to concatenate any string inside any MySQL command.
  • 56. MySQL DATE and Time Function - Complete list of MySQL Date and Time related functions.
  • 57. MySQL MIN Function - allows us to select the lowest (minimum) value for a certain column.
  • 58. MySQL AVG Function - selects the average value for certain table column.
  • 59. MySQL SUM Function - allows selecting the total for a numeric column.
  • 60. MySQL SQRT Function -generate a square root of a given number.
  • 61. What's the Difference Between a Stored Procedure and a Stored Function? It is same as the difference between a subroutine and a function: a stored procedure runs some code stored function runs some code and then returns a result.
  • 62. Why Use Stored Procedures and Stored Functions? The real advantage to using stored procedures and stored functions is that they provide functionality which is platform and application independant.
  • 63. It can be used to back up a database or to move database information from one server to another. 1.Export A MySQL Database: It is a good idea to export the data often as a backup. IMPORT AND EXPORT
  • 64. This example shows how to export a database. # mysqldump -u username -p password database_name > FILE.sql Replace username, password and database_name with your MySQL username, password and database name. File FILE.sql now holds a backup of your database, download it to your computer.
  • 65. 2. Import A MySQL Database: Here, we import a database. Using this to restore data from a backup or to import from another MySQL server. Start by uploading the FILE.sql file to the server where we will be running this command. # mysql -u username -p password database_name < FILE.sql