Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Tuesday, December 9, 2008

PostgreSQL Vs MySQL

My team decided to use PostgreSQL instead of MySQL. This got me interested in finding out why. Found these articles that helped me understand:

(a recent comparison, subtly votes in favor of PostgreSQL)
(this is the most concise comparison but is a little old, very nicely tabulated)
(a very old comparison to give some prespective)

In a nutshell, both are equally good in the current scenario; though before the 8th release of PostgreSQL,  MySQL held a distinct advantage. Currently PostgreSQL offers a wider range of features and on the whole MySQL is a bit faster. However with every release MySQL is inching towards more features and PostGreSQL towards more speed. MySQL is currently more widespread, perhaps because it is older and is preferred by the widespread PHP community. Another difference is the licensing. Both are open-source but MySQL is under GNU while PostgreSQL is under BSD.  

Wednesday, October 1, 2008

Setting up Quartz in a Spring-MySQL Environment

If you are using a persistent JobStore in Quartz, you will have to back your spring application with a DB. MySQL can be pretty convenient for local unit testing. Besides the regular spring DataSource config, you need a few more things here and there. I did not find any comprehensive "todo" checklist for MySQL online. So summing up what worked for me.

Using SchedularFactoryBean you can specify a MySQL DataSource and fine-tune it using quartz properties. You can see this in a config file I had published earlier:

XML Config

Besides this, you need to have the following dependencies for sure in your pom if you are using Maven:

POM dependencies

If you are not using maven, the corresponding jars should be in the classpath.

Finally, don't forget to run the SQL script to create tables in your database provided by quartz:

Creating DB Tables for Quartz