BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RI Question: Declarative vs Trigger

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Isaac Alexander
Guest





PostPosted: Tue Dec 12, 2006 6:43 am    Post subject: RI Question: Declarative vs Trigger Reply with quote



I am using SQL Server 7, 2000 and 2005.

All of my cascading RI is handled via triggers (generated by data modeller).

From a performance point of view (100 million plus recs in a table), is it
better to use declarative RI or trigger RI?

The reason I ask is because I currently still support SQL 7 and I would like
to avoid separate app versions of the database per SQL Server version.
Back to top
Dan Palley
Guest





PostPosted: Tue Dec 12, 2006 6:51 am    Post subject: Re: RI Question: Declarative vs Trigger Reply with quote



"Isaac Alexander" <isaacNOSPAM (AT) goNOSPAMprocura (DOT) com> wrote in message
news:457dfaa4$1 (AT) newsgroups (DOT) borland.com...
Quote:
I am using SQL Server 7, 2000 and 2005.

All of my cascading RI is handled via triggers (generated by data
modeller).

From a performance point of view (100 million plus recs in a table), is it
better to use declarative RI or trigger RI?

The reason I ask is because I currently still support SQL 7 and I would
like to avoid separate app versions of the database per SQL Server
version.

I know for Interbase, triggers don't operate under the same transactional
context as relational constraints, so they are not the same. Not sure about
SQL Server, though.

Dan
Back to top
Oliver Townshend
Guest





PostPosted: Tue Dec 12, 2006 8:07 am    Post subject: Re: RI Question: Declarative vs Trigger Reply with quote



Quote:
From a performance point of view (100 million plus recs in a table), is it
better to use declarative RI or trigger RI?

A trigger in SQL Server eliminates the ability to do in place updates,
because it instead has to do an insert and delete. However, you may be able
to code a trigger to affect locks etc. a lot less than declarative RI would.

If your declarative RI is simple, I'd stick with that. If it needs to be
specialized, triggers will be better.

Oliver Townshend
Back to top
Isaac Alexander
Guest





PostPosted: Tue Dec 12, 2006 10:41 pm    Post subject: Re: RI Question: Declarative vs Trigger Reply with quote

"Oliver Townshend" <oliveratzipdotcomdotau> wrote in message
news:457e0e99 (AT) newsgroups (DOT) borland.com...
Quote:
From a performance point of view (100 million plus recs in a table), is
it better to use declarative RI or trigger RI?

A trigger in SQL Server eliminates the ability to do in place updates,
because it instead has to do an insert and delete. However, you may be
able to code a trigger to affect locks etc. a lot less than declarative RI
would.

If your declarative RI is simple, I'd stick with that. If it needs to be
specialized, triggers will be better.


My triggers are only there for RI. Most are cascading or setting null.
Back to top
Dan Palley
Guest





PostPosted: Wed Mar 21, 2007 12:26 am    Post subject: Re: RI Question: Declarative vs Trigger Reply with quote

"Andrew V. Fionik" <ender (AT) sqlmaestro (DOT) com> wrote in message
news:45ff88c3 (AT) newsgroups (DOT) borland.com...
Quote:
Hello, Isaac!
You wrote on Mon, 11 Dec 2006 16:43:51 -0800:

IA> All of my cascading RI is handled via triggers (generated by data
IA> modeller).
IA> From a performance point of view (100 million plus recs in a table),
is
IA> it better to use declarative RI or trigger RI?

If your RI is simple then use declarative. Use triggers in complex places.

Depends on the database. For Interbase, RI and triggers don't work the same
way:

http://www.cvalde.net/document/declaRefIntegVsTrig.htm

Dan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.