| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |
|

10-02-07, 17:33
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 6
|
|
|
referential integrity
|
|
Can anyone give me an example why not to enable referential integrity in a relationship?
Thannk you.
|
|

10-02-07, 18:11
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
um.....
as jerome howard once famously said, "i'm tryna think but nothin happens!"
|
|

10-02-07, 19:28
|
|
www.gvee.co.uk
|
|
Join Date: Jan 2007
Location: UK
Posts: 10,156
|
|
|
|
Errrr.... You only have one table? 
|
|

10-02-07, 20:32
|
|
Resident Curmudgeon
|
|
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
|
|
Quote:
|
Originally Posted by sakfree
Can anyone give me an example why not to enable referential integrity in a relationship?
|
You have already signed with another employer, and you bear GREAT ill-will toward your soon-to-be-former co-workers?
-PatP
|
|

10-04-07, 21:12
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 6
|
|
Quote:
|
Originally Posted by Pat Phelan
You have already signed with another employer, and you bear GREAT ill-will toward your soon-to-be-former co-workers?
-PatP
|
more details please, i don't understand your example
thanks
|
|

10-05-07, 04:48
|
|
King of Understatement
|
|
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
|
|
Relationships without integrity will never last and will leave you feeling a little dirty afterwards.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
|
|
|

10-05-07, 05:05
|
|
Jaded Developer
|
|
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
|
|
Quote:
|
Originally Posted by pootle flump
Relationships without integrity will never last and will leave you feeling a little dirty afterwards.
|
but just as equally relationships without integrity can also have their uses, in the absence of the integrity they may be good enough (or even as good) if you take adequate precautions
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
|
|

10-05-07, 06:15
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Sussex, England
Posts: 404
|
|
Laziness?
(You didn't say good example.)
|
|

10-05-07, 06:33
|
|
www.gvee.co.uk
|
|
Join Date: Jan 2007
Location: UK
Posts: 10,156
|
|
Quote:
|
Originally Posted by sakfree
Quote:
|
Originally Posted by Pat Phelan
You have already signed with another employer, and you bear GREAT ill-will toward your soon-to-be-former co-workers?
-PatP
|
more details please, i don't understand your example
thanks
|
that's genius!
Sakfree; Pat is basically saying to do it out of spite
Quote:
|
Originally Posted by pootle flump
Relationships without integrity will never last and will leave you feeling a little dirty afterwards.
|
Cynic  :hug:
Quote:
|
Originally Posted by healdem
but just as equally relationships without integrity can also have their uses, in the absence of the integrity they may be good enough (or even as good) if you take adequate precautions
|
See corral 
|
|

10-05-07, 08:05
|
|
Resident Curmudgeon
|
|
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
|
|
Quote:
|
Originally Posted by sakfree
more details please, i don't understand your example
|
Think of creating a database without using referential integrity as a kind of "time delayed industrial sabotage" where you know that things will come to a crashing halt, but you're betting that they won't crash before you leave and that no one will realize that you are the culprit.
-PatP
|
|

10-05-07, 08:49
|
|
Window Washer
|
|
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
|
|
Are you guys kidding...I've seen so many damn 3rd party products that have none.
What the do is that they use the applicaion to enforce integrity...which in my opinion is a mistake
It means the database design is not fully thought out
But it is prevelant out there
I need to get another job
|
|

10-06-07, 18:41
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 6
|
|
|
An example
|

10-06-07, 19:18
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
I've been working with financial databases for over 20 years - I've only ever come across a couple that had any mention of primary or foreign keys. I can only assume that nobody here produces databases for banks. To be fair though I can't think of a reason why they didn't have RI built in.
I was going to list a whole bunch of different design approaches that make it difficult to use foreign keys but I won't as I can't be arsed with the flaming I'll get.
Mike
|
|

10-07-07, 10:22
|
|
Moderator.
|
|
Join Date: Sep 2002
Location: UK
Posts: 5,171
|
|
Quote:
|
Originally Posted by mike_bike_kite
I've been working with financial databases for over 20 years - I've only ever come across a couple that had any mention of primary or foreign keys. I can only assume that nobody here produces databases for banks. To be fair though I can't think of a reason why they didn't have RI built in.
|
Perhaps because they were built long ago when many DBMSs didn't actually support constraints, and nobody has decided to add them retrospectively? I can't imagine there is anything special about banking business that makes data integrity undesirable.
Quote:
|
Originally Posted by mike_bike_kite
I was going to list a whole bunch of different design approaches that make it difficult to use foreign keys but I won't as I can't be arsed with the flaming I'll get.
|
Go on, make our day 
Actually, foreign keys aren't always the ideal constraint - the lack of support for more complex types of constraint sometimes forces database designers into adding spurious columns just so that a foreign key can be contrived to do the job.
|
|

10-07-07, 10:27
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
Quote:
|
Originally Posted by andrewst
Go on, make our day 
|
geez, tony, didja hafta?
well, i'm outta this thread...
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|