• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1100
  • Last Modified:

Triggers or DRI

I am using the Upsize Wizard and one of the choices I have to make is to use DRI or triggers to implements constrains. What is the difference and which one is preferable ?

Thank you.
0
ymailhot
Asked:
ymailhot
1 Solution
 
Victor SpiridonovCommented:
Trigger is actually a stored procedure, which is automatically fired on one of the following actions performed on the table:DELETE INSERT or UPDATE. DRI is a way to declare relationships between tables at the time, when table is created (declared). They perform the same thing, though trigger gives you  more control, since it allows you to have more functionality. for example, if you use DRI to check, that no orders can be entered for non-existing customers,and you try to insert an order,you will just receive standart error message, if you use trigger, you can create your own error message, and perform some addtional tasks.
0
 
ymailhotAuthor Commented:
Thank you.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now