TASK 2: Design the Database
The next task is to design and build the database so it can produce the source files needed by MiniHelp Plus.In addition to the regular fields needed to hold data (e.g., last name, first name, street address, telephone number, and so forth), your database will also need fields to hold data components that make the Windows help (WinHelp) file function. (In this tutorial, I refer to them as 'help file descriptors'.) These include the following: Topic ID, Topic Title, Browse Sequence, and Search Keywords.
- Topic ID - Also known as the "context string". This uniquely identifies what follows as a single Windows help topic until the next Topic ID or the end of the source file appears. There must be no spaces in the context string, and it can contain only alphanumeric characters and the underscore (_) character. I have also used the period character (.) in the Topic ID. In my example source file, depersn2.src, individual topics are labeled "P.REY01", "P.REY02", and "P.REY03".
IMPORTANT: There must not be two identical Topic IDs within a single source file.
- Topic Title - This appears in the Windows help file search dialog when a search is made, a keyword is selected, and the topic(s) associated with the selected keyword is (are) listed. I confess, my example WinHelp phone book falls short in this feature, as I have chosen to use only the person's last name as the Topic Title. It would have been better if I had used both first names and last names to form Topic Titles for each of the phone book entries, especially since I gave all of my fictitious phone book entries last names of 'Reynolds'.
- Browse Sequence - If you want to let the WinHelp browse buttons, [<<] and [>>], take the user through a logical sequence of topics, then you will need to define the browse sequence for each of your topics. The browse sequence numbers are actually read alphanumerically, instead of numerically, by the Windows help engine, such that topics with browse numbers 1, 11, and 111 would be read before topic 2 because the alphanumerical character one (1) comes before two (2). To overcome this, use preceding zeroes in browse numbers (e.g., 0001, 0002, 0003, ... 0010, etc.).
- Search Keywords - Make a field in your database specifically for holding the search keywords assigned to WinHelp topics. Multiple keywords for a single topic are separated by a semi-colon (;) character.
Below is the main data entry form for my Daniel phone book database, divided into two screen-pages. I will discuss the fields in the form that are dedicated to providing Windows help file descriptors for each database record.
Each record in my database is given a unique identifier. You can see it in the "PersKey" field (upper left, first screen-page). To supply each database record with a unique Topic ID, I could use the PersKey field, with string manipulation to substitute an underscore (or a period) for the hyphen (-).
Redundantly, however, I also included a field on the second screen-page of the form called "topic name". I chose to use it, instead, to supply the Topic ID for each database record. (I discuss both options only to show that there can be different strategies for providing a unique Topic ID for each database record. The important criterium, though, is that the Topic ID must be unique.)
For Topic Title, at least in this phone book example, it would probably be best to use a string concatenation of the "Lastname" and "Firstname" fields. As I pointed out earlier, though, I am only using "Lastname" to form a Topic Title for each database record. You should develop a strategy that meets your application's needs.
Finally, note the fields on the second screen-page of the form for providing "browse no." and "search words". These provide each database record with a Browse Sequence and Search Keywords, respectively.
First screen-page of form |
![]() Second screen-page of form |