Foreign Keys
Posted: Fri Dec 07, 2007 6:43 pm
Hey everyone!
When is it a good idea to use foreign keys and are they necessary?
When is it a good idea to use foreign keys and are they necessary?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
I guess I don't understand your question. If you need to refer to a record in another table, the only way I know to do it is by using a foreign key. So it's not a matter of "a good idea". If you need to do that, it's absolutely necessary. If you don't, the concept doesn't even exist.arpowers wrote:When is it a good idea to use foreign keys and are they necessary?
I think he means the actual instruction to specify that a Key is foreign, not the concept of a foreign key.califdon wrote:I guess I don't understand your question. If you need to refer to a record in another table, the only way I know to do it is by using a foreign key. So it's not a matter of "a good idea". If you need to do that, it's absolutely necessary. If you don't, the concept doesn't even exist.arpowers wrote:When is it a good idea to use foreign keys and are they necessary?
I have personally found no use for foreign keys in MySQL databases, but they have a very good use in Access databases or SQL Server...arpowers wrote:When is it a good idea to use foreign keys and are they necessary?
What's so different about foreign keys in mysql and mssql?emmbec wrote:I have personally found no use for foreign keys in MySQL databases, but they have a very good use in Access databases or SQL Server...arpowers wrote:When is it a good idea to use foreign keys and are they necessary?
No man is an island, no man stands alone: Relationship always matters to relate others![]()