?
Solved

Triggers or DRI

Posted on 1998-11-21
2
Medium Priority
?
1,066 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:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

765 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