home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!gatech!paladin.american.edu!auvm!SNYCENVM.BITNET!OGDENEB
- Organization: State University of New York - Central Administration
- Message-ID: <DBASE-L%92090807564310@NMSUVM1.BITNET>
- Newsgroups: bit.listserv.dbase-l
- Date: Tue, 8 Sep 1992 09:29:54 EST
- Sender: "Discussion on the use of the dBase language and related
- dialects" <DBASE-L@NMSUVM1.BITNET>
- From: EVERETT OGDEN <OGDENEB@SNYCENVM.BITNET>
- Subject: Re: dbase questions + ASCII --> dbase
- In-Reply-To: Message of Tue, 8 Sep 1992 06:44:06 GMT from <vanloon@CWI.NL>
- Lines: 24
-
- Maarten van Loon asked (among other things) why dBASE files use
- fixed-length fields, padded with spaces, rather than just storing the
- data as in an ASCII file. He says that seems inefficient. Inefficient
- for storage space, yes, but very efficient for speed. Suppose you have
- a database of several million records, and you want to look at record
- 3,579,545. dBASE knows how big a record is, so a quick calculation
- tells it just where to look in that multimegabyte file. With a plain
- sequential file, you'd have to scan through the file from the head (an
- indexed sequential file would improve things some).
-
- More importantly, look what happens when you want to modify a record.
- Since the new version will take exactly the same space as the old, dBASE
- can change just that part of the file. But with a sequential file, you
- have to either remove the old version and insert the new (and rewrite
- the file from the record's position to the end), or tack any changed
- records onto the end of the file, eventually leaving a lot of dead space
- in the file and requiring a good indexing system to keep track of it.
- Word processors generally work with sequential files and use one of the
- latter two methods (the only one I know of that used the last method was
- DisplayWrite). But you don't generally load multimegabyte files into a
- word processor. If you do, you'll find that edits and even movement
- through the file are very slow indeed.
-
- Everett Ogden ogdeneb@snycenvm.bitnet
-