best place to enfore rules - Mailing list pgsql-general

From Rick Schumeyer
Subject best place to enfore rules
Date
Msg-id 002801c4f9ab$bded0ed0$0200a8c0@dell8200
Whole thread Raw
Responses Re: best place to enfore rules
Re: best place to enfore rules
List 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?

 

 

pgsql-general by date:

Previous
From: "Craig Bryden"
Date:
Subject: Functions returning RECORD
Next
From: Lonni J Friedman
Date:
Subject: Re: allowing connections from additional hosts without a restart?