From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71dd9a28c203c2c2 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Looking for Indexed Sequential File Package Date: 1997/07/18 Message-ID: <1997Jul18.144059.1@eisner>#1/1 X-Deja-AN: 257656331 X-Nntp-Posting-Host: eisner.decus.org References: <33CCA95E.167EB0E7@avions.aerospatiale.fr> <5qlskj$3ka@top.mitre.org> X-Nntp-Posting-User: KILGALLEN X-Trace: 869251270/2949 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-07-18T00:00:00+00:00 List-Id: In article <5qlskj$3ka@top.mitre.org>, mfb@mbunix.mitre.org (Michael F Brenner) writes: > Indexed sequential files are not always called that anymore. An indexed > sequential file is a data structure with two components: an indexing > container which keeps a list of keys in sorted order, and a random > access container (falsely called sequential in the title Indexed Sequential). I have always taken the "Sequential" part of the name to describe the property that once a particular index has been selected and a particular record fetched via that index it is possible to fetch subsequent "sequential" records in the order of that index. > For the indexing containter, a finite state machine lookup or hash function > may be used, or else you may use a partially balanced or fully balanced > tree, etc. For the random file, you may use an ordinary Ada Stream (unless > you are using the DOS version 3.07), or a large fixed array in virtual > memory, or a direct_IO file. An indexed_sequential_control package would > then simply combine these two containers and provide an interface > like text_IO, except that the set_position would work, and there would > be insert_key, delete_key, get_position_from_key, get_key_from_position, > get_key_from_record, set_key_in_record, and of course, something like > set_index and get_index would have to work on the file. I don't see that capability in your list of primitive operations, so I suppose the implementation you propose might not offer that capability, in which case what you propose is not an indexed _sequential_ package, but that does not mean that what the user _wanted_ was not an indexed _sequential_ package. I suppose another reading of the term is that "sequential" refers to the underlying implementation, which is not a useful thing for a client to mandate. Your proposed implementation tying together two relatively high-level seems to possibly not to provide atomic updates across machine crashes, and even though our operating systems are all written in perfect Ada, some of the hardware is imperfect. Particularly the hardware at my local power company, but that is a separate speech. Larry Kilgallen