Field of the Invention
The invention relates to a method for accessing a particular subset of data items from among a multiplicity of data items of a data base contained in a relatively slow background memory, each data item comprising a string of label elements. Accessing of data bases is an old art. The new media of CD-ROM and the like have made the physical carrier containing such data base readily portable, and therefore, many non-computer environments have been found to benefit from the accessibility of such data bases. The prime disadvantage of CD-ROM based systems is the relatively slow accessibility of the disc itself as viewed against the huge data storage therein; in particular for relatively inexpensive versions for widespread consumer use. Access time to a particular data item directly from a CD-ROM may be in the range of 0.5 seconds if only a single disc is present, which is relatively high in regards to human keying speed. A particular field of use of the present invention is for accessing geographical data bases in the physical environment of a motor car.
Summary of the Invention
Accordingly, amongst other things it is an object of the present invention to provide an improved access mechanism to such data base through the provision of a relatively small but fast foreground memory, and through an appropriate strategy for the access, in particular for arriving at an improved strategy for determining when a part of the data base must be transferred to the foreground memory. Thereto, according to one of its aspects, the invention provides said data base comprising a sequence of blocks together containing said data items and furthermore comprising an index containing a second multiplicity of treewise organized index items each comprising an initial part of a label header of an associated subset of data items, one or more pointers and an indication of whether all data items associated to that initial pan are contained in only a single said block or in a plurality of said blocks, said method comprising the steps of:
storing said index in a relatively fast foreground memory;
with respect to said index detecting of a particular such initial part being called;
then upon finding with respect to the latter initial part said being contained in only a single block, reading the pointer contained in said index item as primary pointer to an associated single block and storing that block in said foreground memory while enabling extending said initial part to a full header for identifying said associated subset, and accessing such subset through its eventually completed label;
but upon finding with respect to the latter initial part said being contained in a plurality of blocks reading any pointer contained in said index item as secondary pointer to a further index item of said tree having the current initial part extended by a next successor label element while enabling selective extending of the current initial part by such next successor label element. By itself, indexing has been described in C. J. Date, An introduction to Database Systems, Vol. I, pp. 58-67, Addison-Wesley, Reading, Mass., USA, 1986. The present invention uses the combination of providing an index and signalling the earliest feasible instant of moving a data base block to the foreground memory in an advantageous manner. The invention is particularly directed to entering of the label through keying, where keying a full label could require 5-10 successive keystrokes, and the detection of the "single-block-contained-ness" could occur after say, five keystrokes, that is well before completion of the keying. If the label itself were produced in parallel by a machine, the advantage would not be so pronounced. The label may be built up from characters, but other constituent parts are feasible, such as bits or tetrades. The labels may have various lengths that may be uniform or not for a particular data base. The labels may have notional elements, such as space characters. Depending on whether a human operator would enter such space character or not, the system, if applicable, would correct to the standard sequence of label elements.
The invention also relates to an apparatus for accessing such data base and to a data base carrier for use with such method and/or apparatus. Further advantageous aspects are recited in dependent claims.
Brief Description of the Drawings
These and other aspects and advantages will be discussed more in detail with respect to the description of preferred embodiments hereinafter, and in particular with reference to the appended Figures that show in particular:
FIG. 1 a data base for use with the invention;
FIG. 2 more in detail an index;
FIG. 3 hardware organized according to the invention;
FIG. 4 an exemplary flow chart according to the invention.
Description of Preferred Embodiments
FIG. 1 shows a data base for use with the invention. The first column gives the physical addresses of the successive data items listed therebehind. Each data item has one line in the Figure and is shown as having a uniform length, but this is not a restriction, inasmuch as data items could occupy more than one line of the data base. Each data item has a unique label shown as a sequence of 2-7 characters. The invention would be just as applicable if the subset of data items with identical labels has more than one entry. The remainder of the data item is stuffed with x-es that all or in part may have some qualifying meaning relative to the data item in question. By way of example, each data item is part of a navigational data base for road vehicles, and relates to a county, city, street, special location, landmark or other entity. The qualifying may indicate a character or other property of the entity. For a street, this may indicate the type of street, such as one-way, the range of housenumbers, connecting streets, and in a dynamic data base even the actual state of accessibility in relation to ongoing repair operations. The labels are alphabetical and sorted alphabetically, but as long as the system knows the underlying principles of the sorting some other kind of ordering among the characters may be used. The data items are grouped in blocks of four; it is understood that transferring of the data items to foreground memory is on the basis of such blocks. The size of the block is tuned to the amount of foreground memory available; the blocks may have different sizes. For example, if the foreground memory would be able to store the first five data items together, the first block could have its size increased to such extent, thus keeping all data items starting with "a" in a single block. This facilitates the subsequent search.
FIG. 2 shows more in detail an index; the index is of such size as to be completely contained within the foreground memory. As in FIG. 1, the first column indicates the addresses of the index items within the index. The remainder of the index for each address has the initial part or header of a label as occurring in the table of FIG. 1. Addresses 1-4 each contain as label header a unique single character a-e. Of these, label header -a- has an indication -p-, meaning that data items with this label header occur in more than a single block in FIG. 1. The same occurs for label header -b-. In consequence, these index items have qualifier p that may be a single bit, and also a pointer to a further index item that has the label header extended with one character. So, addresses 5-7 have two-character label headers starting with -a-, and addresses 8-10 likewise those starting with -b-. Of these, only address 9 points to further index items. The items of the index in effect need effectively to contain only one label character, provided that the system keeps track of all previously entered characters of the label header: the initial part is then only notionally contained in index items of the lower levels of the tree. The pointing may be explicit to all further index items in question, such as by an address range, or to the first (or last) address only, or to the first address of an associated block in the index. Now, most of the index items have an indication -s-, meaning that data items with this label header occur in only a single block in FIG. 1. Next, the first address of the block in question is pointed at. This block then may be transferred from the relatively slow background memory to the relatively fast foreground memory that may have an average access time in the millisecond or microsecond range. During or after the transfer the label header may be further extended by the user for subsequently identifying the location of the subset of data item(s) in question. This may be done by a conventional search mechanism, either on the basis of the full database or still on the basis of the index. The database may have a multilevel index organization, and the index of FIG. 2 could then be part of the highest level index or of a lower level. The data base items need not physically contain the header parts that are present in the index, whether notionally or explicit.
FIG. 3 shows hardware organized according to the invention. Block 20 represents a background memory containing the data base in question, which in a preferred application is a navigational database for use in the proprietary Philips CarIn (Car Information) system for routeplanning, vehicle guiding and other service rendering operations for the user that may be a non-professional in the computer field. Generally, the background memory is read-only, but this is not an express prerequisite for the operation according to the invention. The carrier preferably is an optical storage disc such as a CD-ROM, CD-Interactive, or other similar medium. Such background memory would then contain both the data base proper and also the index. In consequence, the system according to the invention would be embedded in, or at least used in a vehicle such as a police car, taxi, ambulance, van, heavyload truck, limousine, or even a middle class sedan or smaller car. However, other storage media and applications would similarly be feasible with the invention. Block 24 is a computer or other central unit with processing, display, and memory management functionalities. Block 28 is a keyboard or other unit, such as an audio channel for entering user commands and/or data. Block 26 is a relatively fast foreground memory with read-write facility, such as a solid state memory. Element 22 is a bus interconnecting the various subsystems recited supra, and which may furthermore interconnect other elements not shown, such as, for example, audio/video apparatus that is used for displaying certain system data produced by the other elements shown. There is a separate interconnection between foreground memory 26 and central unit 24, either physical or organizational, to facilitate and speed-up interactions between these two units. However, also here, the bus transfer may prevail.
FIG. 4 shows an exemplary flow chart according to the invention. Block 40 indicates the start wherein initialization of the system is effected in such way that subsequently the inputting of a data base item is awaited. This means that any further system functionality would be implicit in block 40. In block 42 a character (or other label header element) entering by a user is detected; as long as no character is encountered (N), a waiting loop may be maintained, but this is not necessary. If the character is effectively received, it will address the index, that has been loaded in the foreground memory at an appropriate instant, such as in block 40. Often, all characters are allowed as initial characters, so that the first column of FIG. 2 in fact starts with the whole alphabet. In block 46 the validity of the actual label header is checked. If invalid, the system goes to block 64: error and abort. Another solution is that the system presents the presently allowable choice of the next character as a kind of menu, and just ignores an invalid character. In block 48 the indication -single- is detected with respect to the actual label header. If no, the system goes to block 50, where the indication -plural- is implemented. Then, the address contained in the index item (possibly taking into account header elements that are present only notionally, but have been memorized by the system) is read for anticipating the next character to be received from the keyboard. This next character is then used together with the characters already received in blocks 42, 44, 46, and the loop is cycled as long as the label header is not restricted to a single block in the data base. However, if in block 48 a single block in the data base storage is detected, the system goes to block 54, in which the whole current block from the background storage is transferred. Next, the detection of further characters is done in block 56. In block 58 existence is detected, which is negative, again leads to exiting via block 64. If the label header is not yet complete (block 60), the system reverts to block 56. If the label is complete, however, the data base in block 62 shows the data thereof, and the operation is finished (block 66). The system may be extended according to the reference, such as by more than one level of indexing, which extra level could be situated between the background-foreground memories of FIG. 1. Other modifications would be close at hand to the skilled art practitioner.