One possible exception might be HABTM tables, consisting of just the
foreign keys to the related tables. MySQL only supports clustering on the
primary key and using a composite primary key would give you a covered
index, which in theory should perform a bit better. Though in practice, I
have no
On 07/08/12 01:40, Lightee wrote:
I notice that CakePHP does not allow composite primary key. Why is
this so? Is it because composite primary keys are bad for some reason
or is it simply to stick to convention? I have been using MS Access
and there is no such restriction.
--
Our newest site fo
A generalised statement: composite primary keys are bad. Each table should have
a single field primary key that uniquely identifies 'this row'. If the table
holds information that represents the intersection of two (or more) other
tables, add them as additional fields with indexes on each with a
I notice that CakePHP does not allow composite primary key. Why is this so?
Is it because composite primary keys are bad for some reason or is it
simply to stick to convention? I have been using MS Access and there is no
such restriction.
--
Our newest site for the community: CakePHP Video Tut