sorry, that example i have gave is wrong, just replace "customer" with "order".
On Mon, Mar 15, 2010 at 5:11 PM, anru chen <[email protected]> wrote: > do not know any situations, we must use "composite primary keys" to > make a database working. > > i can think about one case, "composite primary keys" is very useful: > > modeling many to many relation. > example: > customer and product relation, we usually has a order_line table as > associative table , the order_line table > will use cutomer id and product id as primary key. > > if the cakephp does not support "composite primary keys", do not use it. > Do not know why cake php does not supports "composite primary keys". > > On Mon, Mar 15, 2010 at 4:11 PM, Aaron Cooper <[email protected]> wrote: >> I've seen them alot, worked with them rarely. I was just hoping to open a >> discussion with people working with experienced DBA's regarding today's >> standing on the use of composite primary keys. >> >> I ask, as I have been given a schema to work with, and will be using a >> framework for development. CakePHP doesn't support composites at all, and I >> read alot of troubles in other frameworks to work around them. (to the point >> of hand rolling queries) >> >> Call me lazy, but it just seems to me that in most cases, a singular PK can >> be found for pretty much any table. But are they are must in certain >> situations? >> Regards >> Aaron Cooper >> >> -- >> NZ PHP Users Group: http://groups.google.com/group/nzphpug >> To post, send email to [email protected] >> To unsubscribe, send email to >> [email protected] > -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
