Rupert

I don't have much experience with PostgreSQL (I use mostly MySQL), but the
differences between the two are much less than you seem to think. MySQL is
fine for millions of records, and you would search it through an SQL query
in exactly the same way as PostgreSQL (ie using the DBI module). Of course,
if you *really* want to, you could download the whole thing into a hash and
search it using Perl.....

Also don't worry about it needing a 'simple database structure' - MySQL is a
fully functional relational database program.

Below is an edited version of the comparison between MySQL and PostgreSQL
from the MySQL 3.23 documentation. The general gist is that if you want
speed, use MySQL, if you want the specific advanced features, use
PostgreSQL. But either way, use DBI.pm

Cheers

Mark C



24.2 How MySQL Compares to PostgreSQL
.... If you need speed, MySQL is probably your best choice. If you need some
of the extra features that PostgreSQL can offer, you should use PostgreSQL. 

PostgreSQL has some more advanced features like user-defined types,
triggers, rules, and some transaction support ... However, PostgreSQL lacks
many of the standard types and functions from ANSI SQL and ODBC...

Normally, PostgreSQL is a magnitude slower than MySQL...

The most important things that PostgreSQL supports that MySQL doesn't yet
support: 

Sub select 
Foreign keys 
Stored procedures 
An extendable type system. 
A way to extend the SQL to handle new key types (like R-trees) 
MySQL, on the other hand, supports many ANSI SQL constructs that PostgreSQL
doesn't support. Most of these can be found at the crash-me Web page. 

If you really need the rich type system PostgreSQL offers and you can afford
the speed penalty of having to do everything transaction safe, you should
take a look at PostgreSQL. 




----------------------------------------------------------------------------
----

> -----Original Message-----
> From: Rupert Heesom [mailto:[EMAIL PROTECTED]]
> Sent: 08 November 2001 08:23
> To: Perl List
> Subject: To use MySQL or Postgresql database with perl project
> 
> 
> I am trying to put together a simple database app which 
> extracts details
> from an email mbox file and update the database with these details (2
> field records) only if they're unique.
> 
> I've looked briefly at MySQL or Postgresql.  I am not familiar with
> either of them.  At first, I thought I'd be able to use MySQL 
> because of
> the simple database structure that I will use.  
> 
> However, I foresee needing to search 100s of thousands or millions of
> records to make sure that my data to update the database with 
> is unique.
> 
> Therefore the perl's method of dealing with databases, using 
> a hash will
> not be sufficient, due to my having to come up with a good 
> search method
> to search the hash rather than relying on a good SQL query for a
> Postgresql database.
> 
> Am I correct in assuming that an SQL query (using Postgres) 
> will be more
> efficient than searching through a linked hash variable 
> (using MySQL)??
> 
> 
> -- 
> regs
> rupert
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to