home *** CD-ROM | disk | FTP | other *** search
/ Acorn RISC PD-CD 1 / Acorn RISC PD-CD 1.iso / utilities / powerbase / pbasedoc / _qtutorial next >
Encoding:
Text File  |  1994-02-01  |  14.9 KB  |  293 lines

  1.                                 Quick Tutorial
  2.                                 ==============
  3.  
  4. This document is intended to acquaint the new user as painlessly as possible
  5. with the most commonly-used facilities of Powerbase. It does not explain how
  6. to create a database from scratch (the file 'Create' does that), nor does it
  7. delve into the many advanced features, but it does explain how to:-
  8.  
  9.         (a) Start up Powerbase and open an existing database.
  10.         (b) Browse through the database and search for individual records.
  11.         (d) Add new records and alter or delete existing ones.
  12.         (d) Query the database to create simple reports.
  13.         (e) Close the database.
  14.  
  15. The supplied sample database 'Friends' is used to illustrate most of these
  16. activities. If you have a hard disc you should copy 'Friends' and Powerbase
  17. itself onto it before proceeding further. It is possible to use Powerbase
  18. from floppy discs only but some operations, such as creating reports, will
  19. be quite slow. Unless memory is very tight therefore, users of floppy discs
  20. are recommended to allocate at least 32K to the RAM disc and copy 'Friends'
  21. onto it. Everything will then run much faster. Powerbase can provide
  22. context-sensitive help via Acorn's !Help application and you are advised to
  23. load this, resizing the help window and placing it at the top right of the
  24. screen. Further help can be had by choosing the Help entry on Powerbase's
  25. main menu or on the icon-bar menu.
  26.  
  27. Starting Powerbase
  28. ==================
  29. Double-click on the Powerbase icon. After a few seconds it will appear on
  30. the icon-bar with the words "No data" beneath it to show that no database is
  31. open. Dragging the 'Friends' icon onto the Powerbase icon on the icon-bar
  32. will open 'Friends' for use and the words "No data" will be replaced by the
  33. name of the database. Double-clicking on the 'Friends' icon has the same
  34. effect, in fact if Powerbase isn't already on the icon-bar a double-click on
  35. 'Friends' will install it for you provided that the Powerbase icon has been
  36. seen by the filer. 
  37.  
  38. Two windows will open. One is the RECORD WINDOW and displays the first
  39. record in the database - the one for "Badgery Peter". The other is the
  40. KEYPAD which allows you to control the browsing, searching and editing
  41. functions of Powerbase. The keypad is rather large and obscures quite a big
  42. area of the record window. The most-used buttons, however, are on the top
  43. two rows and the keypad can be moved part way off screen to get it out of
  44. the way.
  45.  
  46. Browsing through the Records
  47. ============================
  48. The top row of buttons on the keypad allows you to browse through the file.
  49. If you have !Help running, as previously suggested, it will tell you what
  50. each button does. Once you get the general idea you will find the symbols on
  51. the buttons logical and self-explanatory. The most commonly used ones act as
  52. follows:
  53.  
  54. (a) The arrows at the ends of the row take you to the first and last
  55. records. You are looking at the first record now, so click (with SELECT) on
  56. the top-right button and you will see the record for Turnip Charles. The
  57. leftmost button takes you back to the start again.
  58.  
  59. (b) Movement through the file one record at a time is achieved using the
  60. single arrow keys next door to the ones you have just used. Try them out,
  61. noting the way records come up in alphabetical, or reverse alphabetical,
  62. order.
  63.  
  64. (c) The keys with double arrows allow you to make longer jumps through the
  65. file. The number of records skipped is shown in the writable icon between
  66. them and has a default value of 10. Since there are only 10 records in
  67. 'Friends' these keys will have the same effect as the "first" and "last"
  68. keys, unless you change the interval to something less. Click in the icon,
  69. delete the 10 and enter 5 or 2, then try the double-arrow keys again.                        
  70. Searching for a record 
  71. ====================== 
  72. The rightmost button on the third row of the keypad shows a question mark
  73. followed by a "record card" icon  We will call it the Search button. When
  74. clicked with SELECT the keypad window grows an extension on the right-hand
  75. side. This new area contains a writable icon in which to enter the key of
  76. the record you wish to display. Suppose you want to see the record for
  77. "Bloggs Fred". You need to enter the KEY for the record. In this database
  78. keys are made up from the first 4 letters of the surname plus the initial.
  79. The required key is therefore BLOGF. Enter this and either click on OK or
  80. type <Return> and the record will be displayed. Note that the key is shown
  81. in the window heading.
  82.  
  83. Editing the Database
  84. ====================
  85. This part of the tutorial involves changes to the data records. Make a
  86. working copy of the disc and put the original in a safe place. If you are
  87. using a copy of 'Friends' on the RAM disc then the floppy disc won't be
  88. altered, but it's still not a good idea to work with the original disc.
  89.  
  90. Modifying records
  91. -----------------
  92. Pointing the mouse at any field and clicking SELECT places the caret in that
  93. field. The contents of the field may then be edited in the standard way for
  94. RISC OS writable icons. i.e.
  95.  
  96.        CTRL U clears the field.
  97.        DELETE removes the character to the left of the caret.
  98.        COPY removes the character to the right of the caret.
  99.        SHIFT/COPY deletes the word to the right of the caret.
  100.        CTRL/COPY deletes everything from the caret to the end of the line.
  101.        ⇦ and ⇨ move the caret left/right by one character.
  102.        SHIFT ⇦ and SHIFT ⇨ move the caret left/right by one word.
  103.        CRTL ⇦ and CTRL ⇨ move the caret to start and end of the field.
  104.           
  105. Changes made to a record cause the record to be written back to the database
  106. whenever you display a different record or close the database. (There is a
  107. button on the keypad called 'Force update' but you don't normally need to
  108. use it.)
  109.  
  110. Recovering data after a mistake
  111. -------------------------------
  112. You will sometimes edit the wrong field by mistake and want to restore the
  113. previous contents. Click MENU over the field. The second entry on the main
  114. menu contains the "tag" of the field. Follow the right-pointing arrow to the
  115. 'Field' sub-menu and choose the last entry: 'Undo changes'. Similarly, if
  116. you make a mess of a complete record and want to go back to the way it was
  117. you can choose 'Undo changes' from the main menu.
  118.  
  119. It is important to realise that these 'undo' facilities will not work if you
  120. have looked at another record before using them (or clicked on 'Force
  121. update'). In other words you can recover data which has been altered in or
  122. removed from the currently-displayed record only.
  123.  
  124. Adding and deleting records 
  125. ---------------------------
  126. To add a new record you use the "add record" button which looks like a plus
  127. sign and an index card. Clicking on this offers a blank record into which
  128. you can type some new data. You don't have to complete all the fields, in
  129. fact the only field into which you MUST type something is the NAME field.
  130. This is the KEY FIELD; the one from which the key, mentioned earlier, is
  131. derived. If you leave the key field blank then nothing will be written to
  132. the database.
  133.  
  134. Type the name "Bodmin George", then go to the beginning of the file and
  135. step through it record by record. You will find that your new record has
  136. been inserted in the correct place, i.e. the sequence goes: Badgery, Bloggs,
  137. Bodmin, Cavendish.
  138.  
  139. Now let's try deleting the record you've just added. There is a "dustbin"
  140. button  which will do just that: but don't use it yet. Make sure that the
  141. unwanted record is on the screen and click the button to the RIGHT of the
  142. bin. You will now find that the record has vanished; the names run straight
  143. from Bloggs to Cavendish, just as they did before you added Bodmin.
  144.  
  145. Wasn't that rather TOO easy? Suppose you clicked the button by mistake and
  146. deleted an important record! Powerbase handles this very nicely. The record
  147. hasn't really been deleted at all. To prove this, click the button above the
  148. one you used for "deleting". The button shows a green right-pointing arrow
  149. and a "card index" icon. There's Bodmin again! You will soon find that it
  150. appears to be the ONLY record in the file! Don't worry; nothing has been
  151. lost.  A Powerbase database is treated as six separate SUBFILES  numbered
  152. 0-5. When you first open the database you are looking at Subfile 0 and the
  153. heading of the record window shows this. If you look at the heading now you
  154. will see that it has changed to Subfile 1.
  155.  
  156. The buttons on either side of the bin carry pictures which suggest their
  157. true functions. They do NOT delete records; they merely MOVE records from
  158. one subfile to another. The right button moves the displayed record to the
  159. next subfile in sequence. Thus, in the above case the "Bodmin" record has
  160. been moved from subfile 0 to subfile 1. A record in subfile 1 would be moved
  161. to subfile 2 and so on.  What happens when it gets to 5? The next click
  162. shoves it into subfile 0 where it was originally. As you might have guessed,
  163. the left button moves records in the opposite direction, i.e. from subfile 1
  164. to 0 or from subfile 0 to 5.
  165.  
  166. What happens when you DO want to lose a record for good?  That's when you
  167. consign it to the dustbin!  Since this button's action is more drastic than
  168. that of the other two you are asked for confirmation before deletion occurs.
  169.  
  170. Printing Lists
  171. ==============
  172. Before Powerbase can produce a list it must be told:
  173.  
  174.            * which FIELDS should appear on the list
  175.            * which RECORDS should appear on the list.
  176.  
  177. Making the field selection
  178. --------------------------
  179. Specifying the fields you want is extremely easy. To include a field simply
  180. point the mouse at it and click with ADJUST. The selected field will then
  181. appear in inverse video (i.e. normally white on black). If you change your
  182. mind about a field you can de-select it by clicking on it again with ADJUST.
  183. The order in which the fields will appear in the printed list is the order
  184. in which you select them. Take care with this since there is nothing on the
  185. screen to indicate what order the fields will be in.  The fields chosen for
  186. inclusion in a printout make up a SELECTION  which may be saved and reloaded
  187. for future use. Just for now select the name and the first 3 fields of the
  188. address.
  189.  
  190. Choosing which records to print
  191. -------------------------------
  192. Specifying which records to print is somewhat more complex, although efforts
  193. have been made to render it as simple as possible. With the mouse pointer in
  194. the record window click MENU. This displays the main Powerbase menu from
  195. which you should choose Print.  A small window appears in which you can
  196. specify the criteria which must be met by records for inclusion in the list.
  197. If you just click OK (or type <Return>) without entering anything here you
  198. will obtain a list of the whole database (or, more accurately, of the the
  199. whole of the current subfile). Try this first.
  200.  
  201. When the search is complete the list will be displayed in a window. If you
  202. point to a record in the displayed list and double-click with SELECT
  203. Powerbase will display the chosen record in the main record window. Note
  204. that the caret is placed in the field you were pointing to on the list. This
  205. is very useful if you spot errors in the data whilst examining a list. A
  206. double click on the offending item offers the record with the caret
  207. correctly positioned for editing.
  208.  
  209. Most database queries, however, don't involve printing all the records! You
  210. will usually need to enter a SEARCH FORMULA before clicking OK. Search
  211. formulae can be quite complex and a more detailed treatment is given in
  212. another document. Only a few simple examples will be shown here.
  213.  
  214. Enter the following and click OK:
  215.  
  216.                 ADD2=Exeter
  217.  
  218. The report window appears showing just one record: the one for Bloggs. ADD2
  219. is called the TAG of the field. The label which appears beside a field on
  220. the screen is called its DESCRIPTOR and you might have expected such
  221. labels to be used to refer to fields in search formulae. This is not done
  222. for two reasons:
  223.  
  224. (1) Descriptors can be inconveniently long for use in this way.
  225. (2) Fields don't necessarily have descriptors. Of the 5 address fields only
  226. the first has a descriptor (ADDRESS). Since every data field needs a
  227. "handle" of some sort we give each a tag, which is never more than 4
  228. characters. Clicking MENU over a field makes its tag appear in the second
  229. menu item.
  230.  
  231. You may have noticed that Bloggs' is not the only address in Exeter. There
  232. is another one but with Exeter in ADDR3 rather than ADDR2. Can we print both
  233. on the same list? Yes we can! The formula needed is:
  234.  
  235.                 ADD2,ADD3=Exeter
  236.  
  237. Notice the way the alternative tags are separated by commas. We call this a
  238. TAG LIST. A record will be printed if ANY of the tags in the tag list are
  239. matched. The part of the search formula after the = sign is the TARGET and
  240. here too we may specify several of them in a TARGET LIST. Try the following:
  241.  
  242.                 ADD3=Exeter,Anytown
  243.  
  244. and also:       ADD2,ADD3=Exeter,Anytown
  245.  
  246. The characters we want to match don't, of course, always make up the entire
  247. field. Can we search for PART of a field. Yes indeed! Suppose you wanted the
  248. records for people called Peter, Fred and Jean. Enter the formula:
  249.  
  250.                 NAME{Peter,Fred,Jean
  251.  
  252. and you will find that the records for Peter Badgery, Fred Bloggs and Jean
  253. Ford are printed. The { (left curly bracket) means "contains". i.e. the name
  254. field doesn't have to CONSIST of Peter, or Fred or Jean, but has to CONTAIN
  255. one of these names somewhere within it.
  256.  
  257. Hard copy
  258. ---------
  259. So far you have only displayed reports in a window. What if you want to send
  260. them to your printer? Nothing could be easier. Load up !Printers, switch on
  261. the printer then click MENU over the displayed report. 'Save as text' leads
  262. to a standard 'Save' box from which you can drag the file icon to !Printers.
  263. You could, of course, also drag it to a directory window to save it. Or you
  264. could simply type <Return>, in which case the report would be saved with the
  265. default name 'List' in a directory called 'PrintJobs' which is inside the
  266. 'Friends' database directory. Every Powerbase database has a 'PrintJobs'
  267. directory to use as a general "dumping ground" for generated output. Such
  268. directories are apt to get cluttered and need "mucking out" from time to
  269. time.        
  270.  
  271. Closing down
  272. ============
  273. A database may be closed down by choosing the Close database entry from the
  274. icon bar menu. When you do so all relevant data stored in memory is saved to
  275. disc and the database is closed. You do not have to do anything to save the
  276. database file itself to disc since it has been there all along. Only the
  277. current record is in memory at any one time and this is automatically
  278. written back to disc when it has been changed in any way.
  279.  
  280. If you are going to use another database straight away just double click on
  281. it or drag it to the Powerbase icon on the icon bar. In fact you don't even
  282. need to close the previous database before doing this; Powerbase will do it
  283. for you.
  284.  
  285. When working with a database on the RAM disc Powerbase will issue a warning
  286. that the data is not secure and that you need to drag it from the RAM disc
  287. to a floppy or hard disc before switching off.
  288.  
  289. To terminate Powerbase itself use the Quit option on the icon bar menu.
  290.  
  291.  
  292.  
  293.