Docuthek Copyright 1995 Informatik Inc. All Rights Reserved. Infothek is a trademark of Informatik Inc. info@informatik.com 76534.1166@compuserve.com T U T O R I A L Last updated: 07-10-95 CREATE DATABASE 1. From the blank Docuthek screen (no windows open) choose Design Database from the Database menu. The Database Selection window is displayed. The Database Administration is a separate program, linked to Docuthek. If, for security reasons, you want to make the Database Administration inaccessible to Docuthek users, move the Database.exe and Database.hlp files to another directory. 2. We will now create a brand new database. Therefore, we shall NOT select an existing database from any listed databases . Instead please select Create New Database from the Options menu. 3. In the prompt box, type the full path and name of the new database, e.g. C:\MYDIR\MYDB and choose OK. A second prompt for the table name appears. 4. In the prompt box, type the name of the table. If at all possible, you should avoid spaces in the table name. Choose OK. The Database Design window is now displayed. 5. Now you must specify all the fields for the table. The field specification consists of a field name, a data type (such as number, text, date, etc.) and if the field is an text type, then the size of the field. Click the first cell in the grid box (Field, first column, first blank row). In the box with the blinking insertion point, type the name of the first field. The field name should not have spaces, if possible. Click the second cell in the same row (Type). A list of data types is displayed. Select the 'Text' item, assuming you want the field to be alpha-numeric. Since this is a 'text' data type. we must specify the length of the field. Click the third column of the same row (Size) and in the input box type 20 (assuming we want the field to accommodate up to 20 characters.). Numeric fields do not need a field size. Repeat the above steps for all the fields in the table. For the Docuthek imaging system, you must have a field named IMAGEFILE. This field will hold the image's file name. Normally, the Imagefile field will be the last field. The file size of the Imagefile field should not be less than 20 to accommodate the path and extension name of the image file. 6. Review the entries. If everything is correct, press the Create button. Please be aware that fields cannot be removed from a table once the table is created. To remove a field, you will need to delete the table and rebuild it. 7. The next prompt is for our international users. The database needs to know what language to use when sorting the data. If your language is English, French, German, Italian, choose OK. If you want to specify another language, press Cancel and select the language from a list of available languages. 8. The database is now being build. 9. It is advisable to create indexes for the table. Indexes can improve the performance of the database significantly. To create an index, select Create Index from the Options menu. In the Index Name field, type the name of the index (any name up to 8 characters, no spaces). From the Field List select the first index field and specify the sorting mode by pressing the Ascending or Descending button. Select other fields that are part of the index (optional). Specify 'Primary' and 'Unique' if appropriate. Review the index data displayed in the Index Definition box, and if correct, press the Create button. If you have several indexes for the table, repeat this process, giving each index a different name. You need to understand the meaning of the 'primary' and 'unique' flags. Each table can have one primary key; this is the main sorting key. If you specify an index to be unique, the system will ensure that duplicate values cannot be posted. Primary indexes are 'unique' by definition. 11. You should now review the newly created database. From the Options menu, choose View Database Structure. The detail of the database is displayed. To print the information, press the Print button. 10. Additional tables and fields can be added to existing databases. To do so, you must first select the database (and table, if it exists) from the lists on he Database Selection screen. Then, from the Options menu, select Add New Table or Add Fields. 11. The Database Administration allows you to restructure the database, to repair and compact fragmentated databases. Use Database Administration also to import ASCII files, to make global adjustments, to delete tables and indexes. As indicated above, individual fields cannot be deleted from tables. If a field is redundant, you should create a new table and transfer the date from the old table to the new table with the Restructuring function. Databases can be deleted only with the File Manager. 12. The Database is now created, and we can start to post our entries. INDEXING IMAGES 1. Close the Database Administration system. The following assumes that you already have scanned in a few documents. Documents can be scanned with a scanner or with a fax machine. It does not matter what file name you gave to the images, in what directory they are placed, or in what graphics format they are saved (most popular formats are supported).. 2. From the toolbar, choose the Imaging button (camera). The Imaging window is displayed. (If a database has not been previously specified, you will need to select the database first. The database is selected by choosing the Database Selection button in the toolbar and specifying the database and table.) 3. From the File menu, select Open Image File. In the Open dialog box, specify the directory and the image file name. Press OK. The selected image is displayed. 4. From the toolbar, choose the Data Edit and Indexing button (pencil). The Data Edit and Indexing window is displayed. 5. Complete all the fields. You can move to the next field by pressing Enter, the down-arrow key or tab. To move back, press the up-arrow key or Shift-Tab. 6. Normally, we want to copy the image to a permanent file, such as an optical disk. Click the directory field (at the top of the Data Edit and Indexing screen). In the Document Directory dialog box, select the directory of the permanent file. Also select the Graphics Format for the new file, normally TIFF. Then, press on OK. In the File Name field of the Data Edit and Indexing window, type the new file name. The file name should consist of trailing numerals, so that the file naming can be automated for a batch of documents (for example IMG0001). Do not type an extension name (the system uses the graphics format as an extension name).. 7. Choose Commit New or Commit Append. Commit New creates a new file, whereas Commit Append appends the image as a new page to an existing file. Only TIFF and DCX formats allow multiple pages. 8. Click on the document image that you just indexed. This important step is required to reactivate the imaging window. From the File menu, select the next document that needs to be indexed. Power users please note that you can quickly retrieve the next image by pressing F5 if the image name has trailing numerals. The next document image is displayed. 9. Click the Data Edit and Indexing window to activate it. Please note that the directory information is retained from the previous entry. If the new file name has trailing numerals (recommended), simply press the Increment button to set the next sequential file number. Complete all fields and press the Commit New or Commit Append button. 10. Post several entries so that we can run a meaningful query. 11. When all documents are indexed and copied to the permanent files, you may wish to delete the temporary files. 12. To edit existing records, locate the record with the search function in the Data Edit and Indexing window. Activate the field that you want to search, then, choose the Search menu. In the prompt, type the search characters and press the Search button. All matching records are lined up and you can view them one at the time with the left and right arrow buttons, or use the appropriate function in the File menu. Make the necessary changes and press the Confirm button. To restore the data of a record, choose Restore Record from the File menu. To delete a record, choose Delete Record from the File menu. QUERIES Docuthek has a powerful (SQL-based) query engine. This tutorial will introduce you to the basic query technique. The query engine is very powerful and extensive. This tutorial will show you just the 'tip of the iceberg'. 1. In the toolbar choose the Query button (question marks). (If you want to query another database, choose the Database Selection button first.) The Query window is displayed. 2. The first column of the Query builder list all available fields of the table. All fields are marked with a blue checkmark. Each marked field will be displayed as a separate column in the report. You can remove a checkmark, by clicking the appropriate Select cell or by pressing the delete button while in the Select cell. To add a checkmark, simply click the cell. 3. Most searches are done by filtering out selected data. Click the field name that you want to filter. In the input box at the top of the screen (with the blinking insertion point), enter the filter criteria. For example, if you want to search for NY in the State field, type NY. You can add filters to several fields. 4. Press the Query button (green spot). The report shows all records that have 'NY' in the State field. 5. Press the Clear button (cross-out) to clear the screen and try another query. You have noticed that the system automatically defaults the Filter Operator. If the data type of the field is 'text', the default Filter Operator is LIKE and the system looks for a pattern. If the data type of the field is 'numeric', the default Filter Operator is '=' and the system looks for an exact match. For LIKE operators, the system always appends the '*' wildcard character. Therefore, if you search for JOHN the system will retrieve all names starting with JOHN, including JOHN, JOHNSON, etc. To remove the wildcard character, simply specify 'JOHN'. As you have seen, the system features a large number of operators, such as >=, BETWEEN, IN, etc. Furthermore, there are functions for aggregates, such as count, maximum, average, etc. Finally, you can sort the display, reformat the values, and show totals at the bottom of the report. Sometimes, the reported data cannot all be shown on the screen. Horizontal and vertical scroll bars allow you to view the hidden part of the report. Also, if you click the right mouse button, the system displays a summary of the record. The report can be printed, exported or copied to the Windows Clipboard. There are two methods of printing: horizontal and vertical presentation. If you tag certain records with the checkmark, only the tagged items will be printed or exported. To tag a record, simply double click on it. To remove the tag, double-click it again, or press the Delete button. Only the highlighted area is copied to the clipboard. The system has many features that are beyond the scope of this tutorial. Please read the help topics on the Refine function, re-sequencing the columns, re-sizing the column width, adding calculated columns, editing the SQL statement, purge, etc. The SQL query supports most of the common functions. Please review the DOCUTHEK.FAQ file for examples of queries. This file will be updated regularly based on user questions and it can be downloaded from CompuServe library and Informatik's homepage on the Internet. If you cannot find the file, please send an email message to info@informatik.com or CompuServe 76534,1166. VIEW A DOCUMENT IMAGE If you want to integrate the query with the imaging system, one of the fields in the database table must be called IMAGEFILE. 1. In the SQL report click the record that holds the image. You can click any cell on that row. The content of the cell will become the heading (title) of the displayed image. 2. Press on the Imaging button(camera) in the Query window (NOT the toolbar at the very top), or Function Key 12. The image is displayed. 3. To change the attributes of the image (size, rotation, etc), choose the View menu. 4. Please read the online help on how to zoom in, copy, and print. 5. To close the image, double-click on the control in the upper-left corner of the image window, or choose Close from the File menu. You can also view images without running a query. From the File menu, choose Open Image File and specify the directory and image file name. If you want to display several images, choose Open New Image from the File menu, then choose Open Image File. If you lost an image, it is probably hiding behind the active screen. Simply choose the Windows menu and click the image file that you want to bring to the foreground.