Re: Web dev, DB and "proper db design".

From: Date: Thu, 04 Jul 2013 13:02:58 +0000
Subject: Re: Web dev, DB and "proper db design".
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-321523@lists.php.net to get a copy of this message
On 7/4/2013 6:42 AM, Richard Quadling wrote:
Hi. I've just had a conversation regarding DB, foreign keys and their benefits. I was told "I've never worked on a web application where foreign keys were used in the database". As someone who has spent 25 years working on accounting/epos systems on MS SQL Server (yep, windows) and now in a web environment and hearing the above, ... well, ... slightly concerned. So, in the biggest broadest terms, what do you lot do? DBs with no foreign keys (constrainted or not). ORM builders with manual definition of relationships between the tables. Inline SQL where you have to just remember all the relationships. Views for simple lookups? How do you handle updatable views (does mysql support them?) etc. 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!). No definitive answers, and I hope I get some wide experiences here. Thanks for looking. Richard. I"m going to guess that your source of such drivel never learned about such things. Probably thinks that a 'key' has to be defined as such in the db, whereas we know what a FK really is.
Don't worry. As a former big iron guy and then a c/s guy and now a (new) web guy, things haven't changed.

« previous php.general (#321523) next »