On Jan 10, 2007, at 10:29 AM, Matt Adams wrote:
> > keymaster wrote: > >> A final question: how important are REAL foreign keys in the >> database, >> if you are using cake associations. Are they superfluous? Are they >> still needed? > > It depends on what you're doing. > > They are extremely important if your database offers read-write access > to more than one application from the same set of tables. A large > majority of those who have swallowed the Rails-like pill have never > worked with large-scale databases and do not understand the > necessity of > enforcing integrity with foreign keys, triggers and stored procedures. I've always had mixed feelings about this: in some ways using triggers, stored procedures and the like seem to me like spreading your application logic in too many places. I can see where they'd be useful though, too. : / > On the other hand, if your database isn't mission critical or if you > only have one application accessing your core tables then you can do > away with these sorts of things BUT you need to be certain that your > application is enforcing any rules as need be. A proper database will > usually do these things much better than you will and I would hazard a > guess that they contain fewer bugs then your application logic (or > rather, that their bugs are better documented). Just be sure your app knows how to deal with integrity failures. > Some systems (as in Siebel and friends) do not use foreign keys but > provide a set of integration tables that are used by external > systems to > populate and manipulate the data in the core set of tables; these > tables > are often handled by batch processes of some kind. > > I don't believe that Cake reads and understands foreign keys at this > time... I would hope that this would be the case at some point but it > may not happen for a while (or ever, depending on how the Cake > developers feel about this). I'd imagine its a little lower on the priority list, mostly due to the fact that different engines handle things so differently, but Nate and PhpNut will have to give the definitive answer on this one. -- John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---