On 13 Feb 2014, at 9:55am, O.D. vidal <pa...@mac.com> wrote:

> Why do you say:
> 
>> This would normally be done inside your programming language.
> 
> strengthen the rule directly in the database seems common sense.

I can see that argument, which is why I bothered figuring out the TRIGGER.

However, anyone who is able to make changes to the data in that database can 
also make changes to the TRIGGERs in the database.  So they could just DROP 
that TRIGGER.  They would be less likely to be able to change the software that 
is being used to edit the data.

Your question is an example of a long term discussion about whether your entire 
business philosophy should be encoded within your SQL databases, with numerous 
FOREIGN KEYs, CONSTRAINTs and TRIGGERs used to enforce how you run the 
business.  The two sides of the argument are about evenly matched and there are 
no conclusions yet.

I hope you manage to implement a solution which suits you.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to