[Asterisk-Users] OT: Best DB

Steven Critchfield critch at basesys.com
Tue Mar 15 19:31:06 MST 2005


On Tue, 2005-03-15 at 19:04 -0600, Jon Gabrielson wrote:
> On Tuesday 15 March 2005 06:34 pm, Robert Hajime Lanning wrote:
> > <quote who="Giudice, Salvatore">
> >
> > > So, let me see if I am right. You run a support shop? You want your
> > > database to validate your data for you instead of leaving that logic
> > > to
> > > your application? Usually, a database is considered to be an asset
> > > worth
> > > protecting from unvalidated user input. Also, do you routinely try to
> > > insert text strings into fields, which are not created large enough to
> > > accept these strings? This is somewhat disturbing.
> >
> > Data validation should be done at all levels.  Period.
> 
> 
> Validating the SAME data at each level greatly decreases your speed.
> It is much simpler and easier to just validate it first.

Of course most of us want to follow DRY (Don't repeat yourself). In
doing so, you try and let one place be an authoritative source. The DB
should be authoritative as to what is correct.

You shouldn't have to babysit the DB to make sure it is doing the
correct thing. If you have to babysit it, it isn't worth it.
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list