in reply to Re^4: Conditional many to many relationships with Class::DBI
in thread Conditional many to many relationships with Class::DBI

MySQL actually has stronger default transaction support than Oracle, Sybase, and DB2.
Could you expand on that a bit?

Thanks!

Michael

  • Comment on Re^5: Conditional many to many relationships with Class::DBI

Replies are listed 'Best First'.
Re^6: Conditional many to many relationships with Class::DBI
by dragonchild (Archbishop) on Nov 02, 2004 at 14:01 UTC
    Sybase1 operates by default on Isolation Level 1, which corresponds (roughly) to MySQL's 'READ COMMITTED'. MySQL2, by default, operates on 'REPEATABLE READ', which corresponds (roughly) to Sybase's Isolation Level 2. Oracle3 operates by default on something similar to Sybase's default isolation level, as does Postgres4.

    Now, all four RDBMSes can be set to operate at the level that the SQL92 standard recommends, which is Sybase's Isolation Level 3, or MySQL's 'SERIALIZABLE'. However, only Sybase and MySQL offer the ability to operate at any of the four isolation levels. Oracle8i and Postgres only offer READ COMMITTED and SERIALIZABLE (levels 1 and 3 in Sybase).

    1. the Sybase manual
    2. the MySQL manual
    3. the Oracle manual
    4. the Postgres manual

    Note: I couldn't find the official Oracle manuals through Google. I figured something by O'Reilly would be good enough.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      Considering that MySQL only supports transactions on certain (new) table types dont you think that saying its default behaviour is more sophisiticated than the others is a bit misleading? Especially as Sybase handles all of the required levels as well as supporting much more sophisticated locking schemes than MySQL (afaik, MySQL doesnt support row level locking).

      So you have to admit you were a bit strong in that original claim no? :-p

      ---
      demerphq

        InnoDB has been part of MySQL since 3.23.34a, which came out in September, 2000. So, it's been around for at least 4 years. However, in the 3.x series, InnoDB isn't enabled by default. It's only in the 4.x series that it is. So, at four years old, I wouldn't consider InnoDB to be "new".

        MySQL and Sybase were the only databases in the comparison that supported all of the required levels. Oracle and Postgres only support the second and fourth levels.

        As for row-level locking, I'll quote from section 7.3.1 of the MySQL manual:

        Currently, MySQL supports table-level locking for ISAM, MyISAM, and MEMORY (HEAP) tables, page-level locking for BDB tables, and row-level locking for InnoDB tables.

        As we're discussing InnoDB tables, row-level locking is supported.

        Now, out of the box, all tables are created as MyISAM tables, which does not support transactions. However, even a cursory reading of the MySQL manual (which every DBA should do) states this in very plain English and converting tables from MyISAM to InnoDB is extremely simple. ALTER TABLE foo.bar ENGINE_TYPE = InnoDB should almost always work. You can even set the default ENGINE_TYPE in any one of three configuration files, plus on the commandline. So, it's not like you have to jump through hoops to do what needs done (unlike some other databases I can think of.

        So, no, I don't think I overstated anything. :-)

        Being right, does not endow the right to be rude; politeness costs nothing.
        Being unknowing, is not the same as being stupid.
        Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
        Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      Thanks - I wasn't sure what you were hinting at.

      The higher the isolation level the more concurrency issues you're going to have - unless the system uses some form of multi-version journaling (Sybase doesn't so I tend to use the default isolation level).

      Michael