home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / apps / powerbase / Beginners / !Qtutorial
Encoding:
Text File  |  1994-08-27  |  14.9 KB  |  294 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.                        
  71. Searching for a record 
  72. ====================== 
  73. The fifth button on the second row of the keypad shows a question mark
  74. followed by a "record card" icon  We will call it the Search button. When
  75. clicked with SELECT the keypad window grows an extension on the right-hand
  76. side. This new area contains a writable icon in which to enter the key of
  77. the record you wish to display. Suppose you want to see the record for
  78. "Bloggs Fred". You need to enter the KEY for the record. In this database
  79. keys are made up from the first 4 letters of the surname plus the initial.
  80. The required key is therefore BLOGF. Enter this and either click on OK or
  81. type <Return> and the record will be displayed. Note that the key is shown
  82. in the window heading.
  83.  
  84. Editing the Database
  85. ====================
  86. This part of the tutorial involves changes to the data records. Make a
  87. working copy of the disc and put the original in a safe place. If you are
  88. using a copy of 'Friends' on the RAM disc then the floppy disc won't be
  89. altered, but it's still not a good idea to work with the original disc.
  90.  
  91. Modifying records
  92. -----------------
  93. Pointing the mouse at any field and clicking SELECT places the caret in that
  94. field. The contents of the field may then be edited in the standard way for
  95. RISC OS writable icons. i.e.
  96.  
  97.        CTRL U clears the field.
  98.        DELETE removes the character to the left of the caret.
  99.        COPY removes the character to the right of the caret.
  100.        SHIFT/COPY deletes the word to the right of the caret.
  101.        CTRL/COPY deletes everything from the caret to the end of the line.
  102.        ⇦ and ⇨ move the caret left/right by one character.
  103.        SHIFT ⇦ and SHIFT ⇨ move the caret left/right by one word.
  104.        CRTL ⇦ and CTRL ⇨ move the caret to start and end of the field.
  105.           
  106. Changes made to a record cause the record to be written back to the database
  107. whenever you display a different record or close the database. (There is a
  108. button on the keypad called 'Force update' but you don't normally need to
  109. use it.)
  110.  
  111. Recovering data after a mistake
  112. -------------------------------
  113. You will sometimes edit the wrong field by mistake and want to restore the
  114. previous contents. Click MENU over the field. The second entry on the main
  115. menu contains the "tag" of the field. Follow the right-pointing arrow to the
  116. 'Field' sub-menu and choose the last entry: 'Undo changes'. Similarly, if
  117. you make a mess of a complete record and want to go back to the way it was
  118. you can choose 'Undo changes' from the main menu.
  119.  
  120. It is important to realise that these 'undo' facilities will not work if you
  121. have looked at another record before using them (or clicked on 'Force
  122. update'). In other words you can recover data which has been altered in or
  123. removed from the currently-displayed record only.
  124.  
  125. Adding and deleting records 
  126. ---------------------------
  127. To add a new record you use the "add record" button which looks like a plus
  128. sign and an index card. Clicking on this offers a blank record into which
  129. you can type some new data. You don't have to complete all the fields, in
  130. fact the only field into which you MUST type something is the NAME field.
  131. This is the KEY FIELD; the one from which the key, mentioned earlier, is
  132. derived. If you leave the key field blank then nothing will be written to
  133. the database.
  134.  
  135. Type the name "Bodmin George", then go to the beginning of the file and
  136. step through it record by record. You will find that your new record has
  137. been inserted in the correct place, i.e. the sequence goes: Badgery, Bloggs,
  138. Bodmin, Cavendish.
  139.  
  140. Now let's try deleting the record you've just added. There is a "dustbin"
  141. button  which will do just that: but don't use it yet. Make sure that the
  142. unwanted record is on the screen and click the button to the RIGHT of the
  143. bin. You will now find that the record has vanished; the names run straight
  144. from Bloggs to Cavendish, just as they did before you added Bodmin.
  145.  
  146. Wasn't that rather TOO easy? Suppose you clicked the button by mistake and
  147. deleted an important record! Powerbase handles this very nicely. The record
  148. hasn't really been deleted at all. To prove this, click the button above the
  149. one you used for "deleting". The button shows a green right-pointing arrow
  150. and a "card index" icon. There's Bodmin again! You will soon find that it
  151. appears to be the ONLY record in the file! Don't worry; nothing has been
  152. lost.  A Powerbase database is treated as six separate SUBFILES  numbered
  153. 0-5. When you first open the database you are looking at Subfile 0 and the
  154. heading of the record window shows this. If you look at the heading now you
  155. will see that it has changed to Subfile 1.
  156.  
  157. The buttons on either side of the bin carry pictures which suggest their
  158. true functions. They do NOT delete records; they merely MOVE records from
  159. one subfile to another. The right button moves the displayed record to the
  160. next subfile in sequence. Thus, in the above case the "Bodmin" record has
  161. been moved from subfile 0 to subfile 1. A record in subfile 1 would be moved
  162. to subfile 2 and so on.  What happens when it gets to 5? The next click
  163. shoves it into subfile 0 where it was originally. As you might have guessed,
  164. the left button moves records in the opposite direction, i.e. from subfile 1
  165. to 0 or from subfile 0 to 5.
  166.  
  167. What happens when you DO want to lose a record for good?  That's when you
  168. consign it to the dustbin!  Since this button's action is more drastic than
  169. that of the other two you are asked for confirmation before deletion occurs.
  170.  
  171. Printing Lists
  172. ==============
  173. Before Powerbase can produce a list it must be told:
  174.  
  175.            * which FIELDS should appear on the list
  176.            * which RECORDS should appear on the list.
  177.  
  178. Making the field selection
  179. --------------------------
  180. Specifying the fields you want is extremely easy. To include a field simply
  181. point the mouse at it and click with ADJUST. The selected field will then
  182. appear in inverse video (i.e. normally white on black). If you change your
  183. mind about a field you can de-select it by clicking on it again with ADJUST.
  184. The order in which the fields will appear in the printed list is the order
  185. in which you select them. Take care with this since there is nothing on the
  186. screen to indicate what order the fields will be in.  The fields chosen for
  187. inclusion in a printout make up a SELECTION  which may be saved and reloaded
  188. for future use. Just for now select the name and the first 3 fields of the
  189. address.
  190.  
  191. Choosing which records to print
  192. -------------------------------
  193. Specifying which records to print is somewhat more complex, although efforts
  194. have been made to render it as simple as possible. With the mouse pointer in
  195. the record window click MENU. This displays the main Powerbase menu from
  196. which you should choose Print.  A small window appears in which you can
  197. specify the criteria which must be met by records for inclusion in the list.
  198. If you just click Print (or type <Return>) without entering anything here you
  199. will obtain a list of the whole database (or, more accurately, of the the
  200. whole of the current subfile). Try this first.
  201.  
  202. When the search is complete the list will be displayed in a window. If you
  203. point to a record in the displayed list and double-click with SELECT
  204. Powerbase will display the chosen record in the main record window. Note
  205. that the caret is placed in the field you were pointing to on the list. This
  206. is very useful if you spot errors in the data whilst examining a list. A
  207. double click on the offending item offers the record with the caret
  208. correctly positioned for editing.
  209.  
  210. Most database queries, however, don't involve printing all the records! You
  211. will usually need to enter a SEARCH FORMULA before clicking OK. Search
  212. formulae can be quite complex and a more detailed treatment is given in
  213. another document. Only a few simple examples will be shown here.
  214.  
  215. Enter the following and click OK:
  216.  
  217.                 ADD2=Exeter
  218.  
  219. The report window appears showing just one record: the one for Bloggs. ADD2
  220. is called the TAG of the field. The label which appears beside a field on
  221. the screen is called its DESCRIPTOR and you might have expected such
  222. labels to be used to refer to fields in search formulae. This is not done
  223. for two reasons:
  224.  
  225. (1) Descriptors can be inconveniently long for use in this way.
  226. (2) Fields don't necessarily have descriptors. Of the 5 address fields only
  227. the first has a descriptor (ADDRESS). Since every data field needs a
  228. "handle" of some sort we give each a tag, which is never more than 4
  229. characters. Clicking MENU over a field makes its tag appear in the second
  230. menu item.
  231.  
  232. You may have noticed that Bloggs' is not the only address in Exeter. There
  233. is another one but with Exeter in ADDR3 rather than ADDR2. Can we print both
  234. on the same list? Yes we can! The formula needed is:
  235.  
  236.                 ADD2,ADD3=Exeter
  237.  
  238. Notice the way the alternative tags are separated by commas. We call this a
  239. TAG LIST. A record will be printed if ANY of the tags in the tag list are
  240. matched. The part of the search formula after the = sign is the TARGET and
  241. here too we may specify several of them in a TARGET LIST. Try the following:
  242.  
  243.                 ADD3=Exeter,Anytown
  244.  
  245. and also:       ADD2,ADD3=Exeter,Anytown
  246.  
  247. The characters we want to match don't, of course, always make up the entire
  248. field. Can we search for PART of a field. Yes indeed! Suppose you wanted the
  249. records for people called Peter, Fred and Jean. Enter the formula:
  250.  
  251.                 NAME{Peter,Fred,Jean
  252.  
  253. and you will find that the records for Peter Badgery, Fred Bloggs and Jean
  254. Ford are printed. The { (left curly bracket) means "contains". i.e. the name
  255. field doesn't have to CONSIST of Peter, or Fred or Jean, but has to CONTAIN
  256. one of these names somewhere within it.
  257.  
  258. Hard copy
  259. ---------
  260. So far you have only displayed reports in a window. What if you want to send
  261. them to your printer? Nothing could be easier. Load up !Printers, switch on
  262. the printer then click MENU over the displayed report. 'Save as text' leads
  263. to a standard 'Save' box from which you can drag the file icon to !Printers.
  264. You could, of course, also drag it to a directory window to save it. Or you
  265. could simply type <Return>, in which case the report would be saved with the
  266. default name 'List' in a directory called 'PrintJobs' which is inside the
  267. 'Friends' database directory. Every Powerbase database has a 'PrintJobs'
  268. directory to use as a general "dumping ground" for generated output. Such
  269. directories are apt to get cluttered and need "mucking out" from time to
  270. time.        
  271.  
  272. Closing down
  273. ============
  274. A database may be closed down by choosing the Close database entry from the
  275. icon bar menu. When you do so all relevant data stored in memory is saved to
  276. disc and the database is closed. You do not have to do anything to save the
  277. database file itself to disc since it has been there all along. Only the
  278. current record is in memory at any one time and this is automatically
  279. written back to disc when it has been changed in any way.
  280.  
  281. If you are going to use another database straight away just double click on
  282. it or drag it to the Powerbase icon on the icon bar. In fact you don't even
  283. need to close the previous database before doing this; Powerbase will do it
  284. for you.
  285.  
  286. When working with a database on the RAM disc Powerbase will issue a warning
  287. that the data is not secure and that you need to drag it from the RAM disc
  288. to a floppy or hard disc before switching off.
  289.  
  290. To terminate Powerbase itself use the Quit option on the icon bar menu.
  291.  
  292.  
  293.  
  294.