I notice that everyone using Cake seems to use autoincrementing integer primary keys. However this means you always have to join the code files for all queries and reports because the keys don't mean anything (unless you can memorize lots of numbers).
In the past I have successfully used more recognisable alphanumeric primary keys, and I appreciate that one must manage these manually but it makes end-user reporting much more intuitive. e.g. Contacts id Lastname Contacttype_id --- -------------- --------------------- 1 Fred TELE 2 Joe MEET 3 Alan MAIL ....etc Contacttypes id Name Status --- ----------- ---------- TELE Telephone Call A MEET Meeting B MAIL Email A ....etc The users are using an end-user reporting application and will be able to make a simple query on the Contacts table which will provide the info he needs without making any joins. In fact the user wouldn't need to know about joins unless for example he needs to get the 'status' in which case his supervisor can assist. My questions are: 1. Is the 'cost' of having non-standard primary keys too great a price to pay in terms of losing some of Cake's built-in power? I'm not even sure what functionality we might miss. 2. Clearly the above tables are greatly simplified; the real-life tables would require many joins. If I don't use the alphanumeric keys, I would have to go around and teach a lot of people how to join up the tables to make their reports. Does everyone advocate teaching end-users about the principles of the SQL SELECT? I am sure that I'm not the first to have this dilemma, but maybe someone might give me a bit of advice based on their own experience? D --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---