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: Re: datamodelling question: updating foreign keys

Re: Re: datamodelling question: updating foreign keys

From: <ryan_oracle_at_cox.net>
Date: Thu, 06 Nov 2003 10:14:24 -0800
Message-ID: <F001.005D5D96.20031106101424@fatcity.com>


i like that. you then have a table that lists 'available trucks' and you have a key constraint from the cargo_detail to the truck table.

you can also archive when changes happen for history data. I like that one.
>
> From: "AK" <oramagic_at_hotmail.com>
> Date: 2003/11/06 Thu PM 12:19:26 EST
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Subject: Re: datamodelling question: updating foreign keys
>
> Well ,
>
> How about cargo as table with primary key say cargo_id which unqiely
> identifies cargo and weight . Now you should have a cargo detail table that
> will have cargo_id , load , truck_id .
>
> So
>
> Cargo
> ---------
> cargo_id
> total_load
> date
> blah
> blah
>
>
>
> cargo_detail
> -------------
> cargo_id
> truck_id
> load
> date_delivered
> blah
> blah
> from
> to
>
>
> This takes care of split cargo ( consigment ) .
>
> -Ak
>
>
>
>
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> Sent: Thursday, November 06, 2003 6:44 AM
>
>
> > 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: AK
> INET: oramagic_at_hotmail.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).
>

-- 
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).
Received on Thu Nov 06 2003 - 12:14:24 CST

Original text of this message

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