What is the difference between PostgreSQL and MYSQL?
I want to write a Java program that uses a database. I’ve already started writing some of it for MySQL but I am considering use PostgreSQL. Is PostgreSQL free, compared to the price of MySQL DB? Are there other differences?
Postgres and MySQL are both free. With any performance benchmark you need to be aware that your configuration is almost certainly not identical to the benchmark system so you mileage WILL vary. You will have to learn the ins and outs to make your system perform.
Both have been used in large-scale production systems for years so it may boil down to personal preference, comfort with tools available for either system, and perhaps features.
If you are writing in Java, you should use the JDBC or another interface layer that separates your code from dependency on one database or another.
Yes PostgreSQL is free. You should be fine staying with MySQL; it’s by far the most popular free SQL database.
Don’t know much about PostgreSQL myself, but this is a good page comparing the 2 DBs and may help you decide which is best for you.
http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL