Forum .LRN Q&A: Re: can .LRN support MYSQL database?

Collapse
Posted by Don Baccus on
Let me expand on Andrew's comment, Dirk:

EVERY autocommitted statement is executed within its own implicit transaction.  That means that an INSERT or UPDATE is guaranteed to execute to completion or to roll back automatically (say, if your machine crashes).  With the original MySQL backend, atomicity at the statement level was not guaranteed.

This misunderstanding of the role of transactions has been very common in the MySQL world ... we know better here :)

Having said that, the InnoDB back end for MySQL is fully transactional and AFAIK guarantees atomicity for individual statements as well as explicit transactions.  Today, the major issue would be the still relatively weak support for more complex SQL constructs in MySQL.

For our project, the really BIG issue is the expense involved in maintaining multiple databases.  We can't, as a project, really afford to maintain more than one open source RDBMS.  Postgres gets the job done, and is much closer to Oracle in its extension set and follows the standard closely, plus we already support it so it wins by default.

Collapse
Posted by Nick Carroll on
Hypothetically speaking, if OpenACS was implemented in Java, would Object Relational Mapping (ORM) be advantageous in this situation?  Open source projects like Hibernate (www.hibernate.org) provides persistence for Java objects, by mapping Java objects to database tables.  They claim you will never have to write a line of SQL again... although if you read the fine print you will have to use HQL (Hibernate Query Language) for complex queries.
Collapse
Posted by Dirk Gomez on
Don, do I understand this correctly? If a MySQL process crashes while a SQL DML statement is being executed, some pieces of data remain changed while others don't? Now that is some surprising news that would rule out MySQL for almost any application...
Collapse
Posted by Roberto Mello on
As Don said: "With the original MySQL backend, atomicity at the statement level was not guaranteed."

The original (and default) MySQL backend is the MyISAM table type. With MyISAM there is no atomicity guarantee whatsoever. There's a utility that tries to repair broken databases with MyISAM.

You only have some atomicity with the InnoDB and BDB table types.

-Roberto

Collapse
12: Object Relational Mapping (response to 9)
Posted by Andrew Piskorski on
Nick, the later Java versions of the ACS did have Object Relational Mapping. Others here we actually used it could comment better, but from what I heard, it sounded like a crock. Look into Red Hat CCM, if you're interested in that.

Personally, I've never yet seen a single convincing example of why so-called "Object Relational Mapping" would ever be of any real use at all.

Collapse
Posted by Patrick Giagnocavo on
Just a note to Andrew and others, the ACS Java/Red Hat CCM code is now called "Byline" and is at http://byline.objectweb.org/ .