Hi Adrian

> Is this still true for Cake 1.2.x.x ?

Given the trac link that I posted, I think it is unlikely that you will 
find support for it in 1.2.


> You might find this article interesting. It is about surrogate primary
> key ( 'id' - integer )
> which are sometimes convenient (from a performance point of view) but
> are in fact
> an evil compromise because such a primary key *does* allow row duplicates :
> 
> http://blogs.ittoolbox.com/database/soup/archives/primary-keyvil-part-i-7327?rss=1

Interesting article.  I understand the reasoning.

My personal opinion is basically irrelevant given that I have nothing to 
do with the core development of Cake.  However, personally I don't 
really see a problem with surrogate primary keys (given good business 
logic).

The business logic of the applications that I develop deal with the 
issue of uniqueness based on exactly the kind of rules that the article 
specified, so I don't have a problem.  It would be nice to have the 
option of a primary key that double check the uniqueness, but I don't 
miss it.

Also worth noting is (as the article points out) composite primary keys 
incur a performance cost.  So, given that I am already checking 
uniqueness in the business logic, I will take the performance gain of 
surrogate primary keys and keep checking the data in the business logic.

Regards,
Langdon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to