home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!ames!pacbell.com!pacbell!osc!jgk
- From: jgk@osc.COM (Joe Keane)
- Newsgroups: comp.databases
- Subject: Re: DB Comparison - DISAPPOINTING RESULTS
- Summary: Fixed-size fields are bad.
- Keywords: length
- Message-ID: <5918@osc.COM>
- Date: 9 Dec 92 22:39:47 GMT
- References: <1992Nov23.003743.1629@sserve.cc.adfa.oz.au> <10286@blue.cis.pitt.edu.UUCP> <168B18556.M22367@mwvm.mitre.org>
- Reply-To: Joe Keane <jgk@osc.com>
- Organization: Versant Object Technology, Menlo Park, CA
- Lines: 42
- Weather: rain, high 55, low 46
- Moon-Phase: full
-
- In article <168B18556.M22367@mwvm.mitre.org> M22367@mwvm.mitre.org writes:
- >Now, I know it's not just a personal problem ;-) about structure.
- >Look at your phonebook data -
- >
- >Field Length
- >----------- ------
- >Last Name 40 (generous, but not loony)
- >First Name 20 ( " , " " " )
- >Street Addr1 30
- >Street Addr2 30
- >City 30
- >State 2
- >Zip 5
- >Ext Zip 4
- >Area Code 3
- >Phone Number 7
-
- >Anything unreasonable about that? You wind up with a record of fixed length
- >that can handle 99.99% of the data you will encounter.
-
- Sorry, try again. Your percentage is way too high. The first and last names
- look safe, but you never know. The street addresses are likely to break for
- some people. The zip code is definitely not long enough, since ZIP+6 is just
- around the corner. The phone number won't work at all for anyone outside the
- U.S. and Canada, but i guess that's OK for this application. So that's one
- problem, your structure *will* break for some people, and they won't be happy.
-
- However, the real problem with the fixed-size structure is that it wastes a
- lot of space. Even though your structure only works sometimes, it still takes
- up a total of 171 bytes. In contrast, a typical record will actually use
- around 60 bytes. That means you're taking up *three times* as much space as
- you need. Even considering some overhead for a variable-length field, they
- come out way ahead.
-
- >My contention is that all-variable is not reason enough to buy Rev.
-
- That's true, but providing only fixed-size fields is a good reason to not buy
- a product.
-
- --
- Joe Keane, professional programmer
- jgk@osc.com (uunet!amdcad!osc!jgk)
-