Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can ORACLE do this?
If you create a MANUFACTURER_COLOR table with the COLORs allowed for each MANUFACTURER and a GO_BETWEEN table with the SERIAL_NO, MANUFACTURER and COLOR for each SERIAL_NO, you will be able to create a FK between GO_BETWEEN and MANUFACTURER_COLOR table. You can maintain the GO_BETWEEN table using an INSERT TRIGGER on MASTER_TABLE to insert a new SERIAL_NO and its MANUFACTURER into the GO_BETWEEN table with null as COLOR and an INSERT TRIGGER on DETAIL_TABLE to update the GO_BETWEEN table with the COLOR for a SERIAL_NO, assuming you always insert into MASTER_TABLE first.
HIH,
Aram Meguerian LHS Communications Systems +(55)(19) 741 13 72 ameguerian_at_us.lhsgroup.com aram.meguerian_at_tess.net.br ameguerian_at_yahoo.com --------------------------------------------You had some happiness once, but your
Rudy Fernandes wrote in message <936192711.1538189548_at_news.pathcom.com>...
>Can't you have a foreign key constraint (manufacturer, color) on your
detail
>table referencing the 'master colors table'?
>
>Or have I missed something?
>
>Rudy
>
Received on Thu Sep 02 1999 - 14:34:50 CDT
![]() |
![]() |