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

2013-07-05 Thread Lester Caine
Tony Marston wrote: Certainly in some instances then managing everything in code makes sense. Cross database working for instance. So everything works the same for each engine. But the main advantage of adding constraints in the database is that it protects the foreign entries from being deleted

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

2013-07-05 Thread Tony Marston
"Lester Caine" wrote in message news:51d6987c.9050...@lsces.co.uk... Tony Marston wrote: I was designing and building database applications before relational databases became popular, and in those old hierarchical and network databases there were no such things as foreign key constraints. Dat

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

2013-07-05 Thread Lester Caine
Tony Marston wrote: I was designing and building database applications before relational databases became popular, and in those old hierarchical and network databases there were no such things as foreign key constraints. Database integrity had to be handled in the code, which is what we did. When

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

2013-07-05 Thread Tony Marston
"Tamara Temple" wrote in message news:557a0092-2b7d-49f4-ae3d-593968dd3...@gmail.com... On Jul 4, 2013, at 8:02 AM, Jim Giner wrote: 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 worke

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

2013-07-04 Thread musicdev
On Thu, Jul 4, 2013 at 4:20 PM, Tamara Temple wrote: > > On Jul 4, 2013, at 8:02 AM, Jim Giner > wrote: > > > 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

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

2013-07-04 Thread Tamara Temple
On Jul 4, 2013, at 8:02 AM, Jim Giner wrote: > 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". >> >>

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

2013-07-04 Thread Andy McKenzie
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

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

2013-07-04 Thread Lester Caine
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 :) Bui

[PHP] Web dev, DB and "proper db design".

2013-07-04 Thread Richard Quadling
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