Question:
I keep hearing about developers using MySQL and Postgre SQL. What is the better Open source alternative?
Answer:
I would suggest you choose your database using
the same set of predicates and heuristics which you would choose your
operating system and your language development tools.
Some reasons as to why MySQL should be strongly considered as your primary database engine include: very wide portability across platforms (more than most other databases,) very wide industry uptake (MySQL is used in four million installations around the world and therefore is well understood by many developers and hosting providers,) and a high rate of deployment growth (the MySQL engine gets downloaded over 10 million times per year.) MySQL is also the fastest full-featured SQL engine around, clocking in at around 9 times faster than PostgreSQL, is perhaps the easiest SQL server to maintain, and requires the least overall hardware and platform resources to operate in production. In terms of scalability, MySQL ships with a high-capacity engine, which can support tens of millions of records and hundreds of concurrent users.
When I first started using MySQL almost seven years ago, its main attributes were speed, simplicity, availability of quality maintenance tools and zero cost. By comparison, PostgreSQL's core features were breadth of functionality and that it was fully open source. In time, MySQL was released under an open source licence, and has had considerable addition of features (such as support for transactions) to help it compete with PostgreSQL and other traditional databases. During that same time, PostgreSQL has also made strides, with greater stability and improved performance and a supporting cadre of new tools. In many ways, these two databases are converging in terms of features and attributes.
Which one you select will therefore be based on peripheral criteria, such as does your application require a thread-enabled SQL engine (MySQL has thread support) and do you need to run the database in a production Windows 2000 environment (MySQL has been available on Windows for years). If, on the other hand, you need database triggers, then you really need to look at PostgreSQL.
Either way, have no doubts that between them, PostgreSQL or MySQL will be able to supply you with all the database grunt you need for pretty much any application that you are building. If MySQL is good enough to power many of the applications behind heavily used web-properties such as Google and Yahoo!, chances are it will fit your requirements too.
Which brings us finally to one the best things about open source tools and platforms, namely choice. While MySQL and PostgreSQL are perhaps two of the best known database systems in the open source realm, there are (according to http://freshmeat.net) another 267, often very domain specific, database servers. If MySQL and PostgreSQL don't do what you want, then feel free to try Firebird, InterBase or the SAP DB, all of which are open source and free of cost.
Do you have a question on open source that you need answered? Builder Australia invites you to submit your questions, which will then be answered by local open-source experts Jeff Waugh and Con Zymaris. Simply send questions through to edit@zdnet.com.au.
Con Zymaris is the CEO of Cybersource Pty. Ltd. a long-standing IT & Internet Professional Services company
Do you need help with MySQL? 





1
FOX - 28/02/05
One other notable diference is that MySQL uses the full GPL licence, which conflicts with the FSF recommendation to use the LGPL for "library" type software for which there allready exists commercial alternatives, meaning that any software using MySQL must be licenced under the GPL. This means that if you wanted to sell your software without supplying the source code, you would have to purchace a licence for MySQL ; such a restricton does not exist for Posgre, which uses a BSD licence.
» Report offensive content
2
Paul - 05/05/05
I have designed and developed large multi-tier database systems, with hundreds of tables and GB of data and many developers. Below is a small smaple of reasons why, amongst my peers anyway, MySQL is considered more a toy for getting started than a real industrial strength database. Stick to SQLServer, Sybase, Postgresql and Oracle.
- No support for triggers or declaritive referential integrity. If you have *real* data, do you want your data integrity to be compromised by a bug in the front end? It is often impossible to reconstitute data that has been screwed up by a programmer. Trigger and DRI protect your data.
- Stored Procedures. In general, provide stored procedures to implement business logic. Then you can guarantee best performance (executes inside the DB and data integrity (front end programmer just uses your code). Some people believe that *all* access to the database be through stored procs, thereby guaranteeing data integrity. Inside stored procedures you can provide proper locking operation with rollback. When a stored procedure returns the caller is guaranteed that either the operation was successful, or completely rolled back.
- Without stored procs, you have people trying to implement locking from an external process, which is much more difficult and prone to error.
- Many wierd bugs on data handling (google for 'MySQL Gotchas' - its pretty shocking). When your data is precious, you sure dont want your database getting confused between NULL and NOT NULL.
Admittedly V5 of MySQL has added views and procedures (at last). Hopefully they've fixed the bugs too (not that postgresql is pure either, just that its *better*).
If your data is ***really*** important, go with Sybase, Oracle or MSSQLServer.
» Report offensive content