sql - long-time Oracle user switching to MySQL, any gotchas to be aware of? -


It happened that all projects were with Oracle as a database server during the last 10 years. ), I'm starting the project on one side of my own.

Is anyone available (things that do not work as expected by the Oracle user)? There is nothing to do with transaction management, locking, isolation level, indexed, content of that kind.

I'm primarily a Java developer, so I'm interested in how the database is viewed from an application server

Thanks.

Itemprop = "text">

MySQL has different engines - primary Having INNODB and MySam . The level of isolation is the same - these days seem relatively standard between the databases.

Index

Indices are different - In MySQL clusters and non-cluster are indexed Clustered indexes are primarily for primary keys, but not necessarily. there also . Cover Indexes are supported, there is no support for function based index ...

The adapter can only use one index per index - Check Explan Plan Output To specify an index, the syntax Is, but this is an indication; Still can be avoided by the adapter.

restriction

MySQL is the only option to use triggers

custom error handling

You are declared a handler for custom error handling Need to:

First -
MySQL does not have any support to define custom errors to differentiate between data integrity and trade rule errors.

Analytical / Ranking / Winding Functionality

There is no such functionality in MySQL - no ROW_NUMBER, NTEEL, Rank or DNSERAC. You can create psuedo functionality using the variable - if you check the "mysql", "rank" tag then there are many examples on SO.

With the syntax - Subsequency factoring

is

hierarchical query support

You have guessed it - for hierarchical questions No recurring support The Oracle was connected to V2 (!!), but ANSI looks like standard SQL Server 2005 +, is to be used.

View

MySQL does not support physical content, and.

PIVOT / UNPIVOT

This is the ANSI standard syntax; Oracle started support in 11G but MySQL does not support this again. The only option is the case and total work, which is the most portable medium for implementing this functionality (Supports SQL Server 2005+ PIVOT / UNPIVOT).

sequence

MySQL does not support the sequence, and the closest object is defining an INT column as auto_ignment, from which two or more tables have the same sequence of values Use is incredibly difficult (not that you really want to do if you do not have it). Also, only one auto_iment column can be defined per table. - Change this, and you affect each auto_increment column in each database, for example the ALTER TABLE privilege is required to reset the Auto_increment value; The removal / sorting data will not change the existing value.

On that note, MySQL does not support returning clause. .

Data type

MySQL does not have NUMBER data type - in this regard, the MySQL is similar to the SQL Server. The data type is more suited to the 4000 limit of VARCHAR2 of Oracle. MySQL supports CLOB and Blob ...

packages, stored procedures, functions

MySQL supports user-defined functions and stored procedures - I still face a database It has to do something that supports something similar to Oracle. SQL Server has CLR assemblies, but need to use net CLR code instead of the original TSQL / PLSSQL.


Comments