Oracle vs MySQL

  • MySQL:
    1. is very light, lightning fast,
    2. very easy to use,
    3. cost effective for start-ups,
    4. agile enough to cover any basic secure medium enterprise OLTP,
    5. I’m used to manage 1-10T table before having some issue,
    6. basically it’s divided into database and table (In the old MySQL 5.0, you can easily setup multiple  instances in one daemon. In the new MySQL 5.5, it’s recommended to run multiple instances in multiple daemons),
    7. replication is very easy to setup and easy to fix conflicts, however up until 5.6, there’s still many bugs,
    8. hot backup/snapshot is not coming by nature, but you can easily do hot backup/snapshot from stopped replicated server,
    9. MySQL Enterprise Admin is relatively useless for experienced DBA,
    10. can only replicate from one source,
    11. doesn’t have propagation checking like Oracle DataGuard,
    12. easier to have conflict in multiple active master,
    13. need to customize procedure to run similar Oracle materialized view,
    14. need to customize trigger to run similar Oracle audit,
    15. MySQL 5.6 starts to support account lock and password testing but through plugin method,
    16. MySQL Cluster is having all data in memory, risk of loosing data during power/server outage is high.
    • Oracle:
    1. heavyweight, resource consumed,
    2. better OLTP in term of complete microseconds DR,
    3. suitable for VLDB,
    4. more features,
    5. divided into database, schema (it’s more likely called database in MySQL) and table,
    6. online hot backup is easy to do on archivelog mode,
    7. Oracle Enterprise Manager supports more difficult tasks,
    8. have proprietary ASM storage,
    9. supports multiple active masters,
    10. supports slave check before commit (DataGuard),
    11. supports replication from multiple masters,
    12. supports materialized view,
    13. supports audit,
    14. supports more account features like account lock, password expiry, etc,
    15. supports function-based index and indexed-virtual column,
    16. supports role for privilege administration (similar to group privilege),
    17. Oracle cluster RAC is a real cluster on disc.
    Similarity:
    • From OLAP perspective, in my opinion both are offering similar features. OLAP depends more on DBA ability, rather than DB Servers ability.
    • Both supports encrypted replication and communication.
    How to run in MySQL vs in Oracle:
    1. displaying x numbers of row, e.g.: MySQL# select … limit x,x; Oracle# select … where rownum<=x;
    2. displaying a column in rows: MySQL has ‘\G’. Oracle has to use procedure like this: https://forums.oracle.com/thread/925884.
    3. MySQL has binary and varbinary as an addition to char and varchar. Oracle has nchar and nchar2 as an addition to char and varchar2.
    4. @>show tables in Oracle:@> select * from user_objects where object_type = ‘TABLE’;
    5. @>show create table in Oracle: @>select dbms_metadata.get_ddl(‘TABLE’, ‘TABLENAME’,’SCHEMANAME’) from dual;
    6. @>show index in Oracle: @>select dbms_metadata.get_ddl(‘INDEX’, ‘TABLENAME’,’SCHEMANAME’) from dual;
    Note:
    • OLTP = On-line Transactional Processing
    • OLAP = On-line Analytical Processing
    • VLDB = Very Large Data Bases.
    ]]>

    Leave a Reply