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

Home -> Community -> Usenet -> c.d.o.server -> Re: FK relations...

Re: FK relations...

From: Internet Coop <coop_at_greystoneapts.com>
Date: 1997/02/27
Message-ID: <5f4m7p$ipk@dnews.pbi.net>#1/1

Sure let me do a little better job of explaining..

Three tables:
Person
car
Car Parts

Primary Keys
Person:
SSN CAR:(Information about a persons car)
SSN
VIN number

Car Parts:
SSN
Vin number
part number

Now imagine there a 10,000 records in car parts for one car record. Imagin also that a person can have 3 cars. Now if a persons SSN changeses and cascade update is on you have to update 30,000 records. Does oracle have a method internally to deal with this? Like store pointers rather than field values..etc..

>>>
>I was wondering if Oracle can do an optimization so that foreign keys
>are stored as fake keys rather than the actual fields themselves.
>This way cascade updates on key fields would not need to be
>replicated. I know that this could be done manually, but if the
>database suports it, that seems like a better design way to go.
><<
 

>I am not sure I understand the benefit of this. Oracle uses indexes to
>support the foreign key checks/relationships. If you update a column in a
>table that has a foreign key constraint on it then referenced column must
>be cheched for the new value being valid. Storing a fake key in the table
>would take space and require overhead for changes made to the referenced
>table. If just seems you would end up moving the costs of checking
>referenced columns from one operation to another.
 

>As I said I am not sure I understand what you are asking so if my
>conclusions miss the mark then maybe you could explain a little more.
 

>Mark Powell -- The only advise that counts is the advise that you follow
>so follow your own advise
Received on Thu Feb 27 1997 - 00:00:00 CST

Original text of this message

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