Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: datamodelling question: updating foreign keys

Re: datamodelling question: updating foreign keys

From: Thomas Day <tday6_at_csc.com>
Date: Thu, 06 Nov 2003 09:44:25 -0800
Message-ID: <F001.005D5D8E.20031106094425@fatcity.com>

Have a table SHIPMENTS. When a CARGO moves to another TRUCK it becomes a new SHIPMENT. SHIPMENTS has foreign keys to TRUCKS and CARGOES.

                                                                                                                                       
                      <ryan_oracle                                                                                                     
                      @cox.net>                To:      Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>                    
                      Sent by:                 cc:                                                                                     
                      ml-errors                Subject: datamodelling question: updating foreign keys                                  
                                                                                                                                       
                                                                                                                                       
                      11/06/2003 09:44                                                                                                 
                      AM                                                                                                               
                      Please respond                                                                                                   
                      to ORACLE-L                                                                                                      
                                                                                                                                       
                                                                                                                                       




I remember seeing this question asked on another forum some time back. I dont like the solution the guy had and Im wondering how some of you might solve problem. Im giving a low level generic example.

Lets say you have a parent-child relationship. The parent table is 'TRUCKS' and the child table is 'CARGO'. The foreign key to CARGO tells which truck the cargo is loaded on. When the cargo is moved to another truck, the foreign key is updated.

I dont like this approach. it causes contention. what is a better way to design this?

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: <ryan_oracle_at_cox.net
  INET: ryan_oracle_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Thomas Day INET: tday6_at_csc.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Thu Nov 06 2003 - 11:44:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US