From: | "Rick Schumeyer" <rschumeyer(at)ieee(dot)org> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | best place to enfore rules |
Date: | 2005-01-13 20:09:08 |
Message-ID: | 002801c4f9ab$bded0ed0$0200a8c0@dell8200 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm new both to databases and postgres, so forgive me if this is a stupid
question.
Where do people usually enforce business rules? In the client application
or in the database?
For example, I might have a rule "don't allow customers to enter an order if
their account
is delinquent." I could create rules, triggers, etc. to prevent an entry
into the "order" table
given some condition in the "account" table. Or I could put the logic on
the client side.
I would think it would be better to do this inside the database. I'm not
familiar with how
the client would know what is happening. I guess the client can tell if an
SQL command
failed, but will the client know why it failed?
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2005-01-13 20:16:39 | Re: Adding UNIQUE constraint on NULL column |
Previous Message | Craig Bryden | 2005-01-13 19:46:35 | Functions that return RECORD type |