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: Allen Kirby <akirby_at_att.com>
Date: 1997/02/28
Message-ID: <33171F04.7EB9@att.com>#1/1

Internet Coop wrote:
<snip>
>
> 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..
<snip>

This is why you should not pick primary keys that can change. The answer to your original question is that Oracle doesn't do this for you, but you could do it yourself.

But if I can address your original design, I think it's flawed. What you have is:

Person (SSN)
Car (VIN)
Car Parts (VIN, Part#)

Now you want to record who owns what car. You create a new table to show who owns which cars:

Car Owner (SSN, VIN)

Now if the SSN changes, you only have to change the Person and Car Owner tables, and you haven't cascaded the SSN to the Car or Car Parts tables. If you do that then you're denormalizing and that's the penalty you sometimes pay for denormalizing.

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Fri Feb 28 1997 - 00:00:00 CST

Original text of this message

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