?
Solved

Triggers or DRI

Posted on 1998-11-21
2
Medium Priority
?
1,086 Views
Last Modified: 2012-06-27
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
Comment
Question by:ymailhot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
Victor Spiridonov earned 400 total points
ID: 1091924
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
 

Author Comment

by:ymailhot
ID: 1091925
Thank you.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question