MySQL was originally owned by MySQL AB. On 16 January 2008 SUN Microsystems acquire MySQL AB for $1 billion in cash and assumed stock options. SUN was acquired by Oracle Corporation in 2010.
Compared to the Oracle database
While both MySQL and the Oracle Database are Relational Database Systems, it's not quite fair to compare them as MySQL doesn't offer all of the functionality of Oracle. However, let's look at some of the differences, assuming that MySQL's default and usual InnoDB storage engine is being used:
- Oracle is a proprietary database system while MySQL is open source.
- A bunch of features are only available in Oracle; and not supported by MySQL.
- MySQL provides limited support for restart recovery, transaction boundaries. Oracle, on the other hand, provides strong support for these features. MySQL provides automatic user data recovery after power outages and similar events. MySQL transaction isolation levels are repeatable read (the default), read committed, read uncommitted and serializable.
- MySQL doesn't have direct support for XML data, which is supported by an included plugin, some analytical functions, etc.
- Object names (like table and column names) are not case sensitive in Oracle, but they are in MySQL. To use case sensitive names in Oracle, names must be "quoted".
- Text lookups in Oracle is typically case sensitive. In MySQL the default lookup for text is case insensitive and case sensitive can be selected by specifying a case-sensitive collation for a column or at query time if that is desired.
- Automatic numbering: Oracle sequences are separate database objects (values must be assigned to columns - more flexible, but not as easy as with MySQL). In MySQL, "auto_increment" is an attribute of a column, but there can be only one auto_increment column per table.
Data type differences
- Text columns: in Oracle a VARCHAR2 may be up to 4000 bytes, in MySQL the limit is 65535. Long text items in Oracle are called CLOB's and BLOB's, in MySQL they are TEXT, however, these types work differently.
- Date columns: Oracle's DATE and TIMESTAMP types store both date and time, MySQL has DATE, TIME, DATETIME and TIMESTAMP types. Date manipulation routines are different.
- Numeric columns: Oracle has one numeric type, NUMBER that holds up to 38 digits (INT, FLOAT, etc maps to NUMBER). MySQL has many different numeric types including INT, DECIMAL, FLOAT and DOUBLE but not NUMBER.
- ENUM (enumerated) and SET data types are supported by MySQL. Oracle allows for the definition of custom abstract data types.
Migration to/from Oracle
Oracle's SQL Developer can be used to convert MySQL databases to Oracle.
The following MySQL database engines are provided by Oracle Corporation: