Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Use of Foreign Key References...
Old 08-20-2006, 11:24 PM Use of Foreign Key References...
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Can somebody explain to me how MySQL Foreign Key and References work and what do they do? Trying to look it up, but have not found any good documentation that explains how it works and the benifits from it.

__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-21-2006, 07:39 AM Re: Use of Foreign Key References...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
In MySql only InnoDB tables support Foreign Key and Reference. So if you don't use InnoDB (the default is MyISAM) it's of absolutely no use at all.

FKs and references are about relationships between tables and to maintain referential integrity when deleting records.
Normally a FK would be the PK (Primary Key) of the table you are creating a relation with

FOREIGN KEY (column_in_table) REFERENCES parent_table(parent_field)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Use of Foreign Key References...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43305 seconds with 12 queries