Re: New to PostgreSQL - Mailing list pgsql-advocacy
From | Chris Travers |
---|---|
Subject | Re: New to PostgreSQL |
Date | |
Msg-id | 410EDAFA.7000303@travelamericas.com Whole thread Raw |
In response to | New to PostgreSQL (Steve Bergman <steve@rueb.com>) |
List | pgsql-advocacy |
A few slightly different takes on things... Steve Bergman wrote: >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. ;-) > > > I see language choice as relatively irrelevant. Thanks for your post though. >PostgreSQL pros: > >1. Mature product compared to MySQL. > >2. Supports triggers, stored procedures, cursors. > > Furthermore stored procedures can be written in your choice of languages. I usually use SQL and PLPGSQL but PLPerl, and PLTCL come with it out of the box. Additionally you can download handlers for many other language handlers. >4. A true object relational database, which should mesh well with PHP5's >new beefed up object model. > > > Maybe, but at the moment, the OR functionality of Pgsql is overrated, IMO. Though if you are a C programmer, it can be really useful. >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. > > > I code in PHP against PostgreSQL all the time. The coding is different but not any less integrated. If you like I can send you my lightweight abstraction layers for MySQL and PostgreSQL development. They wrap most of the worst differences. >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. > > > Renaming of columns used to be my pet peve. It has been supported for a while now. Then there was dropping a column. THis is now resolved. Changing datatypes is more complex, and I prefer to do it manually. MySQL will automate this process for you but it can be dangerous. >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. > > You always get more flexibility from the command line. Of course most of the GUIs allow you to use a command line for any database manager. >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. > > Good way to get started. I will share my experience that PostgreSQL has a slightly steeper, but in the end, I would never go back to MySQL. You may find my lightweight abstraction laters interesting in part because reading the code will help show you how the coding is different between the databases. If you are interested, email me off list (files are released under the LGPL) Best Wishes, Chris Travers Metatron Technology Consulting
pgsql-advocacy by date: