home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / sybase / 18 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  2.2 KB

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