home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!news2me.ebay.sun.com!jethro.Corp.Sun.COM!oogoody!tmhoff
- From: tmhoff@oogoody.Corp.Sun.COM (Todd Hoff)
- Newsgroups: comp.databases.sybase
- Subject: Re: Using NULLS
- Date: 16 Sep 1992 00:49:27 GMT
- Organization: Sun Microsystems, Inc.
- Lines: 30
- Distribution: world
- Message-ID: <lbd14nINNied@jethro.Corp.Sun.COM>
- References: <1992Sep15.224327.26827@muug.mb.ca>
- Reply-To: tmhoff@oogoody.Corp.Sun.COM
- NNTP-Posting-Host: oogoody.corp.sun.com
-
- In article 26827@muug.mb.ca, dmenns@muug.mb.ca (Darren Enns) writes:
- >It has lately been proposed at work -- just prior to going whole hog into
- >Sybase client/server application development -- that the DBA's allow the
- >use of blanks (and zeros) instead of forcing NULLS. Since I am one of
- >those DBA's, I need some 'real world' feedback from other DBA's to justify
- >my position of using NULLS, otherwise I will be accused of simply insisting
- >on an 'acedemia' concept that is impractical in the real world. I am
- >already aware of the classic reason for NULLS -- meaningful number
- >calculations. I plead for more feedback -- either pro or con -- so that
- >either I can justify my position or feel comfortable in abandoning it.
- >Thanx!
-
- You are righter than right! Tell the developers to build in a presentation
- layer that mediates between the app and the database. This is good modular
- programming practice. My guess is they don't want to filter user input.
- I've been on both sides. The presentation layer takes care of all problems
- both sending data to the database and getting data back out. Write a script
- that parses the DDL to create structures and the correct routines.
-
- For more technical reasons accepting blanks and 0s is loosing information.
- Most likely someone doesn't mean a field has a value of 3 blanks, but that the
- field has no value at all. Sloppy data handling means you won't be able to
- tell between the two cases. It's very bad practice to use data as a flag. Also, have
- you ever tried to search on fields that have a variable numbers of blanks in
- them? Yuck. What about the sort orders? Another point is that it is very
- difficult to debug when important fields can be blank, you can't just visually
- inspect the data and see what the values are.
-
- Don't let lazyness win.
-
-