Bluehost.com Web Hosting $6.95

Foreign Keys - advantage ?

This is a discussion on Foreign Keys - advantage ? within the MySQL Database forums, part of the Database Forums category; As a newbie to SQL I guess the only advantage I can see of setting up Foreign Keys is to ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2007
NA news
 
Posts: n/a
Default Foreign Keys - advantage ?

As a newbie to SQL I guess the only advantage I can see of setting up
Foreign Keys is to help ensure you don't get left with 'orphan' rows, right
?
TIA,
Nick A


Reply With Quote
  #2 (permalink)  
Old 02-20-2007
Paul Lautman
 
Posts: n/a
Default Re: Foreign Keys - advantage ?

NA news wrote:
> As a newbie to SQL I guess the only advantage I can see of setting up
> Foreign Keys is to help ensure you don't get left with 'orphan' rows,
> right ?
> TIA,
> Nick A


Things like "cascade on delete" save programming


Reply With Quote
  #3 (permalink)  
Old 02-21-2007
Robert Klemme
 
Posts: n/a
Default Re: Foreign Keys - advantage ?

On 20.02.2007 22:09, Paul Lautman wrote:
> NA news wrote:
>> As a newbie to SQL I guess the only advantage I can see of setting up
>> Foreign Keys is to help ensure you don't get left with 'orphan' rows,
>> right ?
>> TIA,
>> Nick A

>
> Things like "cascade on delete" save programming


.... and make the DB maintain consistency automatically.

robert
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0