Re: Application using PostgreSQL as a back end (experienced programmers please)

From: Bill Dika <wadika(at)gmail(dot)com>
To: PGSQL-Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Application using PostgreSQL as a back end (experienced programmers please)
Date: 2005-11-22 01:15:34
Message-ID: 50705a160511211715tea57169t61a5704d5e270dc9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks Marcus. I intended to make full use of Postgres' constraints, primary
key, foreign key and trigger capabilities to keep the integrity of the data.
And yes, I have read a few db books :-), but you didn't know that for sure.
Thanks for the advice.

Regards,
Bill Dika

On 11/19/05, Marcus Engene <mengpg(at)engene(dot)se> wrote:
>
> Bill Dika wrote:
> > Thanks Nikola.
> >
> > Your explanation of layering was helpful. The consensus from you experts
> > seems to be that I should keep the business rules and logic out of the
> > database, so I will do that.
> >
>
> Hi,
>
> Just a small note here. I've seen projects where exactly everything is
> put into the application, including validations of data and such. The db
> was basically a bit bucket with indexes. That turned out to be a
> complete disaster. It's much harder to keep track of all validations in
> the java/whatever code than letting the db do this for you.
>
> It's very easy to add constraints, foreign keys and such to a db and
> that should always be done. There are no excuse what so ever not to.
> Everything you can validate (via CHECK(), fk, trigger, whatever) do it.
> A db with errors is a nightmare to patch. It's much better to have the
> application tell you it won't do an operation and you do a fix rather
> than the application inserting errors silently.
>
> Ok, this was the introductionary chapter of any db book. Sorry about
> that. ;-)
>
> Best regards,
> Marcus
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Charles Bai 2005-11-22 03:13:00 confused by role, privileges, and permission issues
Previous Message Chris Browne 2005-11-21 17:35:26 Re: Application using PostgreSQL as a back end (experienced