Re: simple trigger problem ?

From: <rtproffitt_at_my-deja.com>
Date: 2000/05/09
Message-ID: <8f7m13$ght$1_at_nnrp1.deja.com>#1/1


Norab,

[Quoted] The theory is great for the classroom, but after that comes denormalization for a special purpose, such as speed, etc... This is different than blindly building a badly denormalized database...

The stored proc option would work this way: (I'm not sure how you define it in Designer) Create or replace FixMyAddress(custId number, AddrId number) as   PL/Sql....
  Cursor checkAddress is select.....etc
  Cursor checkcust is select ...etc
example:
Begin
  If ...theaddressdoesnotexist ....

      ... do the insert of new address ...   else

     etc etc etc

You would call it from Forms.

Leonhard's description reminds of something else... Your design might be a good candidate for a junction table such as:

Cust: CustID, name, type of cust, etc.
Addr: AddrID, address, city, state, etc.. Junction:

   customer-address: CustID, AddrID

This would allow a many-to-many relationship.

Good Luck,
Robert Proffitt
RTProffitt_at_beckman.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue May 09 2000 - 00:00:00 CEST

Original text of this message