New to PostgreSQL

From: Steve Bergman <steve(at)rueb(dot)com>
To: pgsql-advocacy <pgsql-advocacy(at)postgresql(dot)org>
Subject: New to PostgreSQL
Date: 2004-08-01 16:52:37
Message-ID: 1091379157.5094.34.camel@ip68-12-228-23.ok.ok.cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

I'm a relative newbie to databases, and am looking for some input on
selecting the right database for my work. My language of choice is
PHP5. I started out assuming that MySQL was the natural choice for me,
since PHP and MySQL seem to go together like peanut butter and jelly.
However, PostgreSQL has also attracted my attention. All my programming
life I have moved from language to language, never feeling the master of
any. I am looking for a platform to learn and learn well. The choice
of PHP5 as the language has been somewhat easier than deciding on the
database. So I'll summarize my perceptions based in the research I've
done, and would greatly appreciate any commentary. Please don't be
afraid to tell me I'm naive, misguided, short sighted or nuts. ;-)

PostgreSQL pros:

1. Mature product compared to MySQL.

2. Supports triggers, stored procedures, cursors.

3. Also supports foreign key constrains which I believe are only
supported in MySQL beta at this time.

4. A true object relational database, which should mesh well with PHP5's
new beefed up object model.

5. Avoids the complexities and ambiguities in licensing from which
MySQL seems to suffer.

PostGreSQL cons:

1. My impression based on what I've seen written is that PHP/MySQL
integration is better. After all, while people talk of LAMP, one does
not ever hear of LAPP. However, looking over the functions available
for each in PHP5, I don't see obvious evidence of this.

2. Administration is more difficult. I read this in the "PHP5 MySQL
Bible" but from what little I've seen for myself, I don't really see the
difference. I did note a couple of things in the recent LWN article on
PostgreSQL. 7.5 will introduce direct import of CSV files, and the
direct renaming of columns, which I believe are things that have been
long supported in MySQL. Not show stoppers, of course, but they do hint
at PostgreSQL perhaps not being as convenient to use as MySQL. Then
again, I recognize that this is a perception based on little evidence.

3. I prefer MySQL's phpmyadmin to the command line for working with the
database. I have heard that phppgadmin is not as feature complete.
However, looking over my recent installation, I don't see glaring
differences.

4. MySQL is more multiplatform. While this does not bother me, I do
have coworkers that use Windows that will be affected by my choice of
database. Fortunately, I believe 7.5 is to have true (i.e. non-cygwin
win32 support).

5. Performance. Here it seems almost impossible to get solid
information, and what little there is out there seems quite dated. My
general impression is that under light load and simple queries, MySQL is
more nimble, but that under heavier, multi-user load more complex
queries PostgreSQL pulls ahead. This is based on hear-say and I get the
distinct impression that no one really knows, or at least no one ever
seems to present numbers to back them up. I also understand that it can
be difficult to make an apples to apples comparison due to the feature
disparity between the two, which was quite vast until recent times
(MySQL's 4.x series).

I am currently working on a project, which started out MySQL, but which
I am porting to PostGreSQL and will finish development of the two
branches in tandem. This seems like a good way to get a feel for
similarities and differences.

I hope that this post is appropriate for this forum. And please
understand that it is in no way intended as flame bait.

Thanks for any insights,

Steve Bergman

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Fred Moyer 2004-08-01 17:29:28 Re: A thread about SPs -- mentioning PostgreSQL
Previous Message Josh Berkus 2004-08-01 16:48:26 Re: A thread about SPs -- mentioning PostgreSQL