Article on the future of Python

Chris Angelico rosuav at gmail.com
Fri Sep 28 00:37:21 EDT 2012


On Fri, Sep 28, 2012 at 2:12 PM, Greg Donald <gdonald at gmail.com> wrote:
> On Thu, Sep 27, 2012 at 10:37 PM, Wayne Werner <wayne at waynewerner.com> wrote:
>> the only advice I can give on that is
>> just learn to use both.
>
> I find there's little to lose in having experience with both.
>
> Most every good web framework out there supports lots of different
> databases through generic ORM layers.. so flipping back and forth to
> see which database is better for your particular app and workload is
> trivial.

Learning both is good, if for no reason than that learning more tends
to be advantageous.

As Greg said in his other post, PGSQL is a completely open source
project. That's a significant point imho. Other points to consider:

* MySQL is designed for dynamic web sites, with lots of reading and
not too much writing. Its row and table locking system is pretty
rudimentary, and it's quite easy for performance to suffer really
badly if you don't think about it. But if your needs are simple, MySQL
is probably enough. PostgreSQL uses MVCC to avoid locks in many cases.
You can happily read from a row while it's being updated; you'll be
unaware of the update until it's committed.

* Postgres has solid support for advanced features like replication. I
don't know how good MySQL's replication is, never tried it. Can't say.
This might be completely insignificant.

* The default MySQL engine, MyISAM, doesn't do proper transaction
logging etc. InnoDB is better for this, but the internal tables (where
your database *structure* is maintained) are MyISAM. This imposes a
definite risk.

* Both engines have good support in popular languages, including
(dragging this back on topic, kicking and screaming) Python.

For further details, poke around on the web; I'm sure you'll find
plenty of good blog posts etc. But as for me and my house, we will
have Postgres serve us.

ChrisA



More information about the Python-list mailing list