comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: Looking for Indexed Sequential File Package
Date: 1997/07/18
Date: 1997-07-18T00:00:00+00:00	[thread overview]
Message-ID: <1997Jul18.144059.1@eisner> (raw)
In-Reply-To: 5qlskj$3ka@top.mitre.org


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




  reply	other threads:[~1997-07-18  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-16  0:00 Looking for Indexed Sequential File Package Paul CHARDON
1997-07-16  0:00 ` Larry Kilgallen
1997-07-16  0:00   ` Robert Dewar
1997-07-16  0:00 ` Matthew Heaney
1997-07-17  0:00 ` Michael F Brenner
1997-07-18  0:00   ` Larry Kilgallen [this message]
1997-07-20  0:00     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox