Help - Search - Members - Calendar
Full Version: Foreign Key
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
Xproject
Hello! Sorry for my english but I have a problem and I must find a solution. So.. it's about foreign keys and what is the procedure to insert some of them. Is somebody who can help me ? I have 4 tables with InnoDB but I can't find the foreign key button in phpMyAdmin mellow.gif . Thx and have a nice day!
Aura
QUOTE(Xproject @ Jan 31 2008, 12:08 PM) *
Hello! Sorry for my english but I have a problem and I must find a solution. So.. it's about foreign keys and what is the procedure to insert some of them. Is somebody who can help me ? I have 4 tables with InnoDB but I can't find the foreign key button in phpMyAdmin mellow.gif . Thx and have a nice day!


Need too! How to change the type in InnoDB
jeffreylee
When add a foreign key for any of the table , it is very important to check the primary key for that particular table whether each and every value of that table has matched or not. So first of all you need to have that value in primary key then only add that value in foreign key
Aura
QUOTE(jeffreylee @ Jan 18 2011, 03:58 PM) *
When add a foreign key for any of the table , it is very important to check the primary key for that particular table whether each and every value of that table has matched or not. So first of all you need to have that value in primary key then only add that value in foreign key


Do you know how to transform mylSam in innoDB with zymic manager?

I don't think Xproject will see this post( 3years ago)
ruby1058
To insert the foreign key there it should be compulsory to that table on which you are trying to give reference that table must contain primary key. And the name of the column and size in both the table is same otherwise it will give problem.
vistacollege1
Foreign keys really help us in establishing relationship when an entity has the same id in two different tables
yuanyelss
It is very important to check the primary key for that particular table whether each and every value of that table has matched or not..
moisesgayle
really a nice post here my opinion that corresponding columns in the foreign key and the referenced key must have similar internal data types inside InnoDB so that they can be compared without a type conversion. The size and sign of integer types must be the same. The length of string types need not be the same. For nonbinary (character) string columns, the character set and collation must be the same.
PeterMartin
to insert the Foreign keys there is one rule that is the primary key should be present in the table.
Braamsmith
How to work with foreign key?
Markmatt
QUOTE(Xproject @ Jan 31 2008, 12:08 PM) *
Hello! Sorry for my english but I have a problem and I must find a solution. So.. it's about foreign keys and what is the procedure to insert some of them. Is somebody who can help me ? I have 4 tables with InnoDB but I can't find the foreign key button in phpMyAdmin :mellow: . Thx and have a nice day!


you don't need to put the foreign key on any table assign a primary key then refer that primary key to another table so that attribute of column acts as foreign key of another table.fro more information you can go through w3schools and http://www.americanrattan.com/
johnpitter
If you want to add foreign key. you must need to add primary key in you master data base, where the actual data will be captured or fetched.
advindevis
Foreign key is used to authorize the relation between the tables. It is a key aspect in a table that references a primary key in addition table. These keys are used to analyze a accord for the rows of altered tables.
mzain
how to work with foreign innodb?
i did use mysql
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.