Re: [PHP-DB] Foreign Key Versus Table Index

2008-10-02 Thread Bastien Koert
On Thu, Oct 2, 2008 at 6:50 AM, Jack van Zanen <[EMAIL PROTECTED]> wrote: > I am not up to scratch with innodb, but in oracle > you would have a Primary key on both the id fields in the Car and person > table and a Foreign key on PersonId linking it to Id in the Person table. > > IN your select a

Re: [PHP-DB] Foreign Key Versus Table Index

2008-10-02 Thread Jack van Zanen
I am not up to scratch with innodb, but in oracle you would have a Primary key on both the id fields in the Car and person table and a Foreign key on PersonId linking it to Id in the Person table. IN your select an index on PersonId would be beneficial if the tables get large. Jack 2008/10/2 J

[PHP-DB] Foreign Key Versus Table Index

2008-10-02 Thread J Hussein
Hi, I'm slightly confused about foriegn keys and indexes on mysql innodb tables. Foreign key constraints create a reference between two tables and indexes make queries on a particular table faster if the index is on a field in the where or order by clause. My question was whether say for the