SlideShare a Scribd company logo
MySQL for
Oracle Developers



    Ronald Bradford
   www.arabx.com.au



                 Version 1.2 20 April 2006
MySQL for Oracle Developers

           MySQL Introduction


Solid peneration in open source community

LAMP Stack

Large number of open source projects

Included by default in most Linux distros




                                       Slide: 2
MySQL for Oracle Developers

        Purpose of Presentation


Maximise existing Oracle skill set

Preparation for management requests

Open Source introduction

Terminology/Product Knowledge Transfer




                                      Slide: 3
MySQL for Oracle Developers

             My Background                      INFO




16 years in Database Design Experience (1989)

10 years Oracle Experience (1996)

7 years MySQL Experience (1999)

Active in MySQL, Java, XP, Oracle User Groups 




                                     Slide: 4
MySQL for Oracle Developers

                  Presentation Conventions


    Associated Talk for DBA's                              MySQL for Oracle DBA's


    Oracle Specific Syntax                                     Oracle Command/Syntax




ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

MYSQL_HOME=/usr/lib/mysql (*)       MYSQL_DATA=/var/lib/mysql (*)

(*) For RPM install. Will differ depending on Distro, or .tar.gz install



                                                                           Slide: 5
MySQL for Oracle Developers

                   Product Comparision

Current Versions at March 2006 (used in examples)




   MySQL 5.0 GA  (5.0.20)  Standard/Max
                                       http://www.mysql.com/products/database/


   Oracle 10g Release 2 Express Edition (10.2.0.1)
                          http://www.oracle.com/technology/products/database/xe




                                                              Slide: 6
MySQL for Oracle Developers

                  Product Comparision                 INFO




Other Production Versions




   Oracle 10g Release 2 (PE, SE1, SE, EE)
   Oracle 9i, 8i, 7.3
   MySQL 4.1, 4.0, 3.23
   MySQL MaxDB 7.6



                                           Slide: 7
MySQL for Oracle Developers

                 Product Comparision

Development Versions




   MySQL 5.1  (currently beta 5.1.7)    5.1


   MySQL 5.2


   Open Source Availability     OS




                                          Slide: 8
MySQL for Oracle Developers

   Oracle Developer Environments                 INFO




Oracle JDeveloper Java Application

J2EE Application Development Framework (ADF)

Application Express (HTMLDB)

Oracle Forms 4.5, 6i, 9i,10g 

PHP (Zend Core)


                                      Slide: 9
MySQL for Oracle Developers




             Forrester Research

             December 29, 2004
             Open Source Databases 
             Come Of Age




                Slide: 10
MySQL for Oracle Developers

                       Technical Resources
                                                               MYSQL
             ORACLE
                             otn.oracle.com        dev.mysql.com    forge.mysql.com
                        forums.oracle.com          forums.mysql.com
                 www.oracle.com/support            www.mysql.com/network
                     education.oracle.com          www.mysql.com/training
www.oracle.com/education/certification/            www.mysql.com/certification
                          blogs.oracle.com         www.planetmysql.org
www.oracle.com/technology/community/user_groups    dev.mysql.com/user­groups
                                                   www.mysql.com/doc
www.oracle.com/technology/documentation

                           www.orafaq.com          dev.mysql.com/tech­resources/faq.html



                                                                         Slide: 11
MySQL for Oracle Developers

        MySQL 5.0 For Developers (5 days)                                                  INFO


                              http://www.mysql.com/training/workshops/mysql_dev.html


Objectives
  Describe the MySQL client/server architecture
  Understand the steps necessary to invoke MySQL client programs
  Utilize the general­purpose mysql client program to run queries and retrieve results
  Perform queries and analysis of data utilizing the MySQL Query Browser graphical user interface
  Explain the MySQL connectors that provide connectivity for client programs
  Select the best data type for representing information in MySQL
  Manage the structural characteristics of your databases
  Manage the structural characteristics of the tables within your databases
  Utilize the SELECT statement to retrieve information from database tables




                                                                               Slide: 12
MySQL for Oracle Developers

             MySQL 5.0 For Developers                                                      INFO




Utilize expressions in SQL statements to retrieve more detailed information
Utilize SQL statements to modify the contents of database tables
Write join expressions in your SQL statements to obtain information from multiple tables
Utilize subqueries in your SQL statements
Create views utilizing SELECT statements to produce quot;virtual tablesquot; of specific data
Perform bulk data import and export operations
Create user defined variables, prepared statements and stored routines
Create and manage triggers
Use the INFORMATION_SCHEMA database to access metadata
Debug MySQL applications
Configure and Optimize MySQL




                                                                              Slide: 13
MySQL for Oracle Developers

           MySQL Installation                                    INFO



                                         MySQL for Oracle DBA's


Two Initial Databases
 mysql
 test

                  http://dev.mysql.com/doc/refman/5.0/en/installing.html


Access Privileges
 root

           http://dev.mysql.com/doc/refman/5.0/en/privilege_system.html


                                                     Slide: 14
MySQL for Oracle Developers

             Configuration/Log Files                                  INFO


                                          MySQL for Oracle DBA's


my.cnf                                      $ORACLE_HOME/dbs/init.ora


 $MYSQL_HOME/my.cnf,  /etc/my.cnf

Database Log                               .../admin/XE/bdump/alert_XE.log


 $MYSQL_DATA/`hostname`.err 


N/A                               $ORACLE_HOME/network/admin/tnsnames.ora


 User Security (host)



                                                        Slide: 15
MySQL for Oracle Developers

                  Terminology                               INFO



                                          MYSQL
       ORACLE
           Database (files)    Database Server Instance
Database Instance (memory)     Database Server Instance
             Schema User       Database
                      User     User
              Table Space      Table Space

                               Storage Engine




                                                Slide: 16
MySQL for Oracle Developers

       MySQL Sample Database
                                                scott/tiger




Sakila Sample Database
 Announced at this Conference

 Showcases Current MySQL features



                                http://forums.mysql.com/list.php?121




                                                  Slide: 17
MySQL for Oracle Developers

MySQL Sample Database                INFO




                         Slide: 18
MySQL for Oracle Developers

               Command Line SQL
mysql
                                                 sqlplus system/manager@netname



                            http://dev.mysql.com/doc/refman/5.0/en/mysql.html 

Command line syntax
  mysql ­u[username] ­p[password] ­h[host] [dbname]
  mysql ­p [dbname]
  mysql ­­help
Navigation commands
  help or ?        clear   c
  quit  q           edit
  ;   g  G         tee [file]



                                                             Slide: 19
MySQL for Oracle Developers

       Immediate SQL Differences

DUAL                   Date Functions
SYSDATE                Sequences   
DECODE()               Data Types
ROWNUM                 Naming Standards
NVL
                         Case Sensitivity 
JOIN (+) Syntax
                         Reserved Words 




                                   Slide: 20
MySQL for Oracle Developers

              Case Sensitivity
DDL Structure Names as Case sensitive
 e.g.  CREATE TABLE FilmActor (...);
 Operating System Dependent

LIKE for Data is Case insensitive
 e.g.  SELECT title FROM film WHERE title LIKE 'A%'
 Returns rows starting with 'ALIEN' and 'alien'

BINARY  DDL syntax
 e.g.   title VARCHAR(100) NOT NULL BINARY,

                                           Slide: 21
MySQL for Oracle Developers

           DLL Structure Syntax


Escaped Reserved Words are allowed
 e.g.  CREATE TABLE `group` (...);
 e.g.  CREATE TABLE “insert” (...);     * sql_mode

Tables/Columns/Triggers/Stored Procedures
Space and other special characters allowed
 Operating System Dependent
 e.g.  CREATE TABLE `My Table Name` (...);

                                              Slide: 22
MySQL for Oracle Developers

        Sequences Replacement
AUTO_INCREMENT                    CREATE SEQUENCE seq;



e.g.  id INT NOT NULL AUTO_INCREMENT,

  Must be tied to a [table].[column]
  Only one per table
  No system wide capability
  LAST_INSERT_ID()                      seq.CURRVAL



  No get next capability                seq.NEXTVAL




                                           Slide: 23
MySQL for Oracle Developers

          Optional Table Name
                                       DUAL



SELECT 1+1
 No Table Required

Provided for Oracle Compatibility
 e.g. SELECT 1+1 FROM DUAL

 e.g. SELECT DUMMY FROM DUAL    *** Fails



                                       Slide: 24
MySQL for Oracle Developers

                  Transactions


MySQL provides ACID compliant transactions
XA transactions  (Distributed Transaction Processing)
                               http://dev.mysql.com/doc/refman/5.0/en/xa.html


Supports transactional and non­transactional databases

Satisfy both mission­critical 24/7 usage and heavy Web or 
logging usage 



                                                       Slide: 25
MySQL for Oracle Developers

                    Transactions


By default, SQL commands are auto­committed
Transaction support with appropiate Storage Engines
  START TRANSACTION / BEGIN [WORK]
  ROLLBACK [WORK] / COMMIT [WORK]
  SET AUTOCOMMIT = {0 | 1};
  SAVEPOINT / ROLLBACK [WORK] TO SAVEPOINT
  SET TRANSACTION  (Isolation Level)
       http://dev.mysql.com/doc/refman/5.0/en/transactional­commands.html 


                                                        Slide: 26
MySQL for Oracle Developers

          Storage Engines                                     INFO



MyISAM                           FEDERATED
MERGE                            NDB (Cluster)
InnoDB                           CSV
BDB                              BLACKHOLE
MEMORY                           Example
ARCHIVE
          http://dev.mysql.com/doc/refman/5.0/en/storage­engines.html


                                                  Slide: 27
MySQL for Oracle Developers

                              Storage Engines
                                                                                        INFO




                                                           High




MySQL 5.0's Pluggable Storage Engine Architecture
                              http://www.mysql.com/why­mysql/white­papers/mysql_wp_pluggable.php


                                                                            Slide: 28
MySQL for Oracle Developers

                   Locking


Storage Engine Dependent
 Table Level Locking (MyISAM, Memory)
 Page Level Locking (BDB)
 Row Level Locking (InnoDB, Archive, NDB)


LOW_PRIORITY, HIGH_PRIORITY 
 changes WRITE/READ Lock Handling


                                            Slide: 29
MySQL for Oracle Developers

                      Locking

                                            Most Commonly 
InnoDB                                     Used Transactional 
                                             Storage Engine
  row­level locking

  multi­versioning 

  non­locking repeatable reads

  all four SQL standard isolation levels




                                                  Slide: 30
MySQL for Oracle Developers

                     NULL


[column] IS NULL, [column] IS NOT NULL

IFNULL([value],'')               NVL(), COALESCE()




ISNULL([value])

COALESCE([value],[value],[value])




                                        Slide: 31
MySQL for Oracle Developers

              SELECT
SELECT/FROM/WHERE/GROUP BY/HAVING
LIMIT n[,m]                               ROWNUM




LIKE
                                           ROWID

REGEXP
              http://dev.mysql.com/doc/refman/5.0/en/select.html
                                       UNION, UNION ALL

UNION, UNION ALL                      INTERSECT, MINUS



              http://dev.mysql.com/doc/refman/5.0/en/union.html



                                              Slide: 32
MySQL for Oracle Developers

                                         JOIN
  INNER JOIN                                                       ON, NATURAL, USING
                                                                      PARTITION BY
  OUTER JOIN
  NO FULL OUTER JOIN
                                         http://dev.mysql.com/doc/refman/5.0/en/join.html
join_table:
  table_reference [INNER | CROSS] JOIN table_factor [join_condition]
  table_reference STRAIGHT_JOIN table_factor
  table_reference STRAIGHT_JOIN table_factor ON condition
  table_reference LEFT [OUTER] JOIN table_reference join_condition
  table_reference NATURAL [LEFT [OUTER]] JOIN table_factor
  table_reference RIGHT [OUTER] JOIN table_reference join_condition
  table_reference NATURAL [RIGHT [OUTER]] JOIN table_factor



                                                                           Slide: 33
MySQL for Oracle Developers

              Sub Queries


IN, NOT IN

ALL, ANY, SOME                        WITH




EXISTS, NOT EXISTS

Correlated subqueries

In FROM Clause

                                       Slide: 34
MySQL for Oracle Developers

                      Full Text Search
FULLTEXT Index                                                     ORACLE TEXT



 MyISAM Storage Engine Only
  e.g. FULLTEXT KEY indx_title_description(title,description)
    SELECT f.film_id, f.title, f.description FROM film_text f
    WHERE MATCH (title,description) AGAINST ('MySQL');
    SELECT f.film_id, f.title, f.description  FROM film_text f  
    WHERE MATCH (title,description)
    AGAINST ('+MySQL ­Monkey' IN BOOLEAN MODE);
    SELECT f.film_id, f.title, f.description  FROM film_text f  
    WHERE MATCH (title,description)
    AGAINST ('database' WITH QUERY EXPANSION);


                      http://dev.mysql.com/doc/refman/5.0/en/fulltext­search.html


                                                                      Slide: 35
MySQL for Oracle Developers

                 INSERT


INSERT INTO [table] SET [col]=[value], ...
Multiple Row Insert                       INSERT ALL ... WHEN



DEFAULT values
 DEFAULT  or  DEFAULT(col_name)

AUTO_INCREMENT ­  NULL,0 or col not stated 
                  http://dev.mysql.com/doc/refman/5.0/en/insert.html



                                                  Slide: 36
MySQL for Oracle Developers

                        UPDATE


ORDER BY/LIMIT
 e.g. UPDATE CacheTable SET expiry = NOW()                               
        ORDER BY oldest LIMIT 10

Multiple Table Update
 UPDATE items,month SET items.price=month.price           
 WHERE items.id=month.id;

                         http://dev.mysql.com/doc/refman/5.0/en/update.html


                                                         Slide: 37
MySQL for Oracle Developers

                      DELETE


ORDER BY/LIMIT
 e.g. DELETE FROM CacheTable ORDER BY oldest LIMIT 10;

Multiple Table Delete
 DELETE t1, t2 FROM t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;
 DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND 
 t2.id=t3.id;
                       http://dev.mysql.com/doc/refman/5.0/en/delete.html



                                                       Slide: 38
MySQL for Oracle Developers

                  REPLACE

                                          MERGE (very cumbersome)
Combined Insert/Update
REPLACE works exactly like INSERT, except that if 
an old record in the table has the same value as a 
new record on a unique index, the old record is 
deleted before the new record is inserted.

  Affects Trigger Operation
                  http://dev.mysql.com/doc/refman/5.0/en/replace.html


                                                    Slide: 39
MySQL for Oracle Developers

          DML Syntax Differences                                    INFO




LOW_PRIORITY 
 execution of the INSERT is delayed until no other clients are 

 reading from the table. 

 Not good on read­heavy environment

INSERT, UPDATE, DELETE, REPLACE
                                                                 Bad Idea
 INSERT LOW_PRIORITY INTO LogTable VALUES ();



                                                     Slide: 40
MySQL for Oracle Developers

          DML Syntax Differences                                INFO




HIGH_PRIORITY 
 gives the SELECT higher priority than a statement that updates
 Only for queries that are very fast and must be done at once

SELECT, INSERT
 SELECT HIGH_PRIORITY FROM CacheTable; 




                                                    Slide: 41
MySQL for Oracle Developers

          DML Syntax Differences                                               INFO




DELAYED 
 the server puts the row or rows to be inserted into a buffer, and the 
 client issuing the INSERT DELAYED  statement can then continue 
 immediately.


INSERT, REPLACE Statements                                           Good Idea
                                                                     Non Critical Data

 INSERT DELAYED INTO LogTable VALUES ();
                 http://dev.mysql.com/doc/refman/5.0/en/insert­delayed.html



                                                         Slide: 42
MySQL for Oracle Developers

          DML Syntax Differences                                      INFO




IGNORE
 errors that occur while executing the INSERT  statement are 
 treated as warnings instead

INSERT, UPDATE, DELETE Statements                                 Poor 
                                                               Programming

 INSERT IGNORE INTO LogTable VALUES ();                          Practice




                                                   Slide: 43
MySQL for Oracle Developers

                     Data Types


Numeric
 TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT
 FLOAT,DOUBLE,DECIMAL,BIT

Date
 DATE,TIME,DATETIME,TIMESTAMP,YEAR
                    http://dev.mysql.com/doc/refman/5.0/en/data­types.html

          http://dev.mysql.com/doc/refman/5.0/en/storage­requirements.html


                                                        Slide: 44
MySQL for Oracle Developers

                    Data Types


String
  CHAR,VARCHAR,BINARY,VARBINARY,
  TINYTEXT,MEDIUMTEXT,TEXT,LONGTEXT
  TINYBLOB,MEDIUMBLOB,BLOG,LONGBLOB
  ENUM,SET
                   http://dev.mysql.com/doc/refman/5.0/en/data­types.html

         http://dev.mysql.com/doc/refman/5.0/en/storage­requirements.html



                                                       Slide: 45
MySQL for Oracle Developers

                  Data Types


Spatial
  GEOMETRY, POINT, LINESTRING, POLYGON,
  GEOMETRYCOLLECTION, MULTILINESTRING,
  MULTIPOINT, MULTIPOLYGON




          http://dev.mysql.com/doc/refman/5.0/en/spatial­extensions.html




                                                      Slide: 46
MySQL for Oracle Developers

                Numeric Data Types


FLOAT, DOUBLE – floating point types
  e.g. lat FLOAT(10,6), lon FLOAT(10,6)   Floating Point  NUMBER
                                          Fixed Point      NUMBER(p,s)

DECIMAL – fixed point type
                                          Integer             NUMBER(p)



  e.g.  amt DECIMAL(10,2) NOT NULL,
INT ­ Integer

UNSIGNED, ZEROFILL
  e.g  cnt INT(6) UNSIGNED ZEROFILL,

                                                Slide: 47
MySQL for Oracle Developers

                         Date Data Types
                                                                     TIMESTAMP (faction precision)
                                                                       WITH [LOCAL] TIMEZONE


TIMESTAMP
 First TIMESTAMP column defaults to last update date/time
 Good for behind the scenes auditing
 Second only granularity

 CREATE TABLE ...  
   last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP 
                                                           ON UPDATE CURRENT_TIMESTAMP,
   created  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
   ...




                                                                                  Slide: 48
MySQL for Oracle Developers

           Constraint Data Types


ENUM
 size ENUM('S','M','L','XL','XXL')
                        http://dev.mysql.com/doc/refman/5.0/en/enum.html

SET
 color SET ('Red','Blue','Green','White','Black')
                          http://dev.mysql.com/doc/refman/5.0/en/set.html

              http://dev.mysql.com/doc/refman/5.0/en/constraint­enum.html


                                                       Slide: 49
MySQL for Oracle Developers

        Large Objects (LOB)
                                     CLOB, BLOB,NCLOB, BFILE



TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB

TINYTEXT, TEXT, MEDIUMTEXT,  LONGTEXT

 255 bytes, 64K, 16M, 4G


                http://dev.mysql.com/doc/refman/5.0/en/blob.html




                                              Slide: 50
MySQL for Oracle Developers

                String Functions
                                                       'A' || 'B'
                                                    CONCAT('A','B')

SELECT CONCAT('A','B');

SELECT CONCAT_WS(',','a','b','c',d');



SET sql_mode='PIPES_AS_CONCAT';
SELECT 'A'||'B';


               http://dev.mysql.com/doc/refman/5.0/en/string­functions.html



                                                         Slide: 51
MySQL for Oracle Developers

                 String Functions


Multiple Character Set Support
  SHOW CHARACTER SET;
  SELECT 'Test' = 'TEST';
  SELECT _latin1 'Test' = 'TEST';
  SELECT _latin1 'Test' = BINARY 'TEST';

Collation
  Defines String Comparisions
  Defines Sorting Order
                          http://dev.mysql.com/doc/refman/5.0/en/charset.html


                                                           Slide: 52
MySQL for Oracle Developers

                   Date Calendar                                         INFO




                                                       Julian Dates?
                                         http://www.orafaq.com/papers/dates_o.doc

Proleptic Gregorian calendar
October 4­15 1582 cutover
  Pre Julian
  Post Gregorian
The “Year­Zero” rule
The “Leap­Year Calculation” rule
               http://dev.mysql.com/doc/refman/5.0/en/mysql­calendar.html


                                                           Slide: 53
MySQL for Oracle Developers

                  Date Functions

SELECT CURDATE(), NOW(), SYSDATE()
 Second only granularity
        http://dev.mysql.com/doc/refman/5.0/en/date­and­time­functions.html

TimeZones  ­ UTC or named
 e.g. SET time_zone = '+10:00'; 
 'Europe/Helsinki', 'US/Eastern',  'MET',  'SYSTEM'
 Manual Installation step to seed data
             http://dev.mysql.com/doc/refman/5.0/en/time­zone­support.html


                                                         Slide: 54
MySQL for Oracle Developers

                Control Flow Functions
IF
                                                          DECODE()   CASE()
 SELECT IF(1>0,'yes','no');
     ­> 'yes'

CASE
 SELECT CASE WHEN 1>0 THEN 'yes' ELSE 'no' END;
 ­> 'true'
 SELECT CASE  'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2 END;
 ­> 2
 SELECT CASE BINARY 'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2 END;
 ­> NULL
                http://dev.mysql.com/doc/refman/5.0/en/control­flow­functions.html


                                                                Slide: 55
MySQL for Oracle Developers

                System Variables                               INFO




Server (e.g. /etc/my.cnf)
  sort_buffer_size=500000

GLOBAL 
  SET GLOBAL sort_buffer_size=750000;

SESSION 
  SET SESSION sort_buffer_size=1000000;
  SELECT @@global.sort_buffer_size, @@session.sort_buffer_size;


                                                   Slide: 56
MySQL for Oracle Developers

                  SHOW
SHOW TABLES;
SHOW WARNINGS;
SHOW STATUS;  FLUSH STATUS;
SHOW VARIABLES;
SHOW VARIABLES LIKE '%size%';
SHOW VARIABLES LIKE 'sort_buffer_size';
SHOW GLOBAL VARIABLES LIKE 'sort_buffer_size';


                                      Slide: 57
MySQL for Oracle Developers

                SQL Mode


Key Modes
 ANSI 
 STRICT_TRANS_TABLES 
 TRADITIONAL

SHOW VARIABLES LIKE 'sql_mode';

SET sql_mode='strict_all_tables';

                                      Slide: 58
MySQL for Oracle Developers

                      SQL Mode


Oracle Compatibility
 SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES, 
 IGNORE_SPACE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS, 
 NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER';



              http://dev.mysql.com/doc/refman/5.0/en/server­sql­mode.html

       http://dev.mysql.com/tech­resources/articles/mysql­data­integrity.html




                                                          Slide: 59
MySQL for Oracle Developers

    Procedural Language Support


Stored Procedures

Functions

UDF  ­ User Defined Functions

Triggers




                                    Slide: 60
MySQL for Oracle Developers

                         Procedures


No Package Capabilites

   http://bugs.mysql.com/bug.php?id=11696                       OS

NO RAISE Error Capability
No Named Parameters
No Overloading
                           http://dev.mysql.com/doc/refman/5.0/en/stored­procedures.html

General Purpose Stored Routines Library  http://www.nongnu.org/mysql­sr­lib/ 



                                                                   Slide: 61
MySQL for Oracle Developers

                                                       Procedures                                          INFO

DELIMITER //
CREATE PROCEDURE rewards_report (
    IN min_monthly_purchases TINYINT UNSIGNED
    , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED
    , OUT count_rewardees INT
)
LANGUAGE SQL
NOT DETERMINISTIC
READS SQL DATA
SQL SECURITY DEFINER
COMMENT 'Provides a customizable report on best customers'
proc: BEGIN

    DECLARE last_month_start DATE;
    DECLARE last_month_end DATE;

    /* Some sanity checks... */
    IF min_monthly_purchases = 0 THEN
        SELECT 'Minimum monthly purchases parameter must be > 0';
        LEAVE proc;
    END IF;
    SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH);
    CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY);
   ...
    SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees;
    DROP TABLE tmpCustomer;
END //




                                                                                               Slide: 62
MySQL for Oracle Developers

                                  Functions

Example – Wrap IFNULL with NVL for Oracle Compatibility

DELIMITER //
CREATE FUNCTION NVL(IN col VARCHAR(100), IN nullvalue VARCHAR(100)) 
                                            RETURNS VARCHAR(100)
BEGIN
  RETURN IFNULL(col,nullvalue);
END;
//
DELIMITER ;

SELECT NVL(col,'Unknown') FROM table




                                                                   Slide: 63
MySQL for Oracle Developers

                      Functions


SHOW CREATE FUNCTION 'NVL';

SHOW FUNCTION STATUS LIKE 'NVL';

SELECT routine_name, routine_schema, routine_type 
FROM INFORMATION_SHEMA.routines;




                                              Slide: 64
MySQL for Oracle Developers

      User Defined Functions (UDF)                                                    INFO




Added as Object Files
   $ gcc ­I /usr/include/mysql/ ­shared ­o syslogudf.so syslogudf.c
   $ cp syslogudf.so /usr/lib
   mysql> create function logger returns integer soname 'syslogudf.so';
   mysql> select logger('logging from ' + version());
   $ tail /var/log/messages




                     http://dev.mysql.com/doc/refman/5.0/en/adding­functions.html




                                                                          Slide: 65
MySQL for Oracle Developers

                      User Defined Functions (UDF)                                                        INFO

#include <mysql.h>
#include <string.h>
#include <syslog.h>

my_bool logger_init(UDF_INIT *initid, UDF_ARGS *args, char *message) {
        initid­>maybe_null=0;
        return 0;
}

long long logger(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) {
        if (args­>arg_count != 1) {
                strcpy(error, quot;LOGGER(): needs messagequot;);
                return 1;
        }
        if (args­>arg_type[0] != STRING_RESULT) {
                strcpy(error, quot;LOGGER() message should be stringquot;);
                return 1;
        }

        syslog(LOG_INFO,quot;%squot;,args­>args[0]);
        *is_null = 0;
        *error = 0;
        return 0;
                                                                                    http://dammit.lt/stream/mysql/
}




                                                                                            Slide: 66
MySQL for Oracle Developers

   User Defined Functions (UDF)                             INFO




MySQL Message API

 Utilises Spread Toolkit 
                                                   www.spread.org



                     http://forge.mysql.com/projects/view.php?id=2




                                                Slide: 67
MySQL for Oracle Developers

                     Triggers
[BEFORE|AFTER] [INSERT|UPDATE|DELETE]

Only one trigger per table per DML statement

Missing
  INSTEAD OF (used in Views)
  No OR DML (e.g. INSERT OR UPDATE)
  No OR REPLACE  (e.g. CREATE OR REPLACE
  No WHEN Condition
  Only for DML statements (e.g. No DROP)
                     http://dev.mysql.com/doc/refman/5.0/en/triggers.html


                                                       Slide: 68
MySQL for Oracle Developers

                                          Triggers                                    INFO


DELIMITER ;;
CREATE TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN
    INSERT INTO film_text (film_id, title, description)
        VALUES (new.film_id, new.title, new.description);
  END;;

CREATE TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN
    IF (old.title != new.title) or (old.description != new.description)
    THEN
        UPDATE film_text
            SET title=new.title,
                description=new.description,
                film_id=new.film_id
        WHERE film_id=old.film_id;
    END IF;
  END;;

CREATE TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN
    DELETE FROM film_text WHERE film_id = old.film_id;
END;;
DELIMITER ;




                                                                          Slide: 69
MySQL for Oracle Developers

    Query Performance Analysis                              INFO




EXPLAIN [EXTENDED] SELECT select_options
                                   EXPLAIN PLAN FOR [statement]
SELECT only                        PLAN_TABLE



[SELECT] PROCEDURE ANALYSE();


              http://dev.mysql.com/doc/refman/5.0/en/explain.html




                                                Slide: 70
MySQL for Oracle Developers

     Query Performance Analysis                                 INFO




The Slow Query Log
 long_query_time=5  (my.cnf)
 mysqld ­­log­slow­queries=[filename] 
   ­­log­queries­not­using­indexes 
   ­­log­slow­admin­statements
           http://dev.mysql.com/doc/refman/5.0/en/slow­query­log.html 


                                                    Slide: 71
MySQL for Oracle Developers

          MySQL Commands                                                INFO



mysql                                myisamchk
mysqld                               myisamlog
mysqladmin                           myisampack
mysqlmanager                         mysqlbinlog
mysqlcheck                           perror
mysqldump                            mysqlupgrade
mysqlimport                          mysqlslap               5.1


mysqlcheck     http://dev.mysql.com/doc/refman/5.0/en/client­utility­programs.html



                                                           Slide: 72
MySQL for Oracle Developers

           INFORMATION_SCHEMA

                                                          Oracle Data Dictionary
Smaller set of tables
  TABLES, COLUMNS, VIEWS, ROUTINES, 
  USER_PREVILEGES
                                                      Dynamic Performance Views (V$)




  PROCESSLIST                        5.1


                http://dev.mysql.com/doc/refman/5.0/en/information­schema.html

 http://www.xcdsql.org/MySQL/information_schema/5.1/MySQL_5_1_INFORMATION_SCHEMA.html



                                                                  Slide: 73
MySQL for Oracle Developers




               Slide: 74
MySQL for Oracle Developers

              INFORMATION_SCHEMA                                            INFO



Examples
 SELECT TABLE_SCHEMA, SUM((DATA_LENGTH + INDEX_LENGTH) / (1024 * 1024)) AS 
 SIZE_MB  FROM INFORMATION_SCHEMA.TABLES
 GROUP BY TABLE_SCHEMA ORDER BY SIZE_MB DESC

 SELECT ROUTINE_TYPE, ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES 
 WHERE ROUTINE_SCHEMA='dbname';

 SELECT TRIGGER_NAME,EVENT_MANIPULATION,EVENT_OBJECT_TABLE, 
 ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE 
 TRIGGER_SCHEMA='dbname';

 SELECT CONCAT('DROP TABLE ',table_name,';')
 INTO OUTFILE '/sql/drop_tables.sql'
 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test';



                                                                Slide: 75
MySQL for Oracle Developers

                  INFORMATION_SCHEMA                                                        INFO



Examples
 SELECT s.schema_name, CONCAT(IFNULL(ROUND((SUM(t.data_length)+           
 SUM(t.index_length))/1024/1024,2),0.00),'Mb') total_size,  
 CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))­
 SUM(t.data_free))/1024/1024,2),0.00),'Mb') data_used,
 CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),'Mb') data_free,
 IFNULL(ROUND((((SUM(t.data_length)+SUM(t.index_length))­   
 SUM(t.data_free))/((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used,       
 COUNT(table_name) total_tables
 FROM information_schema.schemata s
 LEFT JOIN information_schema.tables t ON s.schema_name = t.table_schema
 WHERE s.schema_name != 'information_schema'
 GROUP BY s.schema_name  ORDER BY pct_used DESCG




                                                                               Slide: 76
MySQL for Oracle Developers

         Helpful SQL Additions


LOAD DATA INFILE

SELECT INTO OUTFILE

DROP [object] IF EXISTS [name] 
   DROP TABLE IF EXISTS TableName;




                                        Slide: 77
MySQL for Oracle Developers

       MySQL 5.1 Major Features

                                                   5.1

Partitioning
Log Tables
Row Based Replication
Events
Federated Tables
Cluster Replication
                                       Slide: 78
MySQL for Oracle Developers

            End User Tools


MySQL Query Browser
MySQL Administrator
MySQL Workbench
3  Party Products
 rd




                                     Slide: 79
MySQL for Oracle Developers

           MySQL Query Browser

                                                SQL Developer / TOAD
Query Toolbar
  Easily Create, Edit, and Debug SQL Statements

Script Editor
Object Browser
Database Explorer
Table Editor
  Visually Create and Modify Tables
                              http://www.mysql.com/products/tools/query­browser/


                                                           Slide: 80
MySQL for Oracle Developers

         MySQL Administrator
User Administration                            OEM,  APEX


Single View Dynamic Health Monitoring
Quickly Optimize MySQL
Rapid Disaster Prevention and Recovery
Server Information At­a­Glance
View Replication Status
View Server Logs 
                      http://www.mysql.com/products/tools/administrator/



                                                  Slide: 81
MySQL for Oracle Developers

            MySQL Workbench
Reverse Engineer Database                      Oracle Designer



Database/Model synchronization
Concept/Logical/Physical Designs
DBDesigner4 import/export model
Extending
 Figure Stylesheets
 Scripts
 Plugins       http://forge.mysql.com/wiki/index.php/MySQL_Workbench


                                                   Slide: 82
MySQL for Oracle Developers

              rd
             3 Party Tools

PhpMyAdmin
                              http://www.phpmyadmin.net

Toad for MySQL
                       http://www.toadsoft.com/toadmysql/




                                       Slide: 83
MySQL for Oracle Developers

          Other MySQL Products                  INFO




MySQL Connectors
 ODBC, JDBC, ADO.NET, MPX

MySQL Migration Toolkit

MySQL Network – Commercial Support

Eventum


                                    Slide: 84
MySQL for Oracle Developers

                   What's Missing


Object Structure                 CREATE TYPE [obj] AS OBJECT



Table Snapshots

Materialized Views

Check Constraints

  CREATE VIEW ... WITH CHECK OPTION;

Flashback queries

Synonyms

                                              Slide: 85
MySQL for Oracle Developers

                 What's Missing

                                       COLUMN name FORMAT a40
                                       SET LINESIZE 100
SQL reports                            SPOOL [file]


No Memory Pinning capabilities

No wrapping capability (protect source)

No Java procedural language support




                                                  Slide: 86
MySQL for Oracle Developers

              What we covered?
SQL
SQL*Plus
PL/SQL
Tools Suite

Open Source Opportunity
Documentation References



                                     Slide: 87
MySQL for Oracle Developers




For access to this paper, more detailed notes    
       and other information, please visit.

           http://www.arabx.com.au




                                       Slide: 88
MySQL for Oracle Developers

                       References                                  INFO


http://www.mysql.com   ­  MySQL Web Site

http://dev.mysql.com   ­  MySQL Developer Zone

http://forums.mysql.com   ­  MySQL Forums

http://www.mysql.com/training/certification/   ­ MySQL Certification

http://www.planetmysql.org  ­  MySQL Blogs

www.mysqldevelopment.com ­ MySQL resources/tutorials




                                                       Slide: 89
MySQL for Oracle Developers

                             References                                      INFO


Storage Engines

   http://dev.mysql.com/tech­resources/articles/mysql_5.0_psea1.html

   http://dev.mysql.com/tech­resources/articles/mysql_5.0_psea2.html

   http://dev.mysql.com/tech­resources/articles/creating­new­storage­engine.html

   http://www.mysql.com/why­mysql/white­papers/mysql_wp_pluggable.php

Stored Procedures

   http://www.nongnu.org/mysql­sr­lib/ ­ General Purpose Stored Routines Library

   http://dev.mysql.com/tech­resources/articles/mysql­storedprocedures.html



                                                                 Slide: 90
MySQL for Oracle Developers

                        References                      INFO




Recommended Reading
 MySQL by Paul DuBois




                                            Slide: 91

More Related Content

What's hot

VietOpenStack meetup 7th Auto-scaling
VietOpenStack meetup 7th  Auto-scalingVietOpenStack meetup 7th  Auto-scaling
VietOpenStack meetup 7th Auto-scaling
Vietnam Open Infrastructure User Group
 
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud ServiceOracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
Jean-Philippe PINTE
 
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB World 2019: MongoDB Atlas Security 101 for DevelopersMongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
Yogiji Creations
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
Ajeet Singh
 
How to Build a Scylla Database Cluster that Fits Your Needs
How to Build a Scylla Database Cluster that Fits Your NeedsHow to Build a Scylla Database Cluster that Fits Your Needs
How to Build a Scylla Database Cluster that Fits Your Needs
ScyllaDB
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
Mydbops
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )
Mydbops
 
153 Oracle dba interview questions
153 Oracle dba interview questions153 Oracle dba interview questions
153 Oracle dba interview questions
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
Databricks
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview Questions
Naveen P
 
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
Innodb에서의 Purge 메커니즘 deep internal (by  이근오)Innodb에서의 Purge 메커니즘 deep internal (by  이근오)
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
I Goo Lee.
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptx
Vinicius M Grippa
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
René Cannaò
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
Christian Antognini
 
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
confluent
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
Norberto Leite
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
VishalJharwade
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 
Architect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh ArchitectureArchitect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh Architecture
Databricks
 

What's hot (20)

VietOpenStack meetup 7th Auto-scaling
VietOpenStack meetup 7th  Auto-scalingVietOpenStack meetup 7th  Auto-scaling
VietOpenStack meetup 7th Auto-scaling
 
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud ServiceOracle Cloud Storage Service & Oracle Database Backup Cloud Service
Oracle Cloud Storage Service & Oracle Database Backup Cloud Service
 
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB World 2019: MongoDB Atlas Security 101 for DevelopersMongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
How to Build a Scylla Database Cluster that Fits Your Needs
How to Build a Scylla Database Cluster that Fits Your NeedsHow to Build a Scylla Database Cluster that Fits Your Needs
How to Build a Scylla Database Cluster that Fits Your Needs
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )
 
153 Oracle dba interview questions
153 Oracle dba interview questions153 Oracle dba interview questions
153 Oracle dba interview questions
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview Questions
 
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
Innodb에서의 Purge 메커니즘 deep internal (by  이근오)Innodb에서의 Purge 메커니즘 deep internal (by  이근오)
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptx
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
 
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
 
Architect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh ArchitectureArchitect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh Architecture
 

Viewers also liked

MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
webhostingguy
 
Advanced SQL Injection
Advanced SQL InjectionAdvanced SQL Injection
Advanced SQL Injection
amiable_indian
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
webhostingguy
 
MySQL
MySQLMySQL
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
Giuseppe Maxia
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
Tuyen Vuong
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
Tushar Chauhan
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
Guru Ji
 
Mysql Datadictionary
Mysql DatadictionaryMysql Datadictionary
Mysql Datadictionary
rootuser
 

Viewers also liked (9)

MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Advanced SQL Injection
Advanced SQL InjectionAdvanced SQL Injection
Advanced SQL Injection
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
MySQL
MySQLMySQL
MySQL
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
Mysql Datadictionary
Mysql DatadictionaryMysql Datadictionary
Mysql Datadictionary
 

Similar to MySQL For Oracle Developers

MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
Ronald Bradford
 
Simple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQLSimple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQL
Okcan Yasin Saygılı
 
My sql crashcourse_2012
My sql crashcourse_2012My sql crashcourse_2012
My sql crashcourse_2012
sqlhjalp
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp
 
My sql susecon_crashcourse_2012
My sql susecon_crashcourse_2012My sql susecon_crashcourse_2012
My sql susecon_crashcourse_2012
sqlhjalp
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
Kathy Forte (Hassard)
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
Frederic Descamps
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
Mario Beck
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Manuel Contreras
 
MySQL Latest News
MySQL Latest NewsMySQL Latest News
MySQL Latest News
Mark Swarbrick
 
2012 replication
2012 replication2012 replication
2012 replication
sqlhjalp
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
Frederic Descamps
 
Michael_Dickens
Michael_DickensMichael_Dickens
Michael_Dickens
michael dickens
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
Mario Beck
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com Java
MySQL Brasil
 
2012 ohiolinuxfest replication
2012 ohiolinuxfest replication2012 ohiolinuxfest replication
2012 ohiolinuxfest replication
sqlhjalp
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
Mark Swarbrick
 

Similar to MySQL For Oracle Developers (20)

MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
 
Simple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQLSimple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQL
 
My sql crashcourse_2012
My sql crashcourse_2012My sql crashcourse_2012
My sql crashcourse_2012
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
My sql susecon_crashcourse_2012
My sql susecon_crashcourse_2012My sql susecon_crashcourse_2012
My sql susecon_crashcourse_2012
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
 
MySQL Latest News
MySQL Latest NewsMySQL Latest News
MySQL Latest News
 
2012 replication
2012 replication2012 replication
2012 replication
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
Michael_Dickens
Michael_DickensMichael_Dickens
Michael_Dickens
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com Java
 
2012 ohiolinuxfest replication
2012 ohiolinuxfest replication2012 ohiolinuxfest replication
2012 ohiolinuxfest replication
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 

More from Ronald Bradford

Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1
Ronald Bradford
 
MySQL Backup and Recovery Essentials
MySQL Backup and Recovery EssentialsMySQL Backup and Recovery Essentials
MySQL Backup and Recovery Essentials
Ronald Bradford
 
The History and Future of the MySQL ecosystem
The History and Future of the MySQL ecosystemThe History and Future of the MySQL ecosystem
The History and Future of the MySQL ecosystem
Ronald Bradford
 
Lessons Learned Managing Large AWS Environments
Lessons Learned Managing Large AWS EnvironmentsLessons Learned Managing Large AWS Environments
Lessons Learned Managing Large AWS Environments
Ronald Bradford
 
Monitoring your technology stack with New Relic
Monitoring your technology stack with New RelicMonitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
Ronald Bradford
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
Ronald Bradford
 
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTNMySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
Ronald Bradford
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
Ronald Bradford
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
Ronald Bradford
 
MySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SFMySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SF
Ronald Bradford
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
Ronald Bradford
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07
Ronald Bradford
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQL
Ronald Bradford
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That Bite
Ronald Bradford
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance Improvements
Ronald Bradford
 
LIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBALIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBA
Ronald Bradford
 
IGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBAIGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBA
Ronald Bradford
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study
Ronald Bradford
 
Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010
Ronald Bradford
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and Ecosystem
Ronald Bradford
 

More from Ronald Bradford (20)

Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1
 
MySQL Backup and Recovery Essentials
MySQL Backup and Recovery EssentialsMySQL Backup and Recovery Essentials
MySQL Backup and Recovery Essentials
 
The History and Future of the MySQL ecosystem
The History and Future of the MySQL ecosystemThe History and Future of the MySQL ecosystem
The History and Future of the MySQL ecosystem
 
Lessons Learned Managing Large AWS Environments
Lessons Learned Managing Large AWS EnvironmentsLessons Learned Managing Large AWS Environments
Lessons Learned Managing Large AWS Environments
 
Monitoring your technology stack with New Relic
Monitoring your technology stack with New RelicMonitoring your technology stack with New Relic
Monitoring your technology stack with New Relic
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
 
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTNMySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
 
MySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SFMySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SF
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQL
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That Bite
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance Improvements
 
LIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBALIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBA
 
IGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBAIGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBA
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study
 
Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and Ecosystem
 

Recently uploaded

Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
Excellence Foundation for South Sudan
 
Our Guide to the July 2024 USPS® Rate Change
Our Guide to the July 2024 USPS® Rate ChangeOur Guide to the July 2024 USPS® Rate Change
Our Guide to the July 2024 USPS® Rate Change
Postal Advocate Inc.
 
Allopathic M1 Srudent Orientation Powerpoint
Allopathic M1 Srudent Orientation PowerpointAllopathic M1 Srudent Orientation Powerpoint
Allopathic M1 Srudent Orientation Powerpoint
Julie Sarpy
 
The Cruelty of Animal Testing in the Industry.pdf
The Cruelty of Animal Testing in the Industry.pdfThe Cruelty of Animal Testing in the Industry.pdf
The Cruelty of Animal Testing in the Industry.pdf
luzmilaglez334
 
New Features in Odoo 17 Sign - Odoo 17 Slides
New Features in Odoo 17 Sign - Odoo 17 SlidesNew Features in Odoo 17 Sign - Odoo 17 Slides
New Features in Odoo 17 Sign - Odoo 17 Slides
Celine George
 
DepEd School Calendar 2024-2025 DO_s2024_008
DepEd School Calendar 2024-2025 DO_s2024_008DepEd School Calendar 2024-2025 DO_s2024_008
DepEd School Calendar 2024-2025 DO_s2024_008
Glenn Rivera
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour International
 
C Interview Questions PDF By Scholarhat.pdf
C Interview Questions PDF By Scholarhat.pdfC Interview Questions PDF By Scholarhat.pdf
C Interview Questions PDF By Scholarhat.pdf
Scholarhat
 
View Inheritance in Odoo 17 - Odoo 17 Slides
View Inheritance in Odoo 17 - Odoo 17  SlidesView Inheritance in Odoo 17 - Odoo 17  Slides
View Inheritance in Odoo 17 - Odoo 17 Slides
Celine George
 
2 Post harvest Physiology of Horticulture produce.pptx
2 Post harvest Physiology of Horticulture  produce.pptx2 Post harvest Physiology of Horticulture  produce.pptx
2 Post harvest Physiology of Horticulture produce.pptx
UmeshTimilsina1
 
C# Interview Questions PDF By ScholarHat.pdf
C# Interview Questions PDF By ScholarHat.pdfC# Interview Questions PDF By ScholarHat.pdf
C# Interview Questions PDF By ScholarHat.pdf
Scholarhat
 
MathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptxMathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptx
nolicaliso1
 
What is Rescue Session in Odoo 17 POS - Odoo 17 Slides
What is Rescue Session in Odoo 17 POS - Odoo 17 SlidesWhat is Rescue Session in Odoo 17 POS - Odoo 17 Slides
What is Rescue Session in Odoo 17 POS - Odoo 17 Slides
Celine George
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
nservice241
 
How to Empty a One2Many Field in Odoo 17
How to Empty a One2Many Field in Odoo 17How to Empty a One2Many Field in Odoo 17
How to Empty a One2Many Field in Odoo 17
Celine George
 
MATATAG CURRICULUM sample lesson exemplar.docx
MATATAG CURRICULUM sample lesson exemplar.docxMATATAG CURRICULUM sample lesson exemplar.docx
MATATAG CURRICULUM sample lesson exemplar.docx
yardenmendoza
 
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptxSD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
elwoodprias1
 
JavaScript Interview Questions PDF By ScholarHat
JavaScript Interview  Questions PDF By ScholarHatJavaScript Interview  Questions PDF By ScholarHat
JavaScript Interview Questions PDF By ScholarHat
Scholarhat
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa
 

Recently uploaded (20)

Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
 
Our Guide to the July 2024 USPS® Rate Change
Our Guide to the July 2024 USPS® Rate ChangeOur Guide to the July 2024 USPS® Rate Change
Our Guide to the July 2024 USPS® Rate Change
 
Allopathic M1 Srudent Orientation Powerpoint
Allopathic M1 Srudent Orientation PowerpointAllopathic M1 Srudent Orientation Powerpoint
Allopathic M1 Srudent Orientation Powerpoint
 
The Cruelty of Animal Testing in the Industry.pdf
The Cruelty of Animal Testing in the Industry.pdfThe Cruelty of Animal Testing in the Industry.pdf
The Cruelty of Animal Testing in the Industry.pdf
 
New Features in Odoo 17 Sign - Odoo 17 Slides
New Features in Odoo 17 Sign - Odoo 17 SlidesNew Features in Odoo 17 Sign - Odoo 17 Slides
New Features in Odoo 17 Sign - Odoo 17 Slides
 
DepEd School Calendar 2024-2025 DO_s2024_008
DepEd School Calendar 2024-2025 DO_s2024_008DepEd School Calendar 2024-2025 DO_s2024_008
DepEd School Calendar 2024-2025 DO_s2024_008
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
 
C Interview Questions PDF By Scholarhat.pdf
C Interview Questions PDF By Scholarhat.pdfC Interview Questions PDF By Scholarhat.pdf
C Interview Questions PDF By Scholarhat.pdf
 
View Inheritance in Odoo 17 - Odoo 17 Slides
View Inheritance in Odoo 17 - Odoo 17  SlidesView Inheritance in Odoo 17 - Odoo 17  Slides
View Inheritance in Odoo 17 - Odoo 17 Slides
 
2 Post harvest Physiology of Horticulture produce.pptx
2 Post harvest Physiology of Horticulture  produce.pptx2 Post harvest Physiology of Horticulture  produce.pptx
2 Post harvest Physiology of Horticulture produce.pptx
 
C# Interview Questions PDF By ScholarHat.pdf
C# Interview Questions PDF By ScholarHat.pdfC# Interview Questions PDF By ScholarHat.pdf
C# Interview Questions PDF By ScholarHat.pdf
 
MathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptxMathematicsGrade7-Presentation-July-12024.pptx
MathematicsGrade7-Presentation-July-12024.pptx
 
What is Rescue Session in Odoo 17 POS - Odoo 17 Slides
What is Rescue Session in Odoo 17 POS - Odoo 17 SlidesWhat is Rescue Session in Odoo 17 POS - Odoo 17 Slides
What is Rescue Session in Odoo 17 POS - Odoo 17 Slides
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
 
How to Empty a One2Many Field in Odoo 17
How to Empty a One2Many Field in Odoo 17How to Empty a One2Many Field in Odoo 17
How to Empty a One2Many Field in Odoo 17
 
MATATAG CURRICULUM sample lesson exemplar.docx
MATATAG CURRICULUM sample lesson exemplar.docxMATATAG CURRICULUM sample lesson exemplar.docx
MATATAG CURRICULUM sample lesson exemplar.docx
 
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
 
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptxSD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
SD_Integrating 21st Century Skills in Classroom-based Assessment.pptx
 
JavaScript Interview Questions PDF By ScholarHat
JavaScript Interview  Questions PDF By ScholarHatJavaScript Interview  Questions PDF By ScholarHat
JavaScript Interview Questions PDF By ScholarHat
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
 

MySQL For Oracle Developers

  • 1. MySQL for Oracle Developers Ronald Bradford www.arabx.com.au Version 1.2 20 April 2006
  • 2. MySQL for Oracle Developers MySQL Introduction Solid peneration in open source community LAMP Stack Large number of open source projects Included by default in most Linux distros Slide: 2
  • 3. MySQL for Oracle Developers Purpose of Presentation Maximise existing Oracle skill set Preparation for management requests Open Source introduction Terminology/Product Knowledge Transfer Slide: 3
  • 4. MySQL for Oracle Developers My Background INFO 16 years in Database Design Experience (1989) 10 years Oracle Experience (1996) 7 years MySQL Experience (1999) Active in MySQL, Java, XP, Oracle User Groups  Slide: 4
  • 5. MySQL for Oracle Developers Presentation Conventions Associated Talk for DBA's MySQL for Oracle DBA's Oracle Specific Syntax Oracle Command/Syntax ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server MYSQL_HOME=/usr/lib/mysql (*)       MYSQL_DATA=/var/lib/mysql (*) (*) For RPM install. Will differ depending on Distro, or .tar.gz install Slide: 5
  • 6. MySQL for Oracle Developers Product Comparision Current Versions at March 2006 (used in examples) MySQL 5.0 GA  (5.0.20)  Standard/Max http://www.mysql.com/products/database/ Oracle 10g Release 2 Express Edition (10.2.0.1) http://www.oracle.com/technology/products/database/xe Slide: 6
  • 7. MySQL for Oracle Developers Product Comparision INFO Other Production Versions Oracle 10g Release 2 (PE, SE1, SE, EE) Oracle 9i, 8i, 7.3 MySQL 4.1, 4.0, 3.23 MySQL MaxDB 7.6 Slide: 7
  • 8. MySQL for Oracle Developers Product Comparision Development Versions MySQL 5.1  (currently beta 5.1.7) 5.1 MySQL 5.2 Open Source Availability OS Slide: 8
  • 9. MySQL for Oracle Developers Oracle Developer Environments INFO Oracle JDeveloper Java Application J2EE Application Development Framework (ADF) Application Express (HTMLDB) Oracle Forms 4.5, 6i, 9i,10g  PHP (Zend Core) Slide: 9
  • 10. MySQL for Oracle Developers Forrester Research December 29, 2004 Open Source Databases  Come Of Age Slide: 10
  • 11. MySQL for Oracle Developers Technical Resources MYSQL ORACLE otn.oracle.com dev.mysql.com    forge.mysql.com forums.oracle.com forums.mysql.com www.oracle.com/support www.mysql.com/network education.oracle.com www.mysql.com/training www.oracle.com/education/certification/ www.mysql.com/certification blogs.oracle.com www.planetmysql.org www.oracle.com/technology/community/user_groups dev.mysql.com/user­groups www.mysql.com/doc www.oracle.com/technology/documentation www.orafaq.com dev.mysql.com/tech­resources/faq.html Slide: 11
  • 12. MySQL for Oracle Developers MySQL 5.0 For Developers (5 days) INFO http://www.mysql.com/training/workshops/mysql_dev.html Objectives Describe the MySQL client/server architecture Understand the steps necessary to invoke MySQL client programs Utilize the general­purpose mysql client program to run queries and retrieve results Perform queries and analysis of data utilizing the MySQL Query Browser graphical user interface Explain the MySQL connectors that provide connectivity for client programs Select the best data type for representing information in MySQL Manage the structural characteristics of your databases Manage the structural characteristics of the tables within your databases Utilize the SELECT statement to retrieve information from database tables Slide: 12
  • 13. MySQL for Oracle Developers MySQL 5.0 For Developers INFO Utilize expressions in SQL statements to retrieve more detailed information Utilize SQL statements to modify the contents of database tables Write join expressions in your SQL statements to obtain information from multiple tables Utilize subqueries in your SQL statements Create views utilizing SELECT statements to produce quot;virtual tablesquot; of specific data Perform bulk data import and export operations Create user defined variables, prepared statements and stored routines Create and manage triggers Use the INFORMATION_SCHEMA database to access metadata Debug MySQL applications Configure and Optimize MySQL Slide: 13
  • 14. MySQL for Oracle Developers MySQL Installation INFO MySQL for Oracle DBA's Two Initial Databases mysql test http://dev.mysql.com/doc/refman/5.0/en/installing.html Access Privileges root http://dev.mysql.com/doc/refman/5.0/en/privilege_system.html Slide: 14
  • 15. MySQL for Oracle Developers Configuration/Log Files INFO MySQL for Oracle DBA's my.cnf $ORACLE_HOME/dbs/init.ora $MYSQL_HOME/my.cnf,  /etc/my.cnf Database Log .../admin/XE/bdump/alert_XE.log $MYSQL_DATA/`hostname`.err  N/A $ORACLE_HOME/network/admin/tnsnames.ora User Security (host) Slide: 15
  • 16. MySQL for Oracle Developers Terminology INFO MYSQL ORACLE Database (files) Database Server Instance Database Instance (memory) Database Server Instance Schema User Database User User Table Space Table Space Storage Engine Slide: 16
  • 17. MySQL for Oracle Developers MySQL Sample Database scott/tiger Sakila Sample Database Announced at this Conference Showcases Current MySQL features http://forums.mysql.com/list.php?121 Slide: 17
  • 18. MySQL for Oracle Developers MySQL Sample Database INFO Slide: 18
  • 19. MySQL for Oracle Developers Command Line SQL mysql sqlplus system/manager@netname http://dev.mysql.com/doc/refman/5.0/en/mysql.html  Command line syntax mysql ­u[username] ­p[password] ­h[host] [dbname] mysql ­p [dbname] mysql ­­help Navigation commands help or ?        clear   c quit  q           edit ;   g  G         tee [file] Slide: 19
  • 20. MySQL for Oracle Developers Immediate SQL Differences DUAL Date Functions SYSDATE Sequences    DECODE() Data Types ROWNUM Naming Standards NVL Case Sensitivity  JOIN (+) Syntax Reserved Words  Slide: 20
  • 21. MySQL for Oracle Developers Case Sensitivity DDL Structure Names as Case sensitive e.g.  CREATE TABLE FilmActor (...); Operating System Dependent LIKE for Data is Case insensitive e.g.  SELECT title FROM film WHERE title LIKE 'A%' Returns rows starting with 'ALIEN' and 'alien' BINARY  DDL syntax e.g.   title VARCHAR(100) NOT NULL BINARY, Slide: 21
  • 22. MySQL for Oracle Developers DLL Structure Syntax Escaped Reserved Words are allowed e.g.  CREATE TABLE `group` (...); e.g.  CREATE TABLE “insert” (...);     * sql_mode Tables/Columns/Triggers/Stored Procedures Space and other special characters allowed Operating System Dependent e.g.  CREATE TABLE `My Table Name` (...); Slide: 22
  • 23. MySQL for Oracle Developers Sequences Replacement AUTO_INCREMENT CREATE SEQUENCE seq; e.g.  id INT NOT NULL AUTO_INCREMENT, Must be tied to a [table].[column] Only one per table No system wide capability LAST_INSERT_ID() seq.CURRVAL No get next capability seq.NEXTVAL Slide: 23
  • 24. MySQL for Oracle Developers Optional Table Name DUAL SELECT 1+1 No Table Required Provided for Oracle Compatibility e.g. SELECT 1+1 FROM DUAL e.g. SELECT DUMMY FROM DUAL    *** Fails Slide: 24
  • 25. MySQL for Oracle Developers Transactions MySQL provides ACID compliant transactions XA transactions  (Distributed Transaction Processing) http://dev.mysql.com/doc/refman/5.0/en/xa.html Supports transactional and non­transactional databases Satisfy both mission­critical 24/7 usage and heavy Web or  logging usage  Slide: 25
  • 26. MySQL for Oracle Developers Transactions By default, SQL commands are auto­committed Transaction support with appropiate Storage Engines START TRANSACTION / BEGIN [WORK] ROLLBACK [WORK] / COMMIT [WORK] SET AUTOCOMMIT = {0 | 1}; SAVEPOINT / ROLLBACK [WORK] TO SAVEPOINT SET TRANSACTION  (Isolation Level) http://dev.mysql.com/doc/refman/5.0/en/transactional­commands.html  Slide: 26
  • 27. MySQL for Oracle Developers Storage Engines INFO MyISAM FEDERATED MERGE NDB (Cluster) InnoDB CSV BDB BLACKHOLE MEMORY Example ARCHIVE http://dev.mysql.com/doc/refman/5.0/en/storage­engines.html Slide: 27
  • 28. MySQL for Oracle Developers Storage Engines INFO High MySQL 5.0's Pluggable Storage Engine Architecture http://www.mysql.com/why­mysql/white­papers/mysql_wp_pluggable.php Slide: 28
  • 29. MySQL for Oracle Developers Locking Storage Engine Dependent Table Level Locking (MyISAM, Memory) Page Level Locking (BDB) Row Level Locking (InnoDB, Archive, NDB) LOW_PRIORITY, HIGH_PRIORITY  changes WRITE/READ Lock Handling Slide: 29
  • 30. MySQL for Oracle Developers Locking Most Commonly  InnoDB   Used Transactional  Storage Engine row­level locking multi­versioning  non­locking repeatable reads all four SQL standard isolation levels Slide: 30
  • 31. MySQL for Oracle Developers NULL [column] IS NULL, [column] IS NOT NULL IFNULL([value],'') NVL(), COALESCE() ISNULL([value]) COALESCE([value],[value],[value]) Slide: 31
  • 32. MySQL for Oracle Developers SELECT SELECT/FROM/WHERE/GROUP BY/HAVING LIMIT n[,m] ROWNUM LIKE ROWID REGEXP http://dev.mysql.com/doc/refman/5.0/en/select.html UNION, UNION ALL UNION, UNION ALL INTERSECT, MINUS http://dev.mysql.com/doc/refman/5.0/en/union.html Slide: 32
  • 33. MySQL for Oracle Developers JOIN INNER JOIN ON, NATURAL, USING PARTITION BY OUTER JOIN NO FULL OUTER JOIN http://dev.mysql.com/doc/refman/5.0/en/join.html join_table:   table_reference [INNER | CROSS] JOIN table_factor [join_condition]   table_reference STRAIGHT_JOIN table_factor   table_reference STRAIGHT_JOIN table_factor ON condition   table_reference LEFT [OUTER] JOIN table_reference join_condition   table_reference NATURAL [LEFT [OUTER]] JOIN table_factor   table_reference RIGHT [OUTER] JOIN table_reference join_condition   table_reference NATURAL [RIGHT [OUTER]] JOIN table_factor Slide: 33
  • 34. MySQL for Oracle Developers Sub Queries IN, NOT IN ALL, ANY, SOME WITH EXISTS, NOT EXISTS Correlated subqueries In FROM Clause Slide: 34
  • 35. MySQL for Oracle Developers Full Text Search FULLTEXT Index  ORACLE TEXT MyISAM Storage Engine Only  e.g. FULLTEXT KEY indx_title_description(title,description) SELECT f.film_id, f.title, f.description FROM film_text f WHERE MATCH (title,description) AGAINST ('MySQL'); SELECT f.film_id, f.title, f.description  FROM film_text f   WHERE MATCH (title,description) AGAINST ('+MySQL ­Monkey' IN BOOLEAN MODE); SELECT f.film_id, f.title, f.description  FROM film_text f   WHERE MATCH (title,description) AGAINST ('database' WITH QUERY EXPANSION); http://dev.mysql.com/doc/refman/5.0/en/fulltext­search.html Slide: 35
  • 36. MySQL for Oracle Developers INSERT INSERT INTO [table] SET [col]=[value], ... Multiple Row Insert INSERT ALL ... WHEN DEFAULT values DEFAULT  or  DEFAULT(col_name) AUTO_INCREMENT ­  NULL,0 or col not stated  http://dev.mysql.com/doc/refman/5.0/en/insert.html Slide: 36
  • 37. MySQL for Oracle Developers UPDATE ORDER BY/LIMIT e.g. UPDATE CacheTable SET expiry = NOW()                                       ORDER BY oldest LIMIT 10 Multiple Table Update UPDATE items,month SET items.price=month.price            WHERE items.id=month.id; http://dev.mysql.com/doc/refman/5.0/en/update.html Slide: 37
  • 38. MySQL for Oracle Developers DELETE ORDER BY/LIMIT e.g. DELETE FROM CacheTable ORDER BY oldest LIMIT 10; Multiple Table Delete DELETE t1, t2 FROM t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id; DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND  t2.id=t3.id; http://dev.mysql.com/doc/refman/5.0/en/delete.html Slide: 38
  • 39. MySQL for Oracle Developers REPLACE MERGE (very cumbersome) Combined Insert/Update REPLACE works exactly like INSERT, except that if  an old record in the table has the same value as a  new record on a unique index, the old record is  deleted before the new record is inserted. Affects Trigger Operation http://dev.mysql.com/doc/refman/5.0/en/replace.html Slide: 39
  • 40. MySQL for Oracle Developers DML Syntax Differences INFO LOW_PRIORITY  execution of the INSERT is delayed until no other clients are  reading from the table.  Not good on read­heavy environment INSERT, UPDATE, DELETE, REPLACE Bad Idea INSERT LOW_PRIORITY INTO LogTable VALUES (); Slide: 40
  • 41. MySQL for Oracle Developers DML Syntax Differences INFO HIGH_PRIORITY  gives the SELECT higher priority than a statement that updates Only for queries that are very fast and must be done at once SELECT, INSERT SELECT HIGH_PRIORITY FROM CacheTable;  Slide: 41
  • 42. MySQL for Oracle Developers DML Syntax Differences INFO DELAYED  the server puts the row or rows to be inserted into a buffer, and the  client issuing the INSERT DELAYED  statement can then continue  immediately. INSERT, REPLACE Statements Good Idea Non Critical Data INSERT DELAYED INTO LogTable VALUES (); http://dev.mysql.com/doc/refman/5.0/en/insert­delayed.html Slide: 42
  • 43. MySQL for Oracle Developers DML Syntax Differences INFO IGNORE errors that occur while executing the INSERT  statement are  treated as warnings instead INSERT, UPDATE, DELETE Statements Poor  Programming INSERT IGNORE INTO LogTable VALUES (); Practice Slide: 43
  • 44. MySQL for Oracle Developers Data Types Numeric TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT FLOAT,DOUBLE,DECIMAL,BIT Date DATE,TIME,DATETIME,TIMESTAMP,YEAR http://dev.mysql.com/doc/refman/5.0/en/data­types.html http://dev.mysql.com/doc/refman/5.0/en/storage­requirements.html Slide: 44
  • 45. MySQL for Oracle Developers Data Types String CHAR,VARCHAR,BINARY,VARBINARY, TINYTEXT,MEDIUMTEXT,TEXT,LONGTEXT TINYBLOB,MEDIUMBLOB,BLOG,LONGBLOB ENUM,SET http://dev.mysql.com/doc/refman/5.0/en/data­types.html http://dev.mysql.com/doc/refman/5.0/en/storage­requirements.html Slide: 45
  • 46. MySQL for Oracle Developers Data Types Spatial GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON http://dev.mysql.com/doc/refman/5.0/en/spatial­extensions.html Slide: 46
  • 47. MySQL for Oracle Developers Numeric Data Types FLOAT, DOUBLE – floating point types e.g. lat FLOAT(10,6), lon FLOAT(10,6) Floating Point  NUMBER Fixed Point      NUMBER(p,s) DECIMAL – fixed point type Integer             NUMBER(p) e.g.  amt DECIMAL(10,2) NOT NULL, INT ­ Integer UNSIGNED, ZEROFILL e.g  cnt INT(6) UNSIGNED ZEROFILL, Slide: 47
  • 48. MySQL for Oracle Developers Date Data Types TIMESTAMP (faction precision) WITH [LOCAL] TIMEZONE TIMESTAMP First TIMESTAMP column defaults to last update date/time Good for behind the scenes auditing Second only granularity CREATE TABLE ...     last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP                                                            ON UPDATE CURRENT_TIMESTAMP,   created  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,   ... Slide: 48
  • 49. MySQL for Oracle Developers Constraint Data Types ENUM size ENUM('S','M','L','XL','XXL') http://dev.mysql.com/doc/refman/5.0/en/enum.html SET color SET ('Red','Blue','Green','White','Black') http://dev.mysql.com/doc/refman/5.0/en/set.html http://dev.mysql.com/doc/refman/5.0/en/constraint­enum.html Slide: 49
  • 50. MySQL for Oracle Developers Large Objects (LOB) CLOB, BLOB,NCLOB, BFILE TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB TINYTEXT, TEXT, MEDIUMTEXT,  LONGTEXT 255 bytes, 64K, 16M, 4G http://dev.mysql.com/doc/refman/5.0/en/blob.html Slide: 50
  • 51. MySQL for Oracle Developers String Functions 'A' || 'B' CONCAT('A','B') SELECT CONCAT('A','B'); SELECT CONCAT_WS(',','a','b','c',d'); SET sql_mode='PIPES_AS_CONCAT'; SELECT 'A'||'B'; http://dev.mysql.com/doc/refman/5.0/en/string­functions.html Slide: 51
  • 52. MySQL for Oracle Developers String Functions Multiple Character Set Support SHOW CHARACTER SET; SELECT 'Test' = 'TEST'; SELECT _latin1 'Test' = 'TEST'; SELECT _latin1 'Test' = BINARY 'TEST'; Collation Defines String Comparisions Defines Sorting Order http://dev.mysql.com/doc/refman/5.0/en/charset.html Slide: 52
  • 53. MySQL for Oracle Developers Date Calendar INFO Julian Dates? http://www.orafaq.com/papers/dates_o.doc Proleptic Gregorian calendar October 4­15 1582 cutover Pre Julian Post Gregorian The “Year­Zero” rule The “Leap­Year Calculation” rule http://dev.mysql.com/doc/refman/5.0/en/mysql­calendar.html Slide: 53
  • 54. MySQL for Oracle Developers Date Functions SELECT CURDATE(), NOW(), SYSDATE() Second only granularity http://dev.mysql.com/doc/refman/5.0/en/date­and­time­functions.html TimeZones  ­ UTC or named e.g. SET time_zone = '+10:00';  'Europe/Helsinki', 'US/Eastern',  'MET',  'SYSTEM' Manual Installation step to seed data http://dev.mysql.com/doc/refman/5.0/en/time­zone­support.html Slide: 54
  • 55. MySQL for Oracle Developers Control Flow Functions IF DECODE()   CASE() SELECT IF(1>0,'yes','no');     ­> 'yes' CASE SELECT CASE WHEN 1>0 THEN 'yes' ELSE 'no' END; ­> 'true' SELECT CASE  'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2 END; ­> 2 SELECT CASE BINARY 'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2 END; ­> NULL http://dev.mysql.com/doc/refman/5.0/en/control­flow­functions.html Slide: 55
  • 56. MySQL for Oracle Developers System Variables INFO Server (e.g. /etc/my.cnf) sort_buffer_size=500000 GLOBAL  SET GLOBAL sort_buffer_size=750000; SESSION  SET SESSION sort_buffer_size=1000000; SELECT @@global.sort_buffer_size, @@session.sort_buffer_size; Slide: 56
  • 57. MySQL for Oracle Developers SHOW SHOW TABLES; SHOW WARNINGS; SHOW STATUS;  FLUSH STATUS; SHOW VARIABLES; SHOW VARIABLES LIKE '%size%'; SHOW VARIABLES LIKE 'sort_buffer_size'; SHOW GLOBAL VARIABLES LIKE 'sort_buffer_size'; Slide: 57
  • 58. MySQL for Oracle Developers SQL Mode Key Modes ANSI  STRICT_TRANS_TABLES  TRADITIONAL SHOW VARIABLES LIKE 'sql_mode'; SET sql_mode='strict_all_tables'; Slide: 58
  • 59. MySQL for Oracle Developers SQL Mode Oracle Compatibility SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,  IGNORE_SPACE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,  NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER'; http://dev.mysql.com/doc/refman/5.0/en/server­sql­mode.html http://dev.mysql.com/tech­resources/articles/mysql­data­integrity.html Slide: 59
  • 60. MySQL for Oracle Developers Procedural Language Support Stored Procedures Functions UDF  ­ User Defined Functions Triggers Slide: 60
  • 61. MySQL for Oracle Developers Procedures No Package Capabilites http://bugs.mysql.com/bug.php?id=11696 OS NO RAISE Error Capability No Named Parameters No Overloading http://dev.mysql.com/doc/refman/5.0/en/stored­procedures.html General Purpose Stored Routines Library  http://www.nongnu.org/mysql­sr­lib/  Slide: 61
  • 62. MySQL for Oracle Developers Procedures INFO DELIMITER // CREATE PROCEDURE rewards_report (     IN min_monthly_purchases TINYINT UNSIGNED     , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED     , OUT count_rewardees INT ) LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA SQL SECURITY DEFINER COMMENT 'Provides a customizable report on best customers' proc: BEGIN     DECLARE last_month_start DATE;     DECLARE last_month_end DATE;     /* Some sanity checks... */     IF min_monthly_purchases = 0 THEN         SELECT 'Minimum monthly purchases parameter must be > 0';         LEAVE proc;     END IF;     SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH);     CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY);    ...     SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees;     DROP TABLE tmpCustomer; END // Slide: 62
  • 63. MySQL for Oracle Developers Functions Example – Wrap IFNULL with NVL for Oracle Compatibility DELIMITER // CREATE FUNCTION NVL(IN col VARCHAR(100), IN nullvalue VARCHAR(100))                                              RETURNS VARCHAR(100) BEGIN   RETURN IFNULL(col,nullvalue); END; // DELIMITER ; SELECT NVL(col,'Unknown') FROM table Slide: 63
  • 64. MySQL for Oracle Developers Functions SHOW CREATE FUNCTION 'NVL'; SHOW FUNCTION STATUS LIKE 'NVL'; SELECT routine_name, routine_schema, routine_type  FROM INFORMATION_SHEMA.routines; Slide: 64
  • 65. MySQL for Oracle Developers User Defined Functions (UDF) INFO Added as Object Files $ gcc ­I /usr/include/mysql/ ­shared ­o syslogudf.so syslogudf.c $ cp syslogudf.so /usr/lib mysql> create function logger returns integer soname 'syslogudf.so'; mysql> select logger('logging from ' + version()); $ tail /var/log/messages http://dev.mysql.com/doc/refman/5.0/en/adding­functions.html Slide: 65
  • 66. MySQL for Oracle Developers User Defined Functions (UDF) INFO #include <mysql.h> #include <string.h> #include <syslog.h> my_bool logger_init(UDF_INIT *initid, UDF_ARGS *args, char *message) {         initid­>maybe_null=0;         return 0; } long long logger(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) {         if (args­>arg_count != 1) {                 strcpy(error, quot;LOGGER(): needs messagequot;);                 return 1;         }         if (args­>arg_type[0] != STRING_RESULT) {                 strcpy(error, quot;LOGGER() message should be stringquot;);                 return 1;         }         syslog(LOG_INFO,quot;%squot;,args­>args[0]);         *is_null = 0;         *error = 0;         return 0; http://dammit.lt/stream/mysql/ } Slide: 66
  • 67. MySQL for Oracle Developers User Defined Functions (UDF) INFO MySQL Message API Utilises Spread Toolkit  www.spread.org http://forge.mysql.com/projects/view.php?id=2 Slide: 67
  • 68. MySQL for Oracle Developers Triggers [BEFORE|AFTER] [INSERT|UPDATE|DELETE] Only one trigger per table per DML statement Missing INSTEAD OF (used in Views) No OR DML (e.g. INSERT OR UPDATE) No OR REPLACE  (e.g. CREATE OR REPLACE No WHEN Condition Only for DML statements (e.g. No DROP) http://dev.mysql.com/doc/refman/5.0/en/triggers.html Slide: 68
  • 69. MySQL for Oracle Developers Triggers INFO DELIMITER ;; CREATE TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN     INSERT INTO film_text (film_id, title, description)         VALUES (new.film_id, new.title, new.description);   END;; CREATE TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN     IF (old.title != new.title) or (old.description != new.description)     THEN         UPDATE film_text             SET title=new.title,                 description=new.description,                 film_id=new.film_id         WHERE film_id=old.film_id;     END IF;   END;; CREATE TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN     DELETE FROM film_text WHERE film_id = old.film_id; END;; DELIMITER ; Slide: 69
  • 70. MySQL for Oracle Developers Query Performance Analysis INFO EXPLAIN [EXTENDED] SELECT select_options EXPLAIN PLAN FOR [statement] SELECT only PLAN_TABLE [SELECT] PROCEDURE ANALYSE(); http://dev.mysql.com/doc/refman/5.0/en/explain.html Slide: 70
  • 71. MySQL for Oracle Developers Query Performance Analysis INFO The Slow Query Log long_query_time=5  (my.cnf) mysqld ­­log­slow­queries=[filename]  ­­log­queries­not­using­indexes  ­­log­slow­admin­statements http://dev.mysql.com/doc/refman/5.0/en/slow­query­log.html  Slide: 71
  • 72. MySQL for Oracle Developers MySQL Commands INFO mysql myisamchk mysqld myisamlog mysqladmin myisampack mysqlmanager mysqlbinlog mysqlcheck perror mysqldump mysqlupgrade mysqlimport mysqlslap 5.1 mysqlcheck http://dev.mysql.com/doc/refman/5.0/en/client­utility­programs.html Slide: 72
  • 73. MySQL for Oracle Developers INFORMATION_SCHEMA Oracle Data Dictionary Smaller set of tables TABLES, COLUMNS, VIEWS, ROUTINES,  USER_PREVILEGES Dynamic Performance Views (V$) PROCESSLIST  5.1 http://dev.mysql.com/doc/refman/5.0/en/information­schema.html http://www.xcdsql.org/MySQL/information_schema/5.1/MySQL_5_1_INFORMATION_SCHEMA.html Slide: 73
  • 74. MySQL for Oracle Developers Slide: 74
  • 75. MySQL for Oracle Developers INFORMATION_SCHEMA INFO Examples SELECT TABLE_SCHEMA, SUM((DATA_LENGTH + INDEX_LENGTH) / (1024 * 1024)) AS  SIZE_MB  FROM INFORMATION_SCHEMA.TABLES GROUP BY TABLE_SCHEMA ORDER BY SIZE_MB DESC SELECT ROUTINE_TYPE, ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES  WHERE ROUTINE_SCHEMA='dbname'; SELECT TRIGGER_NAME,EVENT_MANIPULATION,EVENT_OBJECT_TABLE,  ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE  TRIGGER_SCHEMA='dbname'; SELECT CONCAT('DROP TABLE ',table_name,';') INTO OUTFILE '/sql/drop_tables.sql' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test'; Slide: 75
  • 76. MySQL for Oracle Developers INFORMATION_SCHEMA INFO Examples SELECT s.schema_name, CONCAT(IFNULL(ROUND((SUM(t.data_length)+            SUM(t.index_length))/1024/1024,2),0.00),'Mb') total_size,   CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))­ SUM(t.data_free))/1024/1024,2),0.00),'Mb') data_used, CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),'Mb') data_free, IFNULL(ROUND((((SUM(t.data_length)+SUM(t.index_length))­    SUM(t.data_free))/((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used,        COUNT(table_name) total_tables FROM information_schema.schemata s LEFT JOIN information_schema.tables t ON s.schema_name = t.table_schema WHERE s.schema_name != 'information_schema' GROUP BY s.schema_name  ORDER BY pct_used DESCG Slide: 76
  • 77. MySQL for Oracle Developers Helpful SQL Additions LOAD DATA INFILE SELECT INTO OUTFILE DROP [object] IF EXISTS [name]  DROP TABLE IF EXISTS TableName; Slide: 77
  • 78. MySQL for Oracle Developers MySQL 5.1 Major Features 5.1 Partitioning Log Tables Row Based Replication Events Federated Tables Cluster Replication Slide: 78
  • 79. MySQL for Oracle Developers End User Tools MySQL Query Browser MySQL Administrator MySQL Workbench 3  Party Products rd Slide: 79
  • 80. MySQL for Oracle Developers MySQL Query Browser SQL Developer / TOAD Query Toolbar Easily Create, Edit, and Debug SQL Statements Script Editor Object Browser Database Explorer Table Editor Visually Create and Modify Tables http://www.mysql.com/products/tools/query­browser/ Slide: 80
  • 81. MySQL for Oracle Developers MySQL Administrator User Administration OEM,  APEX Single View Dynamic Health Monitoring Quickly Optimize MySQL Rapid Disaster Prevention and Recovery Server Information At­a­Glance View Replication Status View Server Logs  http://www.mysql.com/products/tools/administrator/ Slide: 81
  • 82. MySQL for Oracle Developers MySQL Workbench Reverse Engineer Database Oracle Designer Database/Model synchronization Concept/Logical/Physical Designs DBDesigner4 import/export model Extending Figure Stylesheets Scripts Plugins http://forge.mysql.com/wiki/index.php/MySQL_Workbench Slide: 82
  • 83. MySQL for Oracle Developers rd 3 Party Tools PhpMyAdmin http://www.phpmyadmin.net Toad for MySQL http://www.toadsoft.com/toadmysql/ Slide: 83
  • 84. MySQL for Oracle Developers Other MySQL Products INFO MySQL Connectors ODBC, JDBC, ADO.NET, MPX MySQL Migration Toolkit MySQL Network – Commercial Support Eventum Slide: 84
  • 85. MySQL for Oracle Developers What's Missing Object Structure CREATE TYPE [obj] AS OBJECT Table Snapshots Materialized Views Check Constraints CREATE VIEW ... WITH CHECK OPTION; Flashback queries Synonyms Slide: 85
  • 86. MySQL for Oracle Developers What's Missing    COLUMN name FORMAT a40    SET LINESIZE 100 SQL reports    SPOOL [file] No Memory Pinning capabilities No wrapping capability (protect source) No Java procedural language support Slide: 86
  • 87. MySQL for Oracle Developers What we covered? SQL SQL*Plus PL/SQL Tools Suite Open Source Opportunity Documentation References Slide: 87
  • 88. MySQL for Oracle Developers For access to this paper, more detailed notes     and other information, please visit. http://www.arabx.com.au Slide: 88
  • 89. MySQL for Oracle Developers References INFO http://www.mysql.com   ­  MySQL Web Site http://dev.mysql.com   ­  MySQL Developer Zone http://forums.mysql.com   ­  MySQL Forums http://www.mysql.com/training/certification/   ­ MySQL Certification http://www.planetmysql.org  ­  MySQL Blogs www.mysqldevelopment.com ­ MySQL resources/tutorials Slide: 89
  • 90. MySQL for Oracle Developers References INFO Storage Engines http://dev.mysql.com/tech­resources/articles/mysql_5.0_psea1.html http://dev.mysql.com/tech­resources/articles/mysql_5.0_psea2.html http://dev.mysql.com/tech­resources/articles/creating­new­storage­engine.html http://www.mysql.com/why­mysql/white­papers/mysql_wp_pluggable.php Stored Procedures http://www.nongnu.org/mysql­sr­lib/ ­ General Purpose Stored Routines Library http://dev.mysql.com/tech­resources/articles/mysql­storedprocedures.html Slide: 90
  • 91. MySQL for Oracle Developers References INFO Recommended Reading MySQL by Paul DuBois Slide: 91