Chapter 2
Reference Manual

2.1 Database Structure

Each card uses string of up to 36 characters as a unique key. Cards are indexed by key, title, author, and subject. The keys, titles, authors, and subjects are always compared in a case-insensitive fashion. That is, "The Door Into Summer" is the same as "THE DOOR INTO SUMMER". Internally, the keys, titles, authors, and subjects are converted to all uppercase letters. There is also a keyword table that associates keywords (search terms) with each card.





Name Type

Description




Key CHAR(36)

Unique key identifying the item. This is an arbitrary identifier and could be a LC catalog code or some other user-defined identifier. Each card has a unique value for this field.

Title CHAR(128)

The title or name of the item.

Author CHAR(64)

The author of the item. This could be the name of the performer for audio CDs.

Subject CHAR(128)

The subject of the item. What this item is generally about.

Description TEXT

The description of the item. This is unstructured text and can be whatever you want.

Location CHAR(36)

The location of the item. This is generally used to note the physical location of the item, such as a particular book self or the fact that it is out on loan, etc.

Category CHAR(36)

The category of the item. Some user defined category.

Media CHAR(36)

The media the item is on. The type of media of the item, such as hardbound book, or audio CD.

Publisher CHAR(36)

The publisher of the item. The publisher or producer of the item.

PubLocationCHAR(36)

The location of the publisher. The publisher’s location (usually just the city).

PubDate DATE

The date the item was published. The publication date.

Edition CHAR(36)

The edition of the item. Whether this is a first edition or a second edition, etc.

ISBN CHAR(20)

The ISBN of the item. If the item has one.





Table 2.1: Data fields in the “Card” table.

Each card contains thirteen (13) pieces of data as shown in Table 2.1. The keyword table consists of two data fields, a 64 character keyword and a 36 character card key.

2.2 Main GUI Window


PIC

Figure 2.1: The main window of the Home Librarian application



PIC

Figure 2.2: Card Catelog Drawer


The main window of the Home Librarian application, as shown in Figure 2.1, has a progress and status section at the top of the GUI1 , consisting of a “face” area and a progress and status area. The face area holds either a forward facing librarian image, when the GUI is idle and waiting for user input or a right profile when the application is working and not accepting input from the user. The status and progress either holds the message “How May I Help You?” or some sort of status message, usually detailing the number of matches found when searching, when the application is idle. When the application is working an animation of a card catalog drawer being opened and flipped through is displayed, as shown in Figure 2.2.


PIC

Figure 2.3: Main Window, annotated.


Below the progress and status section is the main interaction area. Initialially, this contains three big buttons giving access to the major functions of the application, as shown in Figure 2.3.

2.2.1 Buttons on the main window

There are two main functions supplied by the application: searching a card catalog database, described in Section 2.3 and editing a card catalog database, described in Section 2.4. The top most button in the initial (and idle) state of the main GUI selects the searching function. The next button selects the editing (update) function. The bottom button exits the application. All of these operations are available from the File menu item as well, along with some additional operations.

2.3 Searching a database (card catalog)


PIC

Figure 2.4: Search Window, annotated.


The Search function version of the Main GUI Window is shown in Figure 2.4. This version of the main window has a dropdown menu to select the search mode, a place for entering a search string, a search results list box, a set of search results disposition buttons, a notepad (text) area for making notes, and a set of buttons to manage the notepad area.

2.3.1 Types of searches

There are four types of searches, by title, by author, by subject, and by keyword. The search strings are considered SQL “LIKE” patterns. Like patterns use two wildcard characters: “%”, which matches any zero or more characters and “_” which matches exactly one character. The four search fields are stored in the database as all uppercase and the search string is itself converted to upper case, so the search is always performed in a case insensitive manor.

2.3.2 Search results and what to do with them

The search results are displayed as a list below the search string. These list elements can be selected and either added to the notepad area (and then printed or saved as a text file) or more information (the complete card record) can be requested.

2.3.3 The notepad area

The notepad area below the search results can be used to save selected result items and its contents can be printed, saved as a text file, or cleared.

2.4 Updating a database (card catelog)


PIC

Figure 2.5: Update Window, annotated.


The Update function version of the Main GUI Window is shown in Figure 2.5. This version of the main window has a place to enter a card key to edit, a dropdown menu to select the search mode, a place for entering a search string, a search results list box, a set of search results disposition buttons, and an Amazon search pane to get Amazon information about items in your library.

2.4.1 Editing a card by its key

Entering a card key and clicking on Edit Card will edit either an existing card (if the key is in use) or create a new card (if the key is not in use). The card editor window is shown in Figure 2.6. If this is a new card, the “Get New Card Template Or Amazon URL Dialog”, described in Section 2.5.6 is displayed. See Section 2.5.4 for more information about the card editor window.

2.4.2 Editing a card by searching for it

A search can be performed to find a card to edit. The searching is much the same as described in Section 2.3.1. Cards found by searching can be either edited or deleted.

2.4.3 Searching Amazon’s database

Amazon’s huge database of books, audio tapes, CDs, video tapes, and DVDs can be searched with the lower half of the update window. Result elements can be used to create new cards or used to provide information for existing cards. Amazon’s database can be searched entering search terms and selecting what type of items to look for, this includes books, music, video, CDs, and DVDs. It is also possible to use an ISBN or ASIN to look up a specific item. The search results are listed below the search entries and these items can be selected and used to create a new card or to just view the information in a new window (see Section 2.5.18).

2.5 Dialog Boxes

2.5.1 Get Connection String Dialog

This dialog box creates the connection string needed to connect to the database via the ODBC API. The dialog shows lists of the available drivers and available datasources. Either a datasource can be used directly or a connection string can be created from an available driver. One of the possible configuration files can be used to store the connection string for future invocations of the Home Librarian program.

2.5.2 Select A Template Dialog

This dialog box selects a template card.

2.5.3 Edit Template

This window edits a template card.

2.5.4 Edit Card


PIC

Figure 2.6: Edit Card Window, annotated.


The card editor window, shown in Figure 2.6, contains a collection of basic informational fields in its upper section, with a field containing descriptive text. Near the bottom is a section containing the keywords associated with this card, along with a set of controls for adding and deleting keywords. At the very bottom are buttons for saving the card, dismissing the card editor, and for getting help.

The short fields in the upper section are a standard collection of information fields, including the card identifcation (its unique key), title, the author, the subject, the location, the category, the media, the publisher, the edition, and the ISBN or ASIN of the item. Except for the identifcation field, all of the fields can be edited. The title, author, and subject fields are converted to all upper case letters for easy searching. The descriptive text is free form text that describes the item. The keywords can be any usefull search terms of your choosing. Keywords can be added or deleted. The keywords are converted to all uppercase letters for easy searching.

2.5.5 Get New Key Dialog

This dialog box gets a new key.

2.5.6 Get New Card Template Or Amazon URL Dialog

This dialog selects either a template or gets data from Amazon to initialize a new card.

2.5.7 Import Dialog

This dialog box selects a file and mode for data import.

2.5.8 Select Printer Dialog

This dialog box is used to select a printer or Postscript output file. The print format and other output details are also selected with this dialog box.

2.5.9 Select A Layout Dialog

This dialog box selects a print layout, either from the layout cache or from a disk file.

2.5.10 Edit Layout Text Tool Dialog

This tool dialog box is used to create a text item in a card layout.

2.5.11 Edit Layout Line Tool Dialog

This tool dialog box is used to create a line item in a card layout.

2.5.12 Edit Layout Rect Disk Tool Dialog

This tool dialog box is used to create a rectangle or disk item in a card layout.

2.5.13 Edit Layout Bitmap Tool Dialog

This tool dialog box is used to create a bitmap item in a card layout.

2.5.14 Edit Layout Resize Tool Dialog

This tool dialog box is used to resize an existing item in a card layout.

2.5.15 Edit Layout

This window provides for editing a card layout.

2.5.16 Print Progress

This window shows the print progress of either text output or cards.

2.5.17 More Info Window

This window shows more information about a selected card.

2.5.18 View Amazon Data