home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / visquein.zip / FTB1OATS.INF (.txt) < prev    next >
OS/2 Help File  |  1994-07-12  |  48KB  |  355 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Welcome ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5. ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
  6.  
  7.  
  8. ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
  9.  
  10.                                  Welcome to the
  11.                                    Visualizer
  12.                              SQL Statement Tutorial
  13.                        (C) Copyright IBM Corporation 1994
  14.  
  15. Double-click on the arrow to continue. 
  16.  
  17.  
  18. ΓòÉΓòÉΓòÉ 2. Using this Tutorial ΓòÉΓòÉΓòÉ
  19.  
  20.  Using this tutorial 
  21.  
  22. The Visualizer tutorial windows have been designed to occupy only 40 percent of 
  23. your screen. This is to allow you to run Visualizer at the same time as viewing 
  24. a tutorial. 
  25.  
  26. In this way you can perform the tutorial steps using the real product and not a 
  27. product simulation as in so many online tutorials. 
  28.  
  29. Before you start to read the lesson steps, it is recommended that you will: 
  30.  
  31. o Open the Visualizer folder 
  32. o Size the Visualizer window so that it fits neatly next to the tutorial window 
  33.  
  34. By performing the tutorial steps using the real Visualizer product, you will 
  35. familiarize yourself with the feel, functions, and features of the product. 
  36.  
  37. All the tutorials in the Visualizer product are structured in a similar way. If 
  38. you have not used a Visualizer tutorial before, double-click on any of the 
  39. following topics for further information: 
  40.  
  41. o Highlighted terms 
  42. o Lessons and steps 
  43. o Why 
  44. o Which lessons to follow 
  45.  
  46.  
  47. ΓòÉΓòÉΓòÉ <hidden> Lessons and Steps ΓòÉΓòÉΓòÉ
  48.  
  49.  Lessons and steps 
  50.  
  51. Visualizer tutorials are divided into lessons and each lesson is further 
  52. divided into steps. 
  53.  
  54. At the start of each lesson there is a lesson overview, followed by a list of 
  55. lesson steps. The lesson steps are hypertext links to the steps themselves. To 
  56. start the tutorial at the beginning, double-click on the first step. 
  57.  
  58. At the end of each lesson there is an overview which recaps on the concepts and 
  59. steps you should be familiar with. 
  60.  
  61.  
  62. ΓòÉΓòÉΓòÉ <hidden> Highlighted Terms ΓòÉΓòÉΓòÉ
  63.  
  64.  Highlighted terms 
  65.  
  66. If you see any words or phrases that are highlighted like this: hypertext you 
  67. can double-click on them to get more information. 
  68.  
  69. The information is displayed in a new window like this one. When you have 
  70. finished reading it, close the window in one of the following ways: 
  71.  
  72. o Press the Esc key on your keyboard 
  73. o Double-click on the System menu 
  74. o Select Close from the System menu 
  75.  
  76.  
  77. ΓòÉΓòÉΓòÉ <hidden> Why ΓòÉΓòÉΓòÉ
  78.  
  79.  Why 
  80.  
  81. At the start of each lesson you will see this: 
  82.  
  83. (Why?) 
  84.  
  85. Double-clicking on the word (Why?) will display further information about the 
  86. purpose of the lesson and help to explain how the lesson is related to the 
  87. lessons which precede and follow it. 
  88.  
  89.  
  90. ΓòÉΓòÉΓòÉ <hidden> Which Lessons to Follow ΓòÉΓòÉΓòÉ
  91.  
  92. Which lessons to follow 
  93.  
  94. If you are unfamiliar with Visualizer, we recommend that you work through each 
  95. lesson sequentially. 
  96.  
  97. To do this, when you have read the overview of each lesson, double-click on the 
  98. title of the first lesson. 
  99.  
  100. If you are familiar with some aspects of Visualizer, be selective about which 
  101. lessons you work through. Read all the lesson overviews before you select which 
  102. lessons you want to follow. 
  103.  
  104. To go on to other lessons, follow the navigational help that is given at the 
  105. end of each lesson. 
  106.  
  107.  
  108. ΓòÉΓòÉΓòÉ 3. Visualizer SQL Statement Lessons ΓòÉΓòÉΓòÉ
  109.  
  110.  Visualizer SQL Statement Lessons 
  111.  
  112. Use Visualizer SQL Statement to create, run, and store an SQL statement and to 
  113. view, manipulate, or print any result. 
  114.  
  115. An SQL statement object is used to hold executable SQL statements that can be 
  116. dynamically prepared. This includes the most common statements used for the 
  117. following tasks: 
  118.  
  119. o Creating, updating, and deleting tables and views 
  120.  
  121. o Creating an index 
  122.  
  123. o Selecting data 
  124.  
  125. o Controlling access to data 
  126.  
  127. Visualizer SQL statements are usually defined by experienced SQL users, but 
  128. once they are defined anyone can use them. 
  129.  
  130. Lesson 1: Running an SQL Statement 
  131. In this lesson you will learn how to run a Visualizer SQL statement. Running an 
  132. SQL statement does not require any previous knowledge of SQL. 
  133.  
  134. This lesson takes 10 minutes to complete. 
  135.  
  136. Lesson 2: Defining an SQL Statement 
  137. In this lesson you will learn how to define a Visualizer SQL statement. 
  138. Defining an SQL statement requires knowledge of SQL. 
  139.  
  140. This lesson takes 15 minutes to complete. 
  141.  
  142.  
  143. ΓòÉΓòÉΓòÉ 4. 1. Running an SQL Statement ΓòÉΓòÉΓòÉ
  144.  
  145.  Running an SQL statement 
  146.  
  147. In this lesson you will learn how to run a Visualizer SQL statement and view 
  148. the result. It assumes that the Visualizer SQL statement has been previously 
  149. created and requires no previous knowledge of SQL from you. 
  150.  
  151. (Why?...) 
  152.  
  153. Steps 
  154. 1. Run the SQL statement object. 
  155. 2. Browse and save the results. 
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 4.1. 1.1 Run the SQL Statement ΓòÉΓòÉΓòÉ
  159.  
  160. Open the folder where the SQL statement object is stored. 
  161.  
  162. Select the SQL statement object. 
  163.  
  164. The pop-up menu for the SQL statement is displayed. 
  165.  
  166. Select the arrow to the right of Open. 
  167.  
  168. The cascaded menu for Open is displayed. 
  169.  
  170. Select Run SQL. 
  171.  
  172. If Run SQL has a check mark next to it, it is the default selection on the 
  173. cascaded menu. In this case, you can run the SQL statement by simply 
  174. double-clicking on its icon. 
  175.  
  176. The results of the statement are displayed in a data browsing window. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 4.2. 1.2 Browse and Save the Results ΓòÉΓòÉΓòÉ
  180.  
  181. Scroll through the data in the data browsing window. 
  182.  
  183. As the data is displayed in a data browsing window you can look at the result, 
  184. but you cannot update it. However, you can save the result in several different 
  185. data formats. 
  186.  
  187. Select Export from the Results menu in the Data Viewer window. 
  188.  
  189. The Export window is displayed. 
  190.  
  191. Save the result as a Visualizer table. This will mean that you can look at it 
  192. at a later time and make any changes to it that you want. 
  193.  
  194.  
  195. ΓòÉΓòÉΓòÉ <hidden> Why Run an SQL Statement ΓòÉΓòÉΓòÉ
  196.  
  197. SQL statements can be used to automate data retrieval and management tasks. 
  198. Tasks such as retrieving data from a database, creating and deleting tables in 
  199. a database, preparing an index on a table, or granting and revoking privileges 
  200. on a database. 
  201.  
  202. Once they have been defined, SQL statements are very easy to use. They make 
  203. what could be complicated database tasks into tasks that are quick and easy to 
  204. execute. 
  205.  
  206. In addition, they allow a user who is not familiar with SQL to execute SQL 
  207. database retrieval and administrative tasks which they would otherwise not be 
  208. able to do. 
  209.  
  210. This lesson explains just how quick and easy it is to run an SQL statement to 
  211. retrieve data from an SQL database. 
  212.  
  213.  
  214. ΓòÉΓòÉΓòÉ 5. 2. Defining an SQL Statement ΓòÉΓòÉΓòÉ
  215.  
  216.  Defining an SQL statement 
  217.  
  218. In this lesson you will create and define a new SQL statement. 
  219.  
  220. In order to complete this lesson you must have previous knowledge of SQL. 
  221.  
  222. (Why?...) 
  223.  
  224. Steps 
  225. 1. Create a copy of the template SQL Statement. 
  226. 2. Rename your SQL statement. 
  227. 3. Associate it with a database. 
  228. 4. Type your SQL statements. 
  229. 5. Save your changes and close the object. 
  230.  
  231.  
  232. ΓòÉΓòÉΓòÉ 5.1. 2.1 Copy the Template ΓòÉΓòÉΓòÉ
  233.  
  234. Open the Visualizer folder. 
  235.  
  236. The Visualizer folder contains the Shadows of Templates folder. 
  237.  
  238. Open the Shadows of Templates folder. 
  239.  
  240. The Shadows of Templates folder contains templates for all the Visualizer 
  241. objects. You can use these templates to create your own Visualizer objects. 
  242.  
  243. Drag the Visualizer SQL Statement template icon and drop it on the folder where 
  244. you want to store the new SQL statement. 
  245.  
  246. You have now created a new Visualizer SQL statement object in your target 
  247. folder. 
  248.  
  249.  
  250. ΓòÉΓòÉΓòÉ 5.2. 2.2 Rename the SQL Statement ΓòÉΓòÉΓòÉ
  251.  
  252. Open the folder where your new Visualizer SQL statement is stored. 
  253.  
  254. Hold down the Alt key. 
  255.  
  256. Select your new Visualizer SQL statement. 
  257.  
  258. Release the Alt key. 
  259.  
  260. Overtype the title with one of your own. 
  261.  
  262. Select on an empty part of the folder to save your changes. 
  263.  
  264. You have now renamed your new SQL statement object and saved the changes. 
  265.  
  266.  
  267. ΓòÉΓòÉΓòÉ 5.3. 2.3 Associate it with a Database ΓòÉΓòÉΓòÉ
  268.  
  269. Open your new Visualizer SQL statement. 
  270.  
  271. Just below the tool bar is a list called Database. 
  272.  
  273. From the databases in the Database list, select the name of the database that 
  274. this SQL statement is to be associated with. 
  275.  
  276. The SQL statement connects to this database when it is run, but the SQL 
  277. statement is not stored in the database. 
  278.  
  279.  
  280. ΓòÉΓòÉΓòÉ 5.4. 2.4 Type in SQL statements ΓòÉΓòÉΓòÉ
  281.  
  282. Just below the Database list is a large entry field. Use this entry field to 
  283. type in your SQL statements. You can edit your statements using the standard 
  284. keyboard editing keys, and use the clipboard functions from the Edit menu. 
  285.  
  286. Type your SQL statements in the entry field. 
  287.  
  288. An SQL statement object can contain one SQL statement with any appropriate 
  289. subclauses. You can use most of the common SQL statements for selecting data, 
  290. creating and deleting tables and views, creating indexes, and for granting and 
  291. revoking privileges. 
  292.  
  293.  
  294. ΓòÉΓòÉΓòÉ 5.5. 2.5 Save and Close ΓòÉΓòÉΓòÉ
  295.  
  296. Select  from the tool bar. 
  297.  
  298. The changes you have just made to your new SQL statement have been saved. 
  299.  
  300. Double-click on the small icon in the title bar. 
  301.  
  302. The SQL statement you have created is closed. 
  303.  
  304.  
  305. ΓòÉΓòÉΓòÉ <hidden> Why Define an SQL Statement? ΓòÉΓòÉΓòÉ
  306.  
  307. Visualizer SQL statements allow you to harness your SQL expertise so that users 
  308. with little or no knowledge of SQL can access a database and perform routine 
  309. administrative tasks. 
  310.  
  311. Without the help of Visualizer SQL statements, all these tasks would have to be 
  312. performed by you. With the help of Visualizer SQL statements, you are free to 
  313. work on other more advanced and demanding jobs. 
  314.  
  315. This lesson shows you how easy it is to create a Visualizer SQL statement that 
  316. can be used by others. 
  317.  
  318.  
  319. ΓòÉΓòÉΓòÉ 6. Tutorial Review ΓòÉΓòÉΓòÉ
  320.  
  321.  Reviewing the SQL Statement Tutorial 
  322.  
  323. You should now feel confident about running a Visualizer SQL statement and, if 
  324. you are familiar with SQL, defining a Visualizer SQL statement. 
  325.  
  326. Understand what you did? 
  327. If you feel you did not understand all you did, consider going through the 
  328. lessons again. Next time, double-click on all of the (Why?...) fields for 
  329. lesson explanations and on all of the highlighted text fields for conceptual 
  330. information. 
  331.  
  332. For more information 
  333. You can find conceptual, control and task information in the Visualizer online 
  334. help and in Visualizer Query for OS/2: Using, SH45-5089-00. An online version 
  335. of this book is also provided in your Manuals folder. 
  336.  
  337. What to do now 
  338. You have now completed the SQL Statement tutorial. 
  339.  
  340. If you would like to repeat the tutorial, double-click here on the back-page 
  341. button: Alternatively close the tutorial window by double-clicking on the small 
  342. icon in the title bar. 
  343.  
  344.  
  345. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  346.  
  347. This is a footnote window. The highlighted terms in this tutorial are usually 
  348. displayed in larger windows. Press the escape key on your keyboard to close the 
  349. footnote. 
  350.  
  351.  
  352. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  353.  
  354. This is a footnote window. Why information is usually displayed in larger 
  355. windows.