Home » Archimedes archive » Archimedes World » AW-1994-04-Disc2.adf » Disk2Apr94 » !AWApr94/Goodies/PowerBase/PBaseDoc/Indices
!AWApr94/Goodies/PowerBase/PBaseDoc/Indices
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1994-04-Disc2.adf » Disk2Apr94 |
Filename: | !AWApr94/Goodies/PowerBase/PBaseDoc/Indices |
Read OK: | ✔ |
File size: | 1796 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Indices ======= The record data is stored in a file called 'Database' which is inside the database's application directory. The order of records within 'Database' is determined purely by the order in which the records are entered. In order to access the records in a logical order we need one or more INDICES. Powerbase contains no sorting facilities (other than the ability to sort a validation table or, under special circumstances, a report) all ordering of data being achieved by the use of indices. The most important index is index #0. This is always called 'PrimaryKey' and is created as part of the process of setting up a database (see 'Create'). You will find the file 'PrimaryKey' inside the database directory. Other, subsidiary, indices may be created as and when required up to a maximum of 10. (This number will be found in the text file 'Config', in the 'Resources' subdirectory inside the Powerbase directory. It may be increased if necessary.) All indices except 'PrimaryKey' are stored in the subdirectory 'Indices' and all have an icon bearing an 'I'. When a database is opened any indices in this subdirectory will be loaded automatically (indices operate in memory, for speed, not directly from disc.) Changes to the database cause the indices to be updated and closing the database (or quitting Powerbase itself) causes the updated indices to be written back to the disc. Note that the more indices you use the longer it will take to add and delete records or to make alterations to records which involve changing several indices. The ideal situation would be to have ALL fields indexed and, given an ARM3-based machine and a record structure which hasn't very many fields, this might well be feasible. Remember, however, that fields which are very repetitive (i.e. those which have only a few distinct values, these being repeated throughout many records) do not index efficiently. The file '!Tutorial' gives simple examples showing how keys and indices work. Indexing a field ================ Click MENU over the required field and follow the 'Index field' choice from the 'Field' sub-menu. The tag of the field you clicked on will appear in the first 'Key field(s)' icon. If you wish to use a composite key (see 'Create') you can use the "bump" icons to bring the tag of the second required field into view. Alternatively, the field may be selected from a menu. Enter the numbers of characters from words 1-4 to be used in constructing the key (see 'Create'). Select the 'Case sensitive' switch if required (see file 'Create') and click on 'OK'. If the field is already indexed you will be warned of this and asked if you wish to overwrite the existing index. When indexing is complete you will see that the descriptor of the indexed field has changed from black to dark blue. Clicking on the "key" buttons on the keypad causes the red highlighting which indicates the current key to move from one indexed field to another. When you have a secondary key selected as the current key it works just like the primary key as regards browsing, searching and printing. There is nothing to stop you indexing one field whilst a secondary index based on another field is the currently-active one, thus producing the effect of a "sort within a sort". You should NOT however try to index a field when the currently-active index is on that same field! Using an index to speed up printing =================================== The time taken to generate a report can sometimes be shortened dramatically by the use of a subsidiary. Selecting the 'Use index' button on the 'Match' window will use an index to find the matching records IF the search formula contains a simple test for equality on an indexed field. Suppose, for instance, you are preparing a list of all transition elements from the 'Elements' sample database. The search formula would be GP=T. Without the use of an index such a list (with just the name of the element selected) will take about 6.5 seconds on a hard disc. If you create an index on the GP field and then select 'Use index' before clicking on 'OK' the same list takes only about 2.5 seconds. Note that the search formula may be much more complex than in the above example as long as it contains at least one search element of the form TAG=VALUE where TAG is an indexed field. The index involved need not be the currently selected one. Automatic saving of indices =========================== The loss of an index can be a serious matter, especially if it is the primary key index. As mentioned above an open database stores its indices in memory and normally writes them back to the disc only when it is closed. It would be most unfortunate if, after a long working session, the power were to fail or some kind person reset your computer for you or switched it off altogether. You are advised, therefore, to save the indices from time to time during a working session, just as you would (presumably!) save a long wordporcessor document at intervals. The 'Force update' button on the keypad causes all indices (and all validation tables, as a matter of fact) to be saved to disc. If you don't want to have to bother remembering to do this you can automate the process as follows. Find the 'Save indices' entry on the 'Miscellaneous' sub-menu. It leads in turn to another sub-menu with three choices:- (1) Automatic Indices will be saved automatically at intervals specified by you. The default is 10 minutes. (2) Warning The 'Force update' button will flash briefly, accompanied by a discreet beep, at intervals determined by you. No saving is performed and you may ignore the warning if you wish or click on 'Force update'. (3) Manual The user saves the indices as desired by clicking on 'Force update'. This is the default setting.
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000020 49 6e 64 69 63 65 73 0a 20 20 20 20 20 20 20 20 |Indices. | 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000040 20 20 20 20 20 20 20 20 3d 3d 3d 3d 3d 3d 3d 0a | =======.| 00000050 0a 54 68 65 20 72 65 63 6f 72 64 20 64 61 74 61 |.The record data| 00000060 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 61 20 | is stored in a | 00000070 66 69 6c 65 20 63 61 6c 6c 65 64 20 27 44 61 74 |file called 'Dat| 00000080 61 62 61 73 65 27 20 77 68 69 63 68 20 69 73 20 |abase' which is | 00000090 69 6e 73 69 64 65 20 74 68 65 0a 64 61 74 61 62 |inside the.datab| 000000a0 61 73 65 27 73 20 61 70 70 6c 69 63 61 74 69 6f |ase's applicatio| 000000b0 6e 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 65 |n directory. The| 000000c0 20 6f 72 64 65 72 20 6f 66 20 72 65 63 6f 72 64 | order of record| 000000d0 73 20 77 69 74 68 69 6e 20 27 44 61 74 61 62 61 |s within 'Databa| 000000e0 73 65 27 20 69 73 0a 64 65 74 65 72 6d 69 6e 65 |se' is.determine| 000000f0 64 20 70 75 72 65 6c 79 20 62 79 20 74 68 65 20 |d purely by the | 00000100 6f 72 64 65 72 20 69 6e 20 77 68 69 63 68 20 74 |order in which t| 00000110 68 65 20 72 65 63 6f 72 64 73 20 61 72 65 20 65 |he records are e| 00000120 6e 74 65 72 65 64 2e 20 49 6e 20 6f 72 64 65 72 |ntered. In order| 00000130 20 74 6f 0a 61 63 63 65 73 73 20 74 68 65 20 72 | to.access the r| 00000140 65 63 6f 72 64 73 20 69 6e 20 61 20 6c 6f 67 69 |ecords in a logi| 00000150 63 61 6c 20 6f 72 64 65 72 20 77 65 20 6e 65 65 |cal order we nee| 00000160 64 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 49 4e |d one or more IN| 00000170 44 49 43 45 53 2e 20 50 6f 77 65 72 62 61 73 65 |DICES. Powerbase| 00000180 0a 63 6f 6e 74 61 69 6e 73 20 6e 6f 20 73 6f 72 |.contains no sor| 00000190 74 69 6e 67 20 66 61 63 69 6c 69 74 69 65 73 20 |ting facilities | 000001a0 28 6f 74 68 65 72 20 74 68 61 6e 20 74 68 65 20 |(other than the | 000001b0 61 62 69 6c 69 74 79 20 74 6f 20 73 6f 72 74 20 |ability to sort | 000001c0 61 20 76 61 6c 69 64 61 74 69 6f 6e 0a 74 61 62 |a validation.tab| 000001d0 6c 65 20 6f 72 2c 20 75 6e 64 65 72 20 73 70 65 |le or, under spe| 000001e0 63 69 61 6c 20 63 69 72 63 75 6d 73 74 61 6e 63 |cial circumstanc| 000001f0 65 73 2c 20 61 20 72 65 70 6f 72 74 29 20 61 6c |es, a report) al| 00000200 6c 20 6f 72 64 65 72 69 6e 67 20 6f 66 20 64 61 |l ordering of da| 00000210 74 61 20 62 65 69 6e 67 0a 61 63 68 69 65 76 65 |ta being.achieve| 00000220 64 20 62 79 20 74 68 65 20 75 73 65 20 6f 66 20 |d by the use of | 00000230 69 6e 64 69 63 65 73 2e 0a 0a 54 68 65 20 6d 6f |indices...The mo| 00000240 73 74 20 69 6d 70 6f 72 74 61 6e 74 20 69 6e 64 |st important ind| 00000250 65 78 20 69 73 20 69 6e 64 65 78 20 23 30 2e 20 |ex is index #0. | 00000260 54 68 69 73 20 69 73 20 61 6c 77 61 79 73 20 63 |This is always c| 00000270 61 6c 6c 65 64 20 27 50 72 69 6d 61 72 79 4b 65 |alled 'PrimaryKe| 00000280 79 27 20 61 6e 64 0a 69 73 20 63 72 65 61 74 65 |y' and.is create| 00000290 64 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 |d as part of the| 000002a0 20 70 72 6f 63 65 73 73 20 6f 66 20 73 65 74 74 | process of sett| 000002b0 69 6e 67 20 75 70 20 61 20 64 61 74 61 62 61 73 |ing up a databas| 000002c0 65 20 28 73 65 65 20 27 43 72 65 61 74 65 27 29 |e (see 'Create')| 000002d0 2e 0a 59 6f 75 20 77 69 6c 6c 20 66 69 6e 64 20 |..You will find | 000002e0 74 68 65 20 66 69 6c 65 20 27 50 72 69 6d 61 72 |the file 'Primar| 000002f0 79 4b 65 79 27 20 69 6e 73 69 64 65 20 74 68 65 |yKey' inside the| 00000300 20 64 61 74 61 62 61 73 65 20 64 69 72 65 63 74 | database direct| 00000310 6f 72 79 2e 20 0a 0a 4f 74 68 65 72 2c 20 73 75 |ory. ..Other, su| 00000320 62 73 69 64 69 61 72 79 2c 20 69 6e 64 69 63 65 |bsidiary, indice| 00000330 73 20 6d 61 79 20 62 65 20 63 72 65 61 74 65 64 |s may be created| 00000340 20 61 73 20 61 6e 64 20 77 68 65 6e 20 72 65 71 | as and when req| 00000350 75 69 72 65 64 20 75 70 20 74 6f 20 61 0a 6d 61 |uired up to a.ma| 00000360 78 69 6d 75 6d 20 6f 66 20 31 30 2e 20 28 54 68 |ximum of 10. (Th| 00000370 69 73 20 6e 75 6d 62 65 72 20 77 69 6c 6c 20 62 |is number will b| 00000380 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 74 |e found in the t| 00000390 65 78 74 20 66 69 6c 65 20 27 43 6f 6e 66 69 67 |ext file 'Config| 000003a0 27 2c 20 69 6e 20 74 68 65 0a 27 52 65 73 6f 75 |', in the.'Resou| 000003b0 72 63 65 73 27 20 73 75 62 64 69 72 65 63 74 6f |rces' subdirecto| 000003c0 72 79 20 69 6e 73 69 64 65 20 74 68 65 20 50 6f |ry inside the Po| 000003d0 77 65 72 62 61 73 65 20 64 69 72 65 63 74 6f 72 |werbase director| 000003e0 79 2e 20 49 74 20 6d 61 79 20 62 65 20 69 6e 63 |y. It may be inc| 000003f0 72 65 61 73 65 64 0a 69 66 20 6e 65 63 65 73 73 |reased.if necess| 00000400 61 72 79 2e 29 20 41 6c 6c 20 69 6e 64 69 63 65 |ary.) All indice| 00000410 73 20 65 78 63 65 70 74 20 27 50 72 69 6d 61 72 |s except 'Primar| 00000420 79 4b 65 79 27 20 61 72 65 20 73 74 6f 72 65 64 |yKey' are stored| 00000430 20 69 6e 20 74 68 65 0a 73 75 62 64 69 72 65 63 | in the.subdirec| 00000440 74 6f 72 79 20 27 49 6e 64 69 63 65 73 27 20 61 |tory 'Indices' a| 00000450 6e 64 20 61 6c 6c 20 68 61 76 65 20 61 6e 20 69 |nd all have an i| 00000460 63 6f 6e 20 62 65 61 72 69 6e 67 20 61 6e 20 27 |con bearing an '| 00000470 49 27 2e 20 57 68 65 6e 20 61 20 64 61 74 61 62 |I'. When a datab| 00000480 61 73 65 0a 69 73 20 6f 70 65 6e 65 64 20 61 6e |ase.is opened an| 00000490 79 20 69 6e 64 69 63 65 73 20 69 6e 20 74 68 69 |y indices in thi| 000004a0 73 20 73 75 62 64 69 72 65 63 74 6f 72 79 20 77 |s subdirectory w| 000004b0 69 6c 6c 20 62 65 20 6c 6f 61 64 65 64 20 61 75 |ill be loaded au| 000004c0 74 6f 6d 61 74 69 63 61 6c 6c 79 0a 28 69 6e 64 |tomatically.(ind| 000004d0 69 63 65 73 20 6f 70 65 72 61 74 65 20 69 6e 20 |ices operate in | 000004e0 6d 65 6d 6f 72 79 2c 20 66 6f 72 20 73 70 65 65 |memory, for spee| 000004f0 64 2c 20 6e 6f 74 20 64 69 72 65 63 74 6c 79 20 |d, not directly | 00000500 66 72 6f 6d 20 64 69 73 63 2e 29 20 43 68 61 6e |from disc.) Chan| 00000510 67 65 73 20 74 6f 0a 74 68 65 20 64 61 74 61 62 |ges to.the datab| 00000520 61 73 65 20 63 61 75 73 65 20 74 68 65 20 69 6e |ase cause the in| 00000530 64 69 63 65 73 20 74 6f 20 62 65 20 75 70 64 61 |dices to be upda| 00000540 74 65 64 20 61 6e 64 20 63 6c 6f 73 69 6e 67 20 |ted and closing | 00000550 74 68 65 20 64 61 74 61 62 61 73 65 20 28 6f 72 |the database (or| 00000560 0a 71 75 69 74 74 69 6e 67 20 50 6f 77 65 72 62 |.quitting Powerb| 00000570 61 73 65 20 69 74 73 65 6c 66 29 20 63 61 75 73 |ase itself) caus| 00000580 65 73 20 74 68 65 20 75 70 64 61 74 65 64 20 69 |es the updated i| 00000590 6e 64 69 63 65 73 20 74 6f 20 62 65 20 77 72 69 |ndices to be wri| 000005a0 74 74 65 6e 20 62 61 63 6b 20 74 6f 0a 74 68 65 |tten back to.the| 000005b0 20 64 69 73 63 2e 0a 0a 4e 6f 74 65 20 74 68 61 | disc...Note tha| 000005c0 74 20 74 68 65 20 6d 6f 72 65 20 69 6e 64 69 63 |t the more indic| 000005d0 65 73 20 79 6f 75 20 75 73 65 20 74 68 65 20 6c |es you use the l| 000005e0 6f 6e 67 65 72 20 69 74 20 77 69 6c 6c 20 74 61 |onger it will ta| 000005f0 6b 65 20 74 6f 20 61 64 64 20 61 6e 64 20 64 65 |ke to add and de| 00000600 6c 65 74 65 0a 72 65 63 6f 72 64 73 20 6f 72 20 |lete.records or | 00000610 74 6f 20 6d 61 6b 65 20 61 6c 74 65 72 61 74 69 |to make alterati| 00000620 6f 6e 73 20 74 6f 20 72 65 63 6f 72 64 73 20 77 |ons to records w| 00000630 68 69 63 68 20 69 6e 76 6f 6c 76 65 20 63 68 61 |hich involve cha| 00000640 6e 67 69 6e 67 20 73 65 76 65 72 61 6c 0a 69 6e |nging several.in| 00000650 64 69 63 65 73 2e 20 54 68 65 20 69 64 65 61 6c |dices. The ideal| 00000660 20 73 69 74 75 61 74 69 6f 6e 20 77 6f 75 6c 64 | situation would| 00000670 20 62 65 20 74 6f 20 68 61 76 65 20 41 4c 4c 20 | be to have ALL | 00000680 66 69 65 6c 64 73 20 69 6e 64 65 78 65 64 20 61 |fields indexed a| 00000690 6e 64 2c 20 67 69 76 65 6e 0a 61 6e 20 41 52 4d |nd, given.an ARM| 000006a0 33 2d 62 61 73 65 64 20 6d 61 63 68 69 6e 65 20 |3-based machine | 000006b0 61 6e 64 20 61 20 72 65 63 6f 72 64 20 73 74 72 |and a record str| 000006c0 75 63 74 75 72 65 20 77 68 69 63 68 20 68 61 73 |ucture which has| 000006d0 6e 27 74 20 76 65 72 79 20 6d 61 6e 79 20 66 69 |n't very many fi| 000006e0 65 6c 64 73 2c 0a 74 68 69 73 20 6d 69 67 68 74 |elds,.this might| 000006f0 20 77 65 6c 6c 20 62 65 20 66 65 61 73 69 62 6c | well be feasibl| 00000700 65 2e 20 52 65 6d 65 6d 62 65 72 2c 20 68 6f 77 |e. Remember, how| 00000710 65 76 65 72 2c 20 74 68 61 74 20 66 69 65 6c 64 |ever, that field| 00000720 73 20 77 68 69 63 68 20 61 72 65 20 76 65 72 79 |s which are very| 00000730 0a 72 65 70 65 74 69 74 69 76 65 20 28 69 2e 65 |.repetitive (i.e| 00000740 2e 20 74 68 6f 73 65 20 77 68 69 63 68 20 68 61 |. those which ha| 00000750 76 65 20 6f 6e 6c 79 20 61 20 66 65 77 20 64 69 |ve only a few di| 00000760 73 74 69 6e 63 74 20 76 61 6c 75 65 73 2c 20 74 |stinct values, t| 00000770 68 65 73 65 20 62 65 69 6e 67 0a 72 65 70 65 61 |hese being.repea| 00000780 74 65 64 20 74 68 72 6f 75 67 68 6f 75 74 20 6d |ted throughout m| 00000790 61 6e 79 20 72 65 63 6f 72 64 73 29 20 64 6f 20 |any records) do | 000007a0 6e 6f 74 20 69 6e 64 65 78 20 65 66 66 69 63 69 |not index effici| 000007b0 65 6e 74 6c 79 2e 20 0a 0a 54 68 65 20 66 69 6c |ently. ..The fil| 000007c0 65 20 27 21 54 75 74 6f 72 69 61 6c 27 20 67 69 |e '!Tutorial' gi| 000007d0 76 65 73 20 73 69 6d 70 6c 65 20 65 78 61 6d 70 |ves simple examp| 000007e0 6c 65 73 20 73 68 6f 77 69 6e 67 20 68 6f 77 20 |les showing how | 000007f0 6b 65 79 73 20 61 6e 64 20 69 6e 64 69 63 65 73 |keys and indices| 00000800 0a 77 6f 72 6b 2e 0a 0a 49 6e 64 65 78 69 6e 67 |.work...Indexing| 00000810 20 61 20 66 69 65 6c 64 20 0a 3d 3d 3d 3d 3d 3d | a field .======| 00000820 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 20 0a 43 6c 69 63 |========== .Clic| 00000830 6b 20 4d 45 4e 55 20 6f 76 65 72 20 74 68 65 20 |k MENU over the | 00000840 72 65 71 75 69 72 65 64 20 66 69 65 6c 64 20 61 |required field a| 00000850 6e 64 20 66 6f 6c 6c 6f 77 20 74 68 65 20 27 49 |nd follow the 'I| 00000860 6e 64 65 78 20 66 69 65 6c 64 27 20 63 68 6f 69 |ndex field' choi| 00000870 63 65 20 66 72 6f 6d 0a 74 68 65 20 27 46 69 65 |ce from.the 'Fie| 00000880 6c 64 27 20 73 75 62 2d 6d 65 6e 75 2e 20 54 68 |ld' sub-menu. Th| 00000890 65 20 74 61 67 20 6f 66 20 74 68 65 20 66 69 65 |e tag of the fie| 000008a0 6c 64 20 79 6f 75 20 63 6c 69 63 6b 65 64 20 6f |ld you clicked o| 000008b0 6e 20 77 69 6c 6c 20 61 70 70 65 61 72 20 69 6e |n will appear in| 000008c0 20 74 68 65 0a 66 69 72 73 74 20 27 4b 65 79 20 | the.first 'Key | 000008d0 66 69 65 6c 64 28 73 29 27 20 69 63 6f 6e 2e 20 |field(s)' icon. | 000008e0 49 66 20 79 6f 75 20 77 69 73 68 20 74 6f 20 75 |If you wish to u| 000008f0 73 65 20 61 20 63 6f 6d 70 6f 73 69 74 65 20 6b |se a composite k| 00000900 65 79 20 28 73 65 65 20 27 43 72 65 61 74 65 27 |ey (see 'Create'| 00000910 29 0a 79 6f 75 20 63 61 6e 20 75 73 65 20 74 68 |).you can use th| 00000920 65 20 22 62 75 6d 70 22 20 69 63 6f 6e 73 20 74 |e "bump" icons t| 00000930 6f 20 62 72 69 6e 67 20 74 68 65 20 74 61 67 20 |o bring the tag | 00000940 6f 66 20 74 68 65 20 73 65 63 6f 6e 64 20 72 65 |of the second re| 00000950 71 75 69 72 65 64 20 66 69 65 6c 64 0a 69 6e 74 |quired field.int| 00000960 6f 20 76 69 65 77 2e 20 41 6c 74 65 72 6e 61 74 |o view. Alternat| 00000970 69 76 65 6c 79 2c 20 74 68 65 20 66 69 65 6c 64 |ively, the field| 00000980 20 6d 61 79 20 62 65 20 73 65 6c 65 63 74 65 64 | may be selected| 00000990 20 66 72 6f 6d 20 61 20 6d 65 6e 75 2e 20 45 6e | from a menu. En| 000009a0 74 65 72 20 74 68 65 0a 6e 75 6d 62 65 72 73 20 |ter the.numbers | 000009b0 6f 66 20 63 68 61 72 61 63 74 65 72 73 20 66 72 |of characters fr| 000009c0 6f 6d 20 77 6f 72 64 73 20 31 2d 34 20 74 6f 20 |om words 1-4 to | 000009d0 62 65 20 75 73 65 64 20 69 6e 20 63 6f 6e 73 74 |be used in const| 000009e0 72 75 63 74 69 6e 67 20 74 68 65 20 6b 65 79 20 |ructing the key | 000009f0 28 73 65 65 0a 27 43 72 65 61 74 65 27 29 2e 20 |(see.'Create'). | 00000a00 53 65 6c 65 63 74 20 74 68 65 20 27 43 61 73 65 |Select the 'Case| 00000a10 20 73 65 6e 73 69 74 69 76 65 27 20 73 77 69 74 | sensitive' swit| 00000a20 63 68 20 69 66 20 72 65 71 75 69 72 65 64 20 28 |ch if required (| 00000a30 73 65 65 20 66 69 6c 65 0a 27 43 72 65 61 74 65 |see file.'Create| 00000a40 27 29 20 61 6e 64 20 63 6c 69 63 6b 20 6f 6e 20 |') and click on | 00000a50 27 4f 4b 27 2e 20 49 66 20 74 68 65 20 66 69 65 |'OK'. If the fie| 00000a60 6c 64 20 69 73 20 61 6c 72 65 61 64 79 20 69 6e |ld is already in| 00000a70 64 65 78 65 64 20 79 6f 75 20 77 69 6c 6c 20 62 |dexed you will b| 00000a80 65 0a 77 61 72 6e 65 64 20 6f 66 20 74 68 69 73 |e.warned of this| 00000a90 20 61 6e 64 20 61 73 6b 65 64 20 69 66 20 79 6f | and asked if yo| 00000aa0 75 20 77 69 73 68 20 74 6f 20 6f 76 65 72 77 72 |u wish to overwr| 00000ab0 69 74 65 20 74 68 65 20 65 78 69 73 74 69 6e 67 |ite the existing| 00000ac0 20 69 6e 64 65 78 2e 20 57 68 65 6e 0a 69 6e 64 | index. When.ind| 00000ad0 65 78 69 6e 67 20 69 73 20 63 6f 6d 70 6c 65 74 |exing is complet| 00000ae0 65 20 79 6f 75 20 77 69 6c 6c 20 73 65 65 20 74 |e you will see t| 00000af0 68 61 74 20 74 68 65 20 64 65 73 63 72 69 70 74 |hat the descript| 00000b00 6f 72 20 6f 66 20 74 68 65 20 69 6e 64 65 78 65 |or of the indexe| 00000b10 64 20 66 69 65 6c 64 0a 68 61 73 20 63 68 61 6e |d field.has chan| 00000b20 67 65 64 20 66 72 6f 6d 20 62 6c 61 63 6b 20 74 |ged from black t| 00000b30 6f 20 64 61 72 6b 20 62 6c 75 65 2e 20 0a 0a 43 |o dark blue. ..C| 00000b40 6c 69 63 6b 69 6e 67 20 6f 6e 20 74 68 65 20 22 |licking on the "| 00000b50 6b 65 79 22 20 62 75 74 74 6f 6e 73 20 6f 6e 20 |key" buttons on | 00000b60 74 68 65 20 6b 65 79 70 61 64 20 63 61 75 73 65 |the keypad cause| 00000b70 73 20 74 68 65 20 72 65 64 20 68 69 67 68 6c 69 |s the red highli| 00000b80 67 68 74 69 6e 67 0a 77 68 69 63 68 20 69 6e 64 |ghting.which ind| 00000b90 69 63 61 74 65 73 20 74 68 65 20 63 75 72 72 65 |icates the curre| 00000ba0 6e 74 20 6b 65 79 20 74 6f 20 6d 6f 76 65 20 66 |nt key to move f| 00000bb0 72 6f 6d 20 6f 6e 65 20 69 6e 64 65 78 65 64 20 |rom one indexed | 00000bc0 66 69 65 6c 64 20 74 6f 20 61 6e 6f 74 68 65 72 |field to another| 00000bd0 2e 0a 57 68 65 6e 20 79 6f 75 20 68 61 76 65 20 |..When you have | 00000be0 61 20 73 65 63 6f 6e 64 61 72 79 20 6b 65 79 20 |a secondary key | 00000bf0 73 65 6c 65 63 74 65 64 20 61 73 20 74 68 65 20 |selected as the | 00000c00 63 75 72 72 65 6e 74 20 6b 65 79 20 69 74 20 77 |current key it w| 00000c10 6f 72 6b 73 20 6a 75 73 74 20 6c 69 6b 65 0a 74 |orks just like.t| 00000c20 68 65 20 70 72 69 6d 61 72 79 20 6b 65 79 20 61 |he primary key a| 00000c30 73 20 72 65 67 61 72 64 73 20 62 72 6f 77 73 69 |s regards browsi| 00000c40 6e 67 2c 20 73 65 61 72 63 68 69 6e 67 20 61 6e |ng, searching an| 00000c50 64 20 70 72 69 6e 74 69 6e 67 2e 0a 0a 54 68 65 |d printing...The| 00000c60 72 65 20 69 73 20 6e 6f 74 68 69 6e 67 20 74 6f |re is nothing to| 00000c70 20 73 74 6f 70 20 79 6f 75 20 69 6e 64 65 78 69 | stop you indexi| 00000c80 6e 67 20 6f 6e 65 20 66 69 65 6c 64 20 77 68 69 |ng one field whi| 00000c90 6c 73 74 20 61 20 73 65 63 6f 6e 64 61 72 79 20 |lst a secondary | 00000ca0 69 6e 64 65 78 0a 62 61 73 65 64 20 6f 6e 20 61 |index.based on a| 00000cb0 6e 6f 74 68 65 72 20 66 69 65 6c 64 20 69 73 20 |nother field is | 00000cc0 74 68 65 20 63 75 72 72 65 6e 74 6c 79 2d 61 63 |the currently-ac| 00000cd0 74 69 76 65 20 6f 6e 65 2c 20 74 68 75 73 20 70 |tive one, thus p| 00000ce0 72 6f 64 75 63 69 6e 67 20 74 68 65 0a 65 66 66 |roducing the.eff| 00000cf0 65 63 74 20 6f 66 20 61 20 22 73 6f 72 74 20 77 |ect of a "sort w| 00000d00 69 74 68 69 6e 20 61 20 73 6f 72 74 22 2e 20 59 |ithin a sort". Y| 00000d10 6f 75 20 73 68 6f 75 6c 64 20 4e 4f 54 20 68 6f |ou should NOT ho| 00000d20 77 65 76 65 72 20 74 72 79 20 74 6f 20 69 6e 64 |wever try to ind| 00000d30 65 78 20 61 0a 66 69 65 6c 64 20 77 68 65 6e 20 |ex a.field when | 00000d40 74 68 65 20 63 75 72 72 65 6e 74 6c 79 2d 61 63 |the currently-ac| 00000d50 74 69 76 65 20 69 6e 64 65 78 20 69 73 20 6f 6e |tive index is on| 00000d60 20 74 68 61 74 20 73 61 6d 65 20 66 69 65 6c 64 | that same field| 00000d70 21 0a 0a 55 73 69 6e 67 20 61 6e 20 69 6e 64 65 |!..Using an inde| 00000d80 78 20 74 6f 20 73 70 65 65 64 20 75 70 20 70 72 |x to speed up pr| 00000d90 69 6e 74 69 6e 67 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d |inting.=========| 00000da0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00000db0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 54 68 65 20 74 |==========.The t| 00000dc0 69 6d 65 20 74 61 6b 65 6e 20 74 6f 20 67 65 6e |ime taken to gen| 00000dd0 65 72 61 74 65 20 61 20 72 65 70 6f 72 74 20 63 |erate a report c| 00000de0 61 6e 20 73 6f 6d 65 74 69 6d 65 73 20 62 65 20 |an sometimes be | 00000df0 73 68 6f 72 74 65 6e 65 64 20 64 72 61 6d 61 74 |shortened dramat| 00000e00 69 63 61 6c 6c 79 0a 62 79 20 74 68 65 20 75 73 |ically.by the us| 00000e10 65 20 6f 66 20 61 20 73 75 62 73 69 64 69 61 72 |e of a subsidiar| 00000e20 79 2e 20 53 65 6c 65 63 74 69 6e 67 20 74 68 65 |y. Selecting the| 00000e30 20 27 55 73 65 20 69 6e 64 65 78 27 20 62 75 74 | 'Use index' but| 00000e40 74 6f 6e 20 6f 6e 20 74 68 65 20 27 4d 61 74 63 |ton on the 'Matc| 00000e50 68 27 0a 77 69 6e 64 6f 77 20 77 69 6c 6c 20 75 |h'.window will u| 00000e60 73 65 20 61 6e 20 69 6e 64 65 78 20 74 6f 20 66 |se an index to f| 00000e70 69 6e 64 20 74 68 65 20 6d 61 74 63 68 69 6e 67 |ind the matching| 00000e80 20 72 65 63 6f 72 64 73 20 49 46 20 74 68 65 20 | records IF the | 00000e90 73 65 61 72 63 68 20 66 6f 72 6d 75 6c 61 0a 63 |search formula.c| 00000ea0 6f 6e 74 61 69 6e 73 20 61 20 73 69 6d 70 6c 65 |ontains a simple| 00000eb0 20 74 65 73 74 20 66 6f 72 20 65 71 75 61 6c 69 | test for equali| 00000ec0 74 79 20 6f 6e 20 61 6e 20 69 6e 64 65 78 65 64 |ty on an indexed| 00000ed0 20 66 69 65 6c 64 2e 20 0a 0a 53 75 70 70 6f 73 | field. ..Suppos| 00000ee0 65 2c 20 66 6f 72 20 69 6e 73 74 61 6e 63 65 2c |e, for instance,| 00000ef0 20 79 6f 75 20 61 72 65 20 70 72 65 70 61 72 69 | you are prepari| 00000f00 6e 67 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c |ng a list of all| 00000f10 20 74 72 61 6e 73 69 74 69 6f 6e 20 65 6c 65 6d | transition elem| 00000f20 65 6e 74 73 0a 66 72 6f 6d 20 74 68 65 20 27 45 |ents.from the 'E| 00000f30 6c 65 6d 65 6e 74 73 27 20 73 61 6d 70 6c 65 20 |lements' sample | 00000f40 64 61 74 61 62 61 73 65 2e 20 54 68 65 20 73 65 |database. The se| 00000f50 61 72 63 68 20 66 6f 72 6d 75 6c 61 20 77 6f 75 |arch formula wou| 00000f60 6c 64 20 62 65 20 47 50 3d 54 2e 0a 57 69 74 68 |ld be GP=T..With| 00000f70 6f 75 74 20 74 68 65 20 75 73 65 20 6f 66 20 61 |out the use of a| 00000f80 6e 20 69 6e 64 65 78 20 73 75 63 68 20 61 20 6c |n index such a l| 00000f90 69 73 74 20 28 77 69 74 68 20 6a 75 73 74 20 74 |ist (with just t| 00000fa0 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 65 |he name of the e| 00000fb0 6c 65 6d 65 6e 74 0a 73 65 6c 65 63 74 65 64 29 |lement.selected)| 00000fc0 20 77 69 6c 6c 20 74 61 6b 65 20 61 62 6f 75 74 | will take about| 00000fd0 20 36 2e 35 20 73 65 63 6f 6e 64 73 20 6f 6e 20 | 6.5 seconds on | 00000fe0 61 20 68 61 72 64 20 64 69 73 63 2e 20 49 66 20 |a hard disc. If | 00000ff0 79 6f 75 20 63 72 65 61 74 65 20 61 6e 20 69 6e |you create an in| 00001000 64 65 78 0a 6f 6e 20 74 68 65 20 47 50 20 66 69 |dex.on the GP fi| 00001010 65 6c 64 20 61 6e 64 20 74 68 65 6e 20 73 65 6c |eld and then sel| 00001020 65 63 74 20 27 55 73 65 20 69 6e 64 65 78 27 20 |ect 'Use index' | 00001030 62 65 66 6f 72 65 20 63 6c 69 63 6b 69 6e 67 20 |before clicking | 00001040 6f 6e 20 27 4f 4b 27 20 74 68 65 20 73 61 6d 65 |on 'OK' the same| 00001050 0a 6c 69 73 74 20 74 61 6b 65 73 20 6f 6e 6c 79 |.list takes only| 00001060 20 61 62 6f 75 74 20 32 2e 35 20 73 65 63 6f 6e | about 2.5 secon| 00001070 64 73 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 74 |ds...Note that t| 00001080 68 65 20 73 65 61 72 63 68 20 66 6f 72 6d 75 6c |he search formul| 00001090 61 20 6d 61 79 20 62 65 20 6d 75 63 68 20 6d 6f |a may be much mo| 000010a0 72 65 20 63 6f 6d 70 6c 65 78 20 74 68 61 6e 20 |re complex than | 000010b0 69 6e 20 74 68 65 20 61 62 6f 76 65 0a 65 78 61 |in the above.exa| 000010c0 6d 70 6c 65 20 61 73 20 6c 6f 6e 67 20 61 73 20 |mple as long as | 000010d0 69 74 20 63 6f 6e 74 61 69 6e 73 20 61 74 20 6c |it contains at l| 000010e0 65 61 73 74 20 6f 6e 65 20 73 65 61 72 63 68 20 |east one search | 000010f0 65 6c 65 6d 65 6e 74 20 6f 66 20 74 68 65 20 66 |element of the f| 00001100 6f 72 6d 0a 54 41 47 3d 56 41 4c 55 45 20 77 68 |orm.TAG=VALUE wh| 00001110 65 72 65 20 54 41 47 20 69 73 20 61 6e 20 69 6e |ere TAG is an in| 00001120 64 65 78 65 64 20 66 69 65 6c 64 2e 20 54 68 65 |dexed field. The| 00001130 20 69 6e 64 65 78 20 69 6e 76 6f 6c 76 65 64 20 | index involved | 00001140 6e 65 65 64 20 6e 6f 74 20 62 65 20 74 68 65 0a |need not be the.| 00001150 63 75 72 72 65 6e 74 6c 79 20 73 65 6c 65 63 74 |currently select| 00001160 65 64 20 6f 6e 65 2e 0a 0a 41 75 74 6f 6d 61 74 |ed one...Automat| 00001170 69 63 20 73 61 76 69 6e 67 20 6f 66 20 69 6e 64 |ic saving of ind| 00001180 69 63 65 73 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |ices.===========| 00001190 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 000011a0 0a 54 68 65 20 6c 6f 73 73 20 6f 66 20 61 6e 20 |.The loss of an | 000011b0 69 6e 64 65 78 20 63 61 6e 20 62 65 20 61 20 73 |index can be a s| 000011c0 65 72 69 6f 75 73 20 6d 61 74 74 65 72 2c 20 65 |erious matter, e| 000011d0 73 70 65 63 69 61 6c 6c 79 20 69 66 20 69 74 20 |specially if it | 000011e0 69 73 20 74 68 65 0a 70 72 69 6d 61 72 79 20 6b |is the.primary k| 000011f0 65 79 20 69 6e 64 65 78 2e 20 41 73 20 6d 65 6e |ey index. As men| 00001200 74 69 6f 6e 65 64 20 61 62 6f 76 65 20 61 6e 20 |tioned above an | 00001210 6f 70 65 6e 20 64 61 74 61 62 61 73 65 20 73 74 |open database st| 00001220 6f 72 65 73 20 69 74 73 20 69 6e 64 69 63 65 73 |ores its indices| 00001230 20 69 6e 0a 6d 65 6d 6f 72 79 20 61 6e 64 20 6e | in.memory and n| 00001240 6f 72 6d 61 6c 6c 79 20 77 72 69 74 65 73 20 74 |ormally writes t| 00001250 68 65 6d 20 62 61 63 6b 20 74 6f 20 74 68 65 20 |hem back to the | 00001260 64 69 73 63 20 6f 6e 6c 79 20 77 68 65 6e 20 69 |disc only when i| 00001270 74 20 69 73 20 63 6c 6f 73 65 64 2e 20 49 74 0a |t is closed. It.| 00001280 77 6f 75 6c 64 20 62 65 20 6d 6f 73 74 20 75 6e |would be most un| 00001290 66 6f 72 74 75 6e 61 74 65 20 69 66 2c 20 61 66 |fortunate if, af| 000012a0 74 65 72 20 61 20 6c 6f 6e 67 20 77 6f 72 6b 69 |ter a long worki| 000012b0 6e 67 20 73 65 73 73 69 6f 6e 2c 20 74 68 65 20 |ng session, the | 000012c0 70 6f 77 65 72 20 77 65 72 65 0a 74 6f 20 66 61 |power were.to fa| 000012d0 69 6c 20 6f 72 20 73 6f 6d 65 20 6b 69 6e 64 20 |il or some kind | 000012e0 70 65 72 73 6f 6e 20 72 65 73 65 74 20 79 6f 75 |person reset you| 000012f0 72 20 63 6f 6d 70 75 74 65 72 20 66 6f 72 20 79 |r computer for y| 00001300 6f 75 20 6f 72 20 73 77 69 74 63 68 65 64 20 69 |ou or switched i| 00001310 74 20 6f 66 66 0a 61 6c 74 6f 67 65 74 68 65 72 |t off.altogether| 00001320 2e 20 59 6f 75 20 61 72 65 20 61 64 76 69 73 65 |. You are advise| 00001330 64 2c 20 74 68 65 72 65 66 6f 72 65 2c 20 74 6f |d, therefore, to| 00001340 20 73 61 76 65 20 74 68 65 20 69 6e 64 69 63 65 | save the indice| 00001350 73 20 66 72 6f 6d 20 74 69 6d 65 20 74 6f 0a 74 |s from time to.t| 00001360 69 6d 65 20 64 75 72 69 6e 67 20 61 20 77 6f 72 |ime during a wor| 00001370 6b 69 6e 67 20 73 65 73 73 69 6f 6e 2c 20 6a 75 |king session, ju| 00001380 73 74 20 61 73 20 79 6f 75 20 77 6f 75 6c 64 20 |st as you would | 00001390 28 70 72 65 73 75 6d 61 62 6c 79 21 29 20 73 61 |(presumably!) sa| 000013a0 76 65 20 61 20 6c 6f 6e 67 0a 77 6f 72 64 70 6f |ve a long.wordpo| 000013b0 72 63 65 73 73 6f 72 20 64 6f 63 75 6d 65 6e 74 |rcessor document| 000013c0 20 61 74 20 69 6e 74 65 72 76 61 6c 73 2e 20 54 | at intervals. T| 000013d0 68 65 20 27 46 6f 72 63 65 20 75 70 64 61 74 65 |he 'Force update| 000013e0 27 20 62 75 74 74 6f 6e 20 6f 6e 20 74 68 65 20 |' button on the | 000013f0 6b 65 79 70 61 64 0a 63 61 75 73 65 73 20 61 6c |keypad.causes al| 00001400 6c 20 69 6e 64 69 63 65 73 20 28 61 6e 64 20 61 |l indices (and a| 00001410 6c 6c 20 76 61 6c 69 64 61 74 69 6f 6e 20 74 61 |ll validation ta| 00001420 62 6c 65 73 2c 20 61 73 20 61 20 6d 61 74 74 65 |bles, as a matte| 00001430 72 20 6f 66 20 66 61 63 74 29 20 74 6f 20 62 65 |r of fact) to be| 00001440 0a 73 61 76 65 64 20 74 6f 20 64 69 73 63 2e 20 |.saved to disc. | 00001450 49 66 20 79 6f 75 20 64 6f 6e 27 74 20 77 61 6e |If you don't wan| 00001460 74 20 74 6f 20 68 61 76 65 20 74 6f 20 62 6f 74 |t to have to bot| 00001470 68 65 72 20 72 65 6d 65 6d 62 65 72 69 6e 67 20 |her remembering | 00001480 74 6f 20 64 6f 20 74 68 69 73 0a 79 6f 75 20 63 |to do this.you c| 00001490 61 6e 20 61 75 74 6f 6d 61 74 65 20 74 68 65 20 |an automate the | 000014a0 70 72 6f 63 65 73 73 20 61 73 20 66 6f 6c 6c 6f |process as follo| 000014b0 77 73 2e 0a 0a 46 69 6e 64 20 74 68 65 20 27 53 |ws...Find the 'S| 000014c0 61 76 65 20 69 6e 64 69 63 65 73 27 20 65 6e 74 |ave indices' ent| 000014d0 72 79 20 6f 6e 20 74 68 65 20 27 4d 69 73 63 65 |ry on the 'Misce| 000014e0 6c 6c 61 6e 65 6f 75 73 27 20 73 75 62 2d 6d 65 |llaneous' sub-me| 000014f0 6e 75 2e 20 49 74 20 6c 65 61 64 73 20 69 6e 0a |nu. It leads in.| 00001500 74 75 72 6e 20 74 6f 20 61 6e 6f 74 68 65 72 20 |turn to another | 00001510 73 75 62 2d 6d 65 6e 75 20 77 69 74 68 20 74 68 |sub-menu with th| 00001520 72 65 65 20 63 68 6f 69 63 65 73 3a 2d 0a 0a 20 |ree choices:-.. | 00001530 20 20 20 20 20 20 20 28 31 29 20 41 75 74 6f 6d | (1) Autom| 00001540 61 74 69 63 20 20 20 49 6e 64 69 63 65 73 20 77 |atic Indices w| 00001550 69 6c 6c 20 62 65 20 73 61 76 65 64 20 61 75 74 |ill be saved aut| 00001560 6f 6d 61 74 69 63 61 6c 6c 79 20 61 74 20 69 6e |omatically at in| 00001570 74 65 72 76 61 6c 73 0a 20 20 20 20 20 20 20 20 |tervals. | 00001580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001590 73 70 65 63 69 66 69 65 64 20 62 79 20 79 6f 75 |specified by you| 000015a0 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 |. The default is| 000015b0 20 31 30 20 6d 69 6e 75 74 65 73 2e 0a 0a 20 20 | 10 minutes... | 000015c0 20 20 20 20 20 20 28 32 29 20 57 61 72 6e 69 6e | (2) Warnin| 000015d0 67 20 20 20 20 20 54 68 65 20 27 46 6f 72 63 65 |g The 'Force| 000015e0 20 75 70 64 61 74 65 27 20 62 75 74 74 6f 6e 20 | update' button | 000015f0 77 69 6c 6c 20 66 6c 61 73 68 20 62 72 69 65 66 |will flash brief| 00001600 6c 79 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 |ly,. | 00001610 20 20 20 20 20 20 20 20 20 20 20 20 61 63 63 6f | acco| 00001620 6d 70 61 6e 69 65 64 20 62 79 20 61 20 64 69 73 |mpanied by a dis| 00001630 63 72 65 65 74 20 62 65 65 70 2c 20 61 74 20 69 |creet beep, at i| 00001640 6e 74 65 72 76 61 6c 73 0a 20 20 20 20 20 20 20 |ntervals. | 00001650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001660 20 64 65 74 65 72 6d 69 6e 65 64 20 62 79 20 79 | determined by y| 00001670 6f 75 2e 20 4e 6f 20 73 61 76 69 6e 67 20 69 73 |ou. No saving is| 00001680 20 70 65 72 66 6f 72 6d 65 64 20 61 6e 64 20 79 | performed and y| 00001690 6f 75 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ou. | 000016a0 20 20 20 20 20 20 20 20 20 20 20 6d 61 79 20 69 | may i| 000016b0 67 6e 6f 72 65 20 74 68 65 20 77 61 72 6e 69 6e |gnore the warnin| 000016c0 67 20 69 66 20 79 6f 75 20 77 69 73 68 20 6f 72 |g if you wish or| 000016d0 20 63 6c 69 63 6b 20 6f 6e 0a 20 20 20 20 20 20 | click on. | 000016e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000016f0 20 20 27 46 6f 72 63 65 20 75 70 64 61 74 65 27 | 'Force update'| 00001700 2e 0a 0a 20 20 20 20 20 20 20 20 28 33 29 20 4d |... (3) M| 00001710 61 6e 75 61 6c 20 20 20 20 20 20 54 68 65 20 75 |anual The u| 00001720 73 65 72 20 73 61 76 65 73 20 74 68 65 20 69 6e |ser saves the in| 00001730 64 69 63 65 73 20 61 73 20 64 65 73 69 72 65 64 |dices as desired| 00001740 20 62 79 20 63 6c 69 63 6b 69 6e 67 20 6f 6e 0a | by clicking on.| 00001750 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001760 20 20 20 20 20 20 20 20 27 46 6f 72 63 65 20 75 | 'Force u| 00001770 70 64 61 74 65 27 2e 20 54 68 69 73 20 69 73 20 |pdate'. This is | 00001780 74 68 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 |the default sett| 00001790 69 6e 67 2e 0a 0a |ing...| 00001796