[UPHPU] Table Relationships

cole at colejoplin.com cole at colejoplin.com
Tue Apr 10 22:57:07 MDT 2007


Quoting John David Anderson <uphpu at johndavidanderson.net>:

> I'd
> like to hear why if anyone sees the need: to me though referential
> integrity restraints at the DB level are as necessary as JS validation.
> It needs to happen at the application level anyway.

Given my experience with boneheaded programmers and users, I trust no  
one. If I have a referential DB available, I use it. When not, it's  
good to remember that referential cuts both ways, like one-to-many  
records and lookup records/ids. Both is good, even if it's more effort.

I've used both JS and server-side validation. To me, JS validation has  
as much to do with a convenience for the user, as the server. Why make  
someone wait 30 seconds on dialup for a bad zip code message, or a  
required field? Both is good, even if it's more effort.

To me, it's worth the extra effort to protect your data AND have a  
positive user experience.

-- Cole





More information about the UPHPU mailing list