question

logicwonder avatar image
logicwonder asked

Triggers for ensuring consistency

I am currently using SQL server transactions to ensure consistent updation of data across multiple tables. My application involves decrementing a value from a row from table A and incrementing the value to a row in table B (Similar to credit/debit in banking scenario). I know that transactions can ensure consistency. But do I need to do a double check by using triggers to check for updation rules to ensure data consistency?
transactiontriggers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
There should be no reason to use triggers to double check. If you are using transactions from code, or using stored procedures as your data access layer, and you have coded correctly, then there should be no problems.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

logicwonder avatar image logicwonder commented ·
Thanks Kev.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.