Re: [Q] optmizing postgres for 'single client' / many small queries

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: [Q] optmizing postgres for 'single client' / many small queries
Дата
Msg-id 20090903162807.GR8410@fetter.org
обсуждение исходный текст
Ответ на Re: [Q] optmizing postgres for 'single client' / many small queries  (Richard Broersma <richard.broersma@gmail.com>)
Список pgsql-general
On Thu, Sep 03, 2009 at 07:24:50AM -0700, Richard Broersma wrote:
> On Wed, Sep 2, 2009 at 4:35 PM, David Fetter<david@fetter.org> wrote:
>
> > Hibernate has the very nice feature of being able to get out of
> > your way.  Properly used, it can keep completely out of the
> > business of making (wrong) guesses based on DDL, which is what
> > ORMs often do.  DBIx::Class
> > <http://search.cpan.org/dist/DBIx-Class/> has gone a long way in
> > the right direction.
> >
> > Ones which (attempt to) dictate decisions about DDL are just off
> > the map. :P
>
> David, do you know how well these kinds of ORMs work when it come to
> mapping  non-trivial schema designs?  For example, how would these
> work when creating a mapping for the multiple inheritance design
> that you've blogged about earlier?

If your mapper only does the job of mapping, you can choose
classes/objects and then map them to the appropriate, possibly
parameterized, SQL queries, which the DB people can then freely
rearrange.

One nice feature of such a system is that the DBA and/or DB developer
has a way to know what the client code expects.  In OO terms, there
are public interfaces--everything mentioned in the ORM layer--and
private interfaces--DDL, DML, and DCL--to the database.

Programmers who like to use object-oriented languages and methods
should be happy about this object-oriented approach to database
management, but for some reason, a lot of them don't understand that
the idea of public and private interfaces applies to what they (too
simplistically, much of the time) think of as "the persistence layer."

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: auto-increment in a view
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: handle audiofiles in postgres