[LRUG] Reasons for Postgres
Alex Young
alex at blackkettle.org
Tue Nov 17 01:20:40 PST 2009
Riccardo Tacconi wrote:
> I think that MySql as 'persistent layer' is ok, but if you want to use
> it in an advanced way (trigger stored procedures, cluster), probably
> Postgres is a better choice. Plus, *PL/pgSQL *it seems to me much more
> advanced. I did not know about tsearch2, is very intresting, Oracle has
> a full text search too.
PL/Python is a pretty good reason to go with PostgreSQL as well, in my
book. There are things you can do in PostgreSQL stored procs that
there's just no way of getting close to in MySQL without dropping to C
extensions.
> Tom: I do not like the word 'Windows' in option 3 :-). I would avoid to
> put much logic into the database, it is coming back to the
> database-centric design which is in contrast with DDD. I prefer to see
> the constraints all in my model.
Having the constraints visible in the model is not mutually exclusive
with having them enforced in the database. If you look at something like
DataMapper, which uses the model definition to define the schema (which
I don't necessarily agree with in general, but that's for another time),
it should be possible to push certain validation constraints to the
database layer on schema creation. As far as I know it doesn't actually
do this, but I don't think there's a reason it couldn't, and there's a
good argument for duplicating the constraints between Ruby and the
database as long as the two can be automatically kept in sync.
I *also* think that of the major Ruby ORM libraries, only Sequel is
really aligned with DDD in the first place, so if you're using anything
else you've already compromised the model (although again, possibly
that's a discussion for another time).
--
Alex
>
> On Mon, Nov 16, 2009 at 6:04 PM, Jocke Selin <jocke at selincite.com
> <mailto:jocke at selincite.com>> wrote:
>
>
> On 16 Nov 2009, at 17:58, Tom Morris wrote:
>
> > On Mon, Nov 16, 2009 at 16:52, Sam Stokes
> <webstuff-lrug at samstokes.co.uk
> <mailto:webstuff-lrug at samstokes.co.uk>> wrote:
> >> Now that you've brought it up :) Would you be able to list a
> few things
> >> that you like about Postgres, or even reasons to use Postgres
> over MySQL?
> >>
> >> I'm not looking for a flamewar (and certainly not intending to
> defend
> >> MySQL!) - I'm genuinely curious about Postgres. It's something
> I've never
> >> got around to looking into - MySQL has always been "good
> enough", since I'm
> >> already familiar with it - but I'd like to have a reason to try
> Postgres on
> >> a new project.
> >>
> >
> > I recently evaluated both Postgres and MySQL, and I found:
>
> .....
>
> > 4. Postgres has a slight speed disadvantage over MySQL in terms of
> > read performance - I'm told, I haven't actually tested it - but the
> > app I'm using has a small number of users who write and edit a *lot*.
>
> I seem to recall us doing quite a lot of research into speeding
> PostgreSQL up, and one of the things you can do is to put the PGSQL
> write-ahead onto a separate disk and a non-journalling FS... if
> memory serves. Obviously with optimised parameters for the hardware.
>
> /Jocke
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org <mailto:Chat at lists.lrug.org>
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
>
>
> --
> Riccardo Tacconi
> VIRTUELOGIC LIMITED
>
> http://www.linkedin.com/in/riccardotacconi
> http://riccardotacconi.blogspot.com/
> http://twitter.com/rtacconi
> Linux user: #400461
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
More information about the Chat
mailing list