SlideShare une entreprise Scribd logo
1  sur  34
MY SQL(DATABASE SOFTWARE)
[object Object]
MySQL is currently the most popular o pen source  database server in existence.  MY SQL
[object Object],SELECT * FROM table; Where  'SELECT',  'FROM' and  'table'  are in  English,   but  '*'  is a  symbol  that means all.
USES: ,[object Object]
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: ,[object Object]
Facebook,
Wikipedia,
Google,
Nokia and
YouTube  use  MySQL  for data storage and logging of user data.
[object Object]
SELECT  Command - is used to  retrieve  data from  the database.
DELETE  Command - is used to  delete  data from t  the database. . BASIC QUERIES COMMANDS
[object Object]
UPDATE  Command - is used to  update  the data in a table.
DROP  Command - is used to  delete or drop  the database/table.
[object Object],The Create command is used to create a table by specifying the tablename, fieldnames and constraints. Syntax: $createSQL=("CREATE TABLE tblName");
[object Object],  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");
[object Object],  The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=("DELETE * FROM tablename WHERE condition");
[object Object],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,...) ");
[object Object],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");
[object Object],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
[object Object],It is used to retrieve the data from all tables listed based on condition listed after keyword ON.  ,[object Object],The REPLACE function searches a character string and replaces characters found in search string with characters listed in replacement Str.
[object Object],The LTRIM function removes any leading (left-hand) spaces in a character string. ,[object Object],The RTRIM function works like LTRIM, but it removes trailing spaces.
[object Object],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
[object Object],  The  SQRT  function takes in a single numeric expression and returns its square root.  ,[object Object],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.
[object Object],It returns the integer that is less than or equal to the value of the numeric expression provided as an input parameter.
[object Object]
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

Contenu connexe

Tendances

Trigger and cursor program using sql
Trigger and cursor program using sqlTrigger and cursor program using sql
Trigger and cursor program using sql
Sushil Mishra
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
harman kaur
 
7a advanced tsql
7a   advanced tsql7a   advanced tsql
7a advanced tsql
Nauman R
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
Ashwin Dinoriya
 

Tendances (20)

Procedures/functions of rdbms
Procedures/functions of rdbmsProcedures/functions of rdbms
Procedures/functions of rdbms
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
 
Trigger and cursor program using sql
Trigger and cursor program using sqlTrigger and cursor program using sql
Trigger and cursor program using sql
 
Basic cursors in oracle
Basic cursors in oracleBasic cursors in oracle
Basic cursors in oracle
 
Plsql
PlsqlPlsql
Plsql
 
Les22[1]Advanced Explicit Cursor Concepts
Les22[1]Advanced Explicit Cursor ConceptsLes22[1]Advanced Explicit Cursor Concepts
Les22[1]Advanced Explicit Cursor Concepts
 
Oracle: PLSQL Introduction
Oracle: PLSQL IntroductionOracle: PLSQL Introduction
Oracle: PLSQL Introduction
 
PL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMSPL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMS
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
 
Oracle: PLSQL
Oracle: PLSQLOracle: PLSQL
Oracle: PLSQL
 
Oracle: Basic SQL
Oracle: Basic SQLOracle: Basic SQL
Oracle: Basic SQL
 
Les18[1]Interacting with the Oracle Server
Les18[1]Interacting with  the Oracle ServerLes18[1]Interacting with  the Oracle Server
Les18[1]Interacting with the Oracle Server
 
Oracle: Cursors
Oracle: CursorsOracle: Cursors
Oracle: Cursors
 
PLSQL Tutorial
PLSQL TutorialPLSQL Tutorial
PLSQL Tutorial
 
Les09[1]Manipulating Data
Les09[1]Manipulating DataLes09[1]Manipulating Data
Les09[1]Manipulating Data
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
7a advanced tsql
7a   advanced tsql7a   advanced tsql
7a advanced tsql
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Les16[1]Declaring Variables
Les16[1]Declaring VariablesLes16[1]Declaring Variables
Les16[1]Declaring Variables
 
Sequences and indexes
Sequences and indexesSequences and indexes
Sequences and indexes
 

En vedette (6)

Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Php1
Php1Php1
Php1
 
Php1
Php1Php1
Php1
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Zend Server
Zend ServerZend Server
Zend Server
 
Introducing drupal
Introducing  drupalIntroducing  drupal
Introducing drupal
 

Similaire à Mysqlppt (20)

My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
Mysql1
Mysql1Mysql1
Mysql1
 
MYSQL
MYSQLMYSQL
MYSQL
 
Sq lite
Sq liteSq lite
Sq lite
 
Mysql
MysqlMysql
Mysql
 
Database programming
Database programmingDatabase programming
Database programming
 
Oracle notes
Oracle notesOracle notes
Oracle notes
 
Unit 2 web technologies
Unit 2 web technologiesUnit 2 web technologies
Unit 2 web technologies
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
 
sql.pptx
sql.pptxsql.pptx
sql.pptx
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
Dbms
DbmsDbms
Dbms
 
Module02
Module02Module02
Module02
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Mysqlppt

  • 2.
  • 3. MySQL is currently the most popular o pen source database server in existence. MY SQL
  • 4.
  • 5.
  • 6. Its popularity for use with web applications is closely tied to the popularity of PHP , which is often combined with MySQL.
  • 7.
  • 12. YouTube use MySQL for data storage and logging of user data.
  • 13.
  • 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.
  • 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.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 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.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 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.
  • 37.
  • 38.
  • 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.
  • 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.
  • 49. MySQL IN Clause - used alongwith any MySQL query to specify a condition.
  • 50. MySQL BETWEEN Clause - used to specify a condition.
  • 51.
  • 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.
  • 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.
  • 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.
  • 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