Main -> Documentation -> Database Builder – Pears  -> Creating a New Pears Database

Creating a New Pears Database

Beginning with the release of SiteSearch 4.2.0, you can create a second kind of local database called a Pears database by accessing an alternate version of the SiteSearch Database Operations Tool (SSDOT) application. Optionally, you can manually build and maintain Pears databases by using Bartlett, the Pears command line utility. Bartlett is also included in SiteSearch 4.2.0 and lies behind the main functionality of the new SSDOT for Pears. This topic specifically instructs you on how to use the new version of SSDOT to create a local Pears database.

Note: Two versions of SSDOT are available in SiteSearch 4.2.0. You access the original Newton version from your <WebZ_root>/dbbuilder/ssdot/exes sub-directory. It operates as it always has in previous releases of SiteSearch. Use this original version to construct and maintain Newton databases only. Access the new SSDOT for Pears from your <WebZ_root>/dbbuilder/pearsExes sub-directory. Use it to build and maintain your Pears databases.


Contents

Introduction
Document Convention
s
Registration Procedure

Update Procedure


Document Conventions

  • The marcus database is used as an example in each of the steps below. This fictitious database contains records in US MARC format.
  • <WebZ_root> is the location of your WebZ environment.

Introduction

Before initially building a Pears database, you need to assemble an input data file and choose an existing database description configuration file or define a new one. The former contains the pre-formatted records that you want to import and the latter contains the rules for generating indexes and storing records. After you have pulled together your data and modified or defined a database description configuration file, creating the database is a matter of accessing SSDOT to register and update the database. The procedures below provide detailed steps for using the SSDOT for Pears to register and populate a new Pears database.


Registration Procedure

1. Create a directory for your new Pears database using the database name.

Best Practice: For small to moderately-sized databases, the best practice is to create a sub-directory for your new Pears database files under <WebZ_root>/dbbuilder/dbs. For larger databases, you may want to consider another location for the files, including possibly putting them on another host. Wherever you put them, you need to remember the entire path to your database files in order to complete other steps during the registration or update procedures for the database.

 

Example:

If you were creating a new Pears database called marcus on a UNIX machine, you might execute the following commands from your system prompt:

>cd <WebZ_root>/dbbuilder/dbs

> mkdir marcus

> ls

ERIC dc dcq marccat marcus parks save scores


2. Copy the database description configuration file and the input data file into the new directory that you created in Step 1.

Best Practice:

You may name the database description configuration file anything you like. One way, however, to distinguish it from other configuration files is to use the "desc" root in its name. Following this convention and using the example from Step 2, you might choose marcusdesc.ini as the name of your database description configuration file.


3. Change directories to the <WebZ_root>/dbbuilder/pearsExes sub-directory.

4. Which operating system are you using?

  • UNIX: Type ssdot at the system prompt.
  • Windows NT: Double-click on the ssdot.bat file.

Result:

The following ssdot prompts should appear:

-----------SiteSearch Database Operations Tool----------

Type [newton] to do Legacy SSDOT Administration
or
Press [ENTER] key to do Pears Database Administration

--------------------------------------------------------

>


5. Press the Enter key.

Result:

The following Main Menu should appear:

#### SSDOT Pears Database Administration ####

Main Menu

1. Database Registration
2. BER Records
3. Database Creation and Maintenance
4. Database Backup
5. Advanced Options
6. Exit SSDOT

Working Database: No database selected

Type "l" To LIST available databases
Type "s" To SET a working database
Type "u" To UNSET the working database

Press [ENTER] key to return to Main Menu
>

 

6. Go to the Registration Menu by selecting 1 from the Main Menu and then pressing the Enter key.

Result:

The following SSDOT Registration Menu should appear:

#### SSDOT Pears Database Administration ####

Registration Menu

1. Add Database
2. Remove Database
3. Edit registration
4. Print registration
5. Exit SSDOT

Working Database: No database selected

Type "l" To LIST available databases
Type "s" To SET a working database
Type "u" To UNSET the working database

Press [ENTER] key to return to Main Menu
>

 

7. Select 1 and press the Enter key to begin adding a database to the Pears SSDOT environment.

Result:

The following prompt appears:

Name of database (must be unique):

8. Type a unique name for your new database and press the Enter key.

Example:

Name of database (must be unique): marcus


Result:

The following prompt appears:

Database description file:

9. Type the full path to the database description configuration file.

Example:

Database description file: <WebZ_root>/dbbuilder/dbs/marcus/marcusdesc.ini


Result:

The following confirmation information and prompt appear:

Database Name=marcus
Database File=
<WebZ_root>/dbbuilder/dbs/marcus/marcus.pdb
Description File=<WebZ_root>/dbbuilder/dbs/marcus/marcusdesc.ini
Backup Directory=<WebZ_root>/dbbuilder/dbs/marcus/backups
Log Directory=<WebZ_root>/dbbuilder/dbs/marcus/logs
Zbase File=Not Set

Is information correct? (yes/no)

 

10. Is the information correct?

  • Yes: Type "yes" and press the Enter key to complete the registration procedure and return to the Registration Menu.
  • No: Type "no" and press the Enter key.
Result:

The following edit menu appears:

################################################################
Database Name = marcus
Database File = <WebZ_root>/dbbuilder/dbs/marcus/marcus.pdb
Description File = <WebZ_root>/dbbuilder/dbs/marcus/marcusdesc.ini
Backup Directory = <WebZ_root>/dbbuilder/dbs/marcus/backups
Log Directory = <WebZ_root>/dbbuilder/dbs/marcus/logs
Zbase File = Not Set

################################################################
Field to edit:
1. Database name
2. Database file
3. Database description file
4. Backup directory
5. Logs directory
6. ZBase file

Type "s" to SAVE edits
Type "c" to CANCEL edits
>

Follow the instructions on the edit menu to correct the appropriate file names or directory paths and then type "s" and press the Enter key.


11. Press the Enter key to go back to the Main Menu.

 

Update Procedure

1. Select option 3 (Database Creation and Maintenance) from the Main Menu and press the Enter key.

Result:

The following Database Creation and Maintenance Menu appears:

#### SSDOT Pears Database Administration ####

Database Creation and Maintenance Menu

1. Update database
2. Validate database
3. Reorganize database
4. Reindex database
5. Delete database files
6. Log Files Menu
7. Convert Newton database to Pears database
8. Exit SSDOT

Working Database: No database selected

Type "l" To LIST available databases
Type "s" To SET a working database
Type "u" To UNSET the working database

Press [ENTER] key to return to Main Menu
>

2. Select option 1 from the Database Creation and Maintenance Menu and press the Enter key.


Result:

The following prompt appears:

Name of database to UPDATE or press [ENTER] to return to menu:


3. Type the name of the database that you want to populate and press the Enter key.

Example:

 

Name of database to UPDATE or press [ENTER] to return to menu: marcus

Result:

The following prompt appears:

Input File name or press [ENTER] key to return to menu:


4. Type the full path to the input file containing the records that you wish to load into the database and press the Enter key.

Example:

Input File name or press [ENTER] key to return to menu: <WebZ_root>/dbbuilder/dbs/marcus/marc.dat


Result:

The following prompt appears:

Number of records to UPDATE or [ENTER] for all:


5. Do you want to import only a certain number of records?

  • Yes: Type the number of records that you wish to import and press the Enter key. You must use a whole number such as 10, 100, or 345. Starting with the first record, SSDOT sequentially imports only as many records from the input data file as you have indicated.
Example:

Number of records to UPDATE or [ENTER] for all: 250

If your input file contains 600 records and you indicate that you want to import only 250 of them, SSDOT sequentially loads records 1 to 250 from the input file into the database.

  • No: Press the Enter key.

Result:

The following prompt appears:

Number of records to SKIP or [ENTER] for none:

6. Do you want to skip certain records during the import?

  • Yes: Type the total number of records that you wish to skip and press the Enter key. You must use a whole number such as 10, 100, or 345. Starting with the first record, SSDOT sequentially skips the number of records in the input file that you have indicated.
Example:

Number of records to SKIP or [ENTER] for none: 35

In this example, SSDOT would skip the first 35 records it read from the input file.

  • No: Press the Enter key.
Result:

The following prompt appears:

Type 2 for record locking or press the [ENTER] key for database locking:


7. What type of lock do you wish to engage during the update process?

  • Record Locking? Type 2 and press the Enter key. A lock is placed on each record as it is updated to prevent two users from modifying it at the same time. Single record locking slows down the overall update process, but it provides concurrent read and write access to all other records in the database.

  • Database Locking? Press the Enter key. A write protection is placed on the entire database during the update process. This is the default type of lock and it renders the entire database read-only during an update.
Result:

The following update report appears after the update has completed:

###################################################
# Bartlett Record Update Report #
###################################################

Database Name . . . . . . . . . . . . . . . . . . marcus
Database File . . . . . . . . . . . . . . . . . . <WebZ_root>/dbbuilder/dbs/marcus/marcus.pdb

Update Report:
------------------------------------------------------
Number of Records Added . . . . . . . . . . . . . 500
Number of Records Replaced . . . . . . . . . . . 0
Number of Records Deleted . . . . . . . . . . . . 0
Number of Records Processed . . . . . . . . . . . 500
Number of Bad Records . . . . . . . . . . . . . . 0

Database Report
------------------------------------------------------
Number of Records . . . . . . . . . . . . . . . . 500
Number of Terms . . . . . . . . . . . . . . . . . 8,419
Number of Postings Lists . . . . . . . . . . . . 11
Number of Regions . . . . . . . . . . . . . . . . 65
Block size . . . . . . . . . . . . . . . . . . . 16,384 Bytes
Total Database Size . . . . . . . . . . . . . . . 1.0156 Megabytes

------------------------------------------------------
Report Generated by teacher

################# End Bartlett Report ##############

Press [ENTER] key to continue:


8. Press the Enter key to return to the Database Creation and Maintenance Menu.

 

 

See Also

Pears System Overview
Pears Database Description Configuration File
SSDOT for Pears


[Main][Documentation][Support][Technical Reference][Community][Glossary][Search]

Last Modified: