Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: simple trigger problem ?
Norab,
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 CDT
![]() |
![]() |