Erwin 3.0 SQL Server, Update Trigger problem

Erwin 3.0 SQL Server, Update Trigger problem

Post by David Pylatu » Wed, 22 Apr 1998 04:00:00



I am using erwin 3.0 to create and maintain a SQL Server 6.5 database,
Erwin
generates the database no problem. The problem I am having is related to
all
of my Update triggers on the database.

I have many parent-child relationships in the database. For example:

Project Category                            Project Type
------------------                           --------------------------
category_code                                project_type_code
category_desc                                 project_type_desc
                                                       category_code

There is a foriegn key relationship between category_code in these
2 tables.

When category code is updated in the project_category table I want
this change to cascade to all rows in the project_type table, sounds
simple right ! The trigger generated by Erwin appears to try and delete
the category_code before updating/re-inserting it ???

Am I choosing the wrong options on the generate database window ??

Any help would be greatly appreciated

Dave Pylatuk

 
 
 

Erwin 3.0 SQL Server, Update Trigger problem

Post by Michael Yocc » Fri, 24 Apr 1998 04:00:00


Foreign keys fire before triggers fire.  This means that when you
want any form of exception processing, you cannot use a foreign
key.  For this reason I standardize on triggers to enforce RI.
There is a performance gain for doing so.

P.S. There is an ERwin listserv at www.infoadvisors.com
--
Michael Yocca
SQL Server and ERwin Consultant
Ace Database www.acedb.com
Where data quality helps to prevent rework



Quote:> I am using erwin 3.0 to create and maintain a SQL Server 6.5 database,
> Erwin generates the database no problem. The problem I am having is
> related to all of my Update triggers on the database.

> I have many parent-child relationships in the database. For example:

> Project Category                            Project Type
> ------------------                           --------------------------
> category_code                                project_type_code
> category_desc                                 project_type_desc
>                                                        category_code

> There is a foriegn key relationship between category_code in these
> 2 tables.


 
 
 

1. Connecting Erwin 3.0 to Sybase Sql Server 11

I'm new to Sybase, having worked mostly with Oracle.  I'm trying to
model a database for a new application and am using Erwin 3.0 as my
modeling tool.  I'm not able to get Erwin to connect to my Solaris
based Sybase database due to the lack of the libct.dll and/or
libsybdb.dll.  My question is: Where can I get these libraries for a
Windows 95 system?

I've downloaded the evaluation copy of Adaptive Server thinking it may
have the libraries, but it doesn't appear to.

Thanks in advance,

Mike Shoop

2. How to configure agents for 8.05 on Linux ?

3. Problems with ErWin trigger templates

4. INGRES under OS/2

5. Problems with ErWin generated table trigger naming

6. Using a LIST with IN CLAUSE

7. update trigger on linked server (sql server 7.0)

8. paging in sprocs?

9. Need Help with ODBC/MS SQL Server 6.5/Peer Web Server 3.0/Frontpage Problem

10. Updating a SQL Server Database via VB 3.0

11. Error doing update with VB 3.0 and SQL Server 6.5

12. Error during update of a dynaset with VB 3.0 and SQL Server 6.0