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.

 
Go Back  dBforums > General > Database Concepts & Design > referential integrity

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-07, 17:33
sakfree sakfree is offline
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.
Reply With Quote
  #2 (permalink)  
Old 10-02-07, 18:11
r937 r937 is offline
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!"
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-02-07, 19:28
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Errrr.... You only have one table?
__________________
George
Twitter | Blog
Reply With Quote
  #4 (permalink)  
Old 10-02-07, 20:32
Pat Phelan Pat Phelan is offline
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
Reply With Quote
  #5 (permalink)  
Old 10-04-07, 21:12
sakfree sakfree is offline
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
Reply With Quote
  #6 (permalink)  
Old 10-05-07, 04:48
pootle flump pootle flump is offline
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.
Reply With Quote
  #7 (permalink)  
Old 10-05-07, 05:05
healdem healdem is offline
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
Reply With Quote
  #8 (permalink)  
Old 10-05-07, 06:15
Ryker Ryker is offline
Registered User
 
Join Date: Nov 2003
Location: Sussex, England
Posts: 404
Laziness?

(You didn't say good example.)
Reply With Quote
  #9 (permalink)  
Old 10-05-07, 06:33
gvee gvee is offline
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
__________________
George
Twitter | Blog
Reply With Quote
  #10 (permalink)  
Old 10-05-07, 08:05
Pat Phelan Pat Phelan is offline
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
Reply With Quote
  #11 (permalink)  
Old 10-05-07, 08:49
Brett Kaiser Brett Kaiser is offline
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
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #12 (permalink)  
Old 10-06-07, 18:41
sakfree sakfree is offline
Registered User
 
Join Date: Sep 2007
Posts: 6
An example

http://office.microsoft.com/en-us/te...aspx?av=ZAC000

These are templates for access 2003, see the "Classroom management database" relationships

The relationship "Classes" and "Instructors"
Reply With Quote
  #13 (permalink)  
Old 10-06-07, 19:18
mike_bike_kite mike_bike_kite is offline
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
Reply With Quote
  #14 (permalink)  
Old 10-07-07, 10:22
andrewst andrewst is offline
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.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #15 (permalink)  
Old 10-07-07, 10:27
r937 r937 is offline
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...
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On