Re: Why is composite primary key bad?

2012-08-08 Thread Mark Wratten
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

Re: Why is composite primary key bad?

2012-08-07 Thread Steve Found
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

Re: Why is composite primary key bad?

2012-08-06 Thread Jeremy Burns | Class Outfit
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

Why is composite primary key bad?

2012-08-06 Thread Lightee
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