Main -> Documentation -> Database Builder – Pears  -> Pears SSDOT Database Creation and Maintenance Options

Pears SSDOT Database Creation and Maintenance Options

Database creation and maintenance procedures for a Pears database encompass several different administrative activities from loading records into a database to reorganizing database content. The procedures below provide the steps for performing each of these kinds of administrative activities that are available in SDDOT for Pears.

Contents

Updating a Pears Database
Validating a Pears Database
Reorganizing a Pears Database
Reindexing a Pears Database
Deleting Pears Database Files


Updating a Pears Database

Broadly defined, updating a database consists of performing one of three actions on it to modify its content:

  • adding new records to it
  • replacing existing records in it
  • deleting records from it.

To load, replace, or remove records from a Pears database, you select the Update database option from the Database Creation and Maintenance menu in SSDOT for Pears. What actually prompts SSDOT for Pears to perform a specific update activity on a record is not a utility but the record itself.

By default, SSDOT for Pears assumes that all records in an input data file are to be added to a Pears database. So if you do not indicate otherwise, all records will be added when you perform an update.

In order to replace or delete a record, you must first ensure that it has a unique identification number associated with it and that it currently exists in the database. A record that is not unique and does not currently exist in the database cannot be updated or removed from the database.

Additionally, in an input data file, a record to be replaced or deleted must contain an appropriate high-level tag value. The location and value of this tag depends on the format type of the record.

  • SGML: For SGML-formatted records, the first and last tags surrounding the body of the record must be <reprec> and </reprec> or <delrec> and </delrec> for a replace or delete, respectively.
  • MARC: For MARC-formatted records, the Record Handler uses the status values from the MARC fixed fields.
  • BER: For BER records, the highest level tag value determines the action that is to be taken on a record (0=add, 9=replace, 15=delete).

The procedure below provides the steps for updating a Pears database using SSDOT for Pears.

1. Start SSDOT for Pears.

Result:

The following Main Menu appears:

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
>


2. Type 3 and press Enter at the SSDOT command prompt.

Result:

The following menu appears:


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
>

3. Type 1 and press Enter to begin updating the database.

Result:

The following prompt appears:

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

4. Type the name of the database to be updated and press Enter.

Result:

The following prompt appears:

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

5. Type the full path to the input data file and press Enter.

Example:

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

  <WebZ_root>/dbbuilder/dbs/marcus/marcus.dat

Result:

The following prompt appears:

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

 

6. Do you want to update only a certain number of records?

  • Yes: Type the number of records that you wish to update and press the Enter key. You must use a whole number such as 10, 100, or 345. Starting with the first record, SSDOT sequentially updates 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 update only 250 of them, SSDOT sequentially processes records 1 to 250 from the input file.

  • No: Press the Enter key.

Result:

The following prompt appears:

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


7. Do you want to skip certain records during the update?

  • 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:

8. 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 administrator

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

Press [ENTER] key to continue:


7. Press Enter to return to the Database Creation and Maintenance Menu.

Return to Contents


Validating a Pears Database

Running validation on a Pears database statistically verifies its content. Validation does not, however, indicate if the database contains corrupted records or improperly built indexes. The procedure below provides the steps for performing validation on a Pears database using SSDOT for Pears.

1. Start SSDOT for Pears.

Result:

The following Main Menu appears:

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
>

2. Type 3 and press Enter at the SSDOT command prompt.

Result:

The following menu appears:


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
>

3. Type 2 and press Enter to begin validating the database.

Result:

The following prompt appears:


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

4. Type the name of the database and press Enter to run the validation procedure on it.

Example:  
Name of database to VALIDATE or press [ENTER] key: marcus

Result:

The following type of information regarding your database appears:

####################################################
# Validation Report #
####################################################

** Validation Ended Successfully **
--------------------------------------------------------

Database Name . . . . . . . . . . . . . . . . . . . marcus
Database Size . . . . . . . . . . . . . . . . . . . 0.2031 Megabytes
Total Number of Records . . . . . . . . . . . . . . 19
Total Number of Terms . . . . . . . . . . . . . . . 814
Total Number of Postings Lists . . . . . . . . . . 0
Total Number of Regions . . . . . . . . . . . . . . 13
Total Number of Data Regions . . . . . . . . . . . 4
Total Number of Index Regions . . . . . . . . . . . 4
Total Number of Miscellaneous Regions . . . . . . . 5

--------------------------------------------------------
Total Validation Time 0.116 seconds

############## End Validation Report ###############

Press [ENTER] key to continue:

5. Press Enter to return to the Database Creation and Maintenance Menu.

Return to Contents


Reorganizing a Pears Database

Reorganization of a Pears database is sometimes necessary to defragment it. You may want to perform this procedure on a database that is acting sluggish or on one that you have updated a lot recently. The steps below help walk you through the reorganization procedure in SSDOT for Pears.

1. Start SSDOT for Pears.

Result:

The following Main Menu appears:

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
>

2. Type 3 and press Enter at the SSDOT command prompt.

Result:

The following menu appears:


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
>

3. Type 3 and press Enter to begin the reorganization procedure.

Result:

The following prompt appears:


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

 

4. Type the name of the database that is to be reorganized and press Enter.

Example:  
Name of database to REORGANIZE or press [ENTER] key: marcus

Result:

The following information regarding the reorganization of your database appears:

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

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

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

Database Report
------------------------------------------------------
Number of Records . . . . . . . . . . . . . . . . 19
Number of Terms . . . . . . . . . . . . . . . . . 814
Number of Postings Lists . . . . . . . . . . . . 0
Number of Regions . . . . . . . . . . . . . . . . 13
Block size . . . . . . . . . . . . . . . . . . . 16,384 Bytes
Total Database Size . . . . . . . . . . . . . . . 0.2031 Megabytes

------------------------------------------------------
Report Generated by administrator

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

Press [ENTER] key to continue:

5. Press Enter to return to the Database Creation and Maintenance Menu.

Return to Contents


Reindexing a Pears Database

Reindexing allows you to add a new index, reload an existing index after having made changes to it, or rebuild the stopwords list to update it. All this can be done without you having to dump and reload the entire database. The procedure below instructs you on how to reindex a Pears database using SSDOT for Pears.

1. Start SSDOT for Pears.

Result:

The following Main Menu appears:

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
>

2. Type 3 and press Enter at the SSDOT command prompt.

Result:

The following menu appears:


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
>

3. Type 4 and press Enter to begin the reindexing procedure.

Result:

The following prompt appears:


**NOTE: You must first edit the appropriate database description index before proceeding **


Press [ENTER] key to continue:

 

4. Have you edited the appropriate database description configuration file?

5. Press Enter.

Result:

The following prompt appears:

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

6. Type the name of the database and press Enter.

Example:  
Name of database to REINDEX or press [ENTER] key to return to menu: marcus

Result:

The following prompt appears:

Currently Selected Indices: None selected

ID number of the modified index.
Press "X" when done or [ENTER] key return to menu:

7. Type the unique IDs associated with the new or modified index(es), then type "X" and Enter.

Example: Currently Selected Indices: None selected

ID number of the modified index.
Press "X" when done or [ENTER] key return to menu: 18

Currently Selected Indices: 18

ID number of the modified index.
Press "X" when done or [ENTER] key return to menu: X

 

 


In this example, "18" is the unique ID for the index to be updated and "X" is typed to indicate that no more indexes are to acted upon by SSDOT.


Result:

The following validation information appears after SSDOT has completed its reindexing procedure:

####################################################
# Validation Report #
####################################################

** Validation Ended Successfully **
--------------------------------------------------------

Database Name . . . . . . . . . . . . . . . . . . . marcus
Database Size . . . . . . . . . . . . . . . . . . . 0.3438 Megabytes
Total Number of Records . . . . . . . . . . . . . . 45
Total Number of Terms . . . . . . . . . . . . . . . 1,665
Total Number of Postings Lists . . . . . . . . . . 0
Total Number of Regions . . . . . . . . . . . . . . 22
Total Number of Data Regions . . . . . . . . . . . 11
Total Number of Index Regions . . . . . . . . . . . 6
Total Number of Miscellaneous Regions . . . . . . . 5

--------------------------------------------------------
Total Validation Time 0.706 seconds

############## End Validation Report ###############

Press [ENTER] key to continue:

Note: If you run the reindexing procedure without modifying indexes in the database description configuration file first, SSDOT automatically assumes that you want to rebuild the stopwords list and the unique record ID index only. In fact, every reindexing procedure performs these two activities by default, regardless of the other indexes you choose to update or add to the database.

 

Return to Contents


Deleting Pears Database Files

Whether you want to eliminate duplicates of the same database or you want to get rid of a test version of a database, there are times when you need to delete database files. The following procedure provides the steps for deleting database files using SSDOT for Pears.

1. Start SSDOT for Pears.

Result:

The following Main Menu appears:

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
>

2. Type 3 and press Enter at the SSDOT command prompt.

Result:

The following menu appears:


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
>

3. Type 5 and press Enter to begin the deletion procedure.

Result:

The following prompt appears:


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

4. Type the name of the database that you want to delete and press Enter.

Example:

 

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


Result:

The following prompt appears:

Do you really want to delete this database? (yes/no)

5. Do you really want to delete the database?

  • Yes: Type "yes" and press Enter to unregister the database and delete its .pdb, journal, backup, and log files.
Result:

The following prompt appears:


Database successfully deleted.

Press [ENTER] key to continue:

  • No: Type "no" and press Enter to return to the Database Creation and Maintenance Menu.

 

6. Press Enter to return to the Database Creation and Maintenance Menu.


Return to Contents


See Also

Pears System Overview
Creating a New Pears Database

The SiteSearch Database Operations Tool (SSDOT)


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

Last Modified: