I think it depends on the application. A lot of small web apps simply don't need any kind of normalization, and it really does make sense to put everything in one table, or a couple of unlinked tables. Therefore, on those apps, there's no need for foreign keys. For instance: I used one in-house application that had two tables: A list of authorized users with their passwords and a couple of other things (administrative role, security level, things like that), and a table that contained information about computers used in the the department. Sure, some of the users had a computer in the department, but not all of them. So there was really no need to link the tables. And since the information stored about the computers was stuff like owner, name, MAC, and IP address, there was no need for foreign keys in that table either: it just wouldn't make sense.
Now, anything much more complex then that there's going to be some value in using foreign keys, whether formally (constraints set in the DB) or informally (constraints imposed in the web interface), but it's quite possible the guy had never worked on something where they were needed. -Andy . On Thu, Jul 4, 2013 at 10:20 AM, Lester Caine <les...@lsces.co.uk> wrote: > Richard Quadling wrote: > >> Is there a difference in those in 'startups' and web only situations, or >> those doing more traditional development (split that as you like - I'm >> just >> trying to get an understanding and not go off on one!). >> > > Depends if you consider MySQL is any use as a real database :) > Building the constraints and many other core database features into the > code was essential before MySQL had many of the features that real > databases have had from the start ... > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - > http://lsces.co.uk/wiki/?page=**contact<http://lsces.co.uk/wiki/?page=contact> > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - > http://rainbowdigitalmedia.co.**uk<http://rainbowdigitalmedia.co.uk> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >