Main -> Documentation -> Database Builder – Pears  -> Converting a Newton Database to a Pears Database

Converting a Newton Database to a Pears Database

 

Contents

Introduction
Document Conventions
Procedure
Update Report Example


Introduction

This document describes how to convert a Newton database to a Pears database. This conversion is optional. If you currently use Newton databases without any problems, there is no need to convert them to Pears databases. However, if you wish to take advantage of the features available only in Pears, this procedure describes the conversion process.


Document Conventions

  • <WebZ_root> is the location of your WebZ environment.
  • newt_db is the name of the Newton database you want to convert to a Pears database.
  • pears_db is the name of the Pears version of the databate.

Procedure

The conversion process loads records from an existing Newton database into a new Pears database and reindexes the records with Pears indexing routines. During this process, records from the Newton database are exported as BER records and then used to update a new Pears database. Follow these steps to complete the conversion.

1. Create a new directory for the Pears version of the database under <WebZ_root>/dbbuilder/dbs, such as pears_db.

2. Create a database description configuration file for the Pears version of the database. Remember to use DB as the input record type. Copy this file to <WebZ_root>/dbbuilder/dbs/pears_db.

3. Copy the five Newton database files from <WebZ_root>/dbbuilder/dbs/newt_db/db to <WebZ_root>/dbbuilder/dbs/pears_db/db. Make sure that the names of the HEDR and HDIR files begin with the same characters.

4. Are you using the Record Builder application for single-record updates for this database?

  • Yes. Copy these files from <WebZ_root>/dbbuilder/dbs/newt_db to <WebZ_root>/dbbuilder/dbs/pears_db:
    • newt_db.dtd (rename this file as pears_db.dtd after copying it)
    • recordid.txt
    • field.xml
    • template.xml and any other template*.xml files
    • any constant*.xml files
  • No. Go directly to step 5.
5. Register pears_db with the Pears version of SSDOT. [there will be a link to a procedure for this, but this procedure doesn't exist yet]

6. In SSDOT:

From this menu...

select this option ...

Main 3. Database Creation and Maintenance.
Database Creation and Maintenance 7.Convert Newton database to Pears database.

7. Type the name of the database you want to convert (as you registered it with SSDOT, such as pears_db) and press [ENTER].
8. Type the name and path to the Newton header file (<WebZ_root>/dbbuilder/dbs/pears_db/db/newt_dbhedr.db) and press [ENTER].
Note:   

The next two prompts refer to how much of the database you want to convert.

  • You can leave off records from the end of the database.
  • You can leave off (skip) records at the beginning of the database.

You can select records from the middle of the database by leaving off records at both ends.

9. Do you want to leave off records from the end of the database?

  • Yes. Type a number that represents the number of records you want to convert, starting from the beginning of the database, such as 1000, to convert only the first 1000 records.
  • No. Press [ENTER].

10. Do you want to skip records at the beginning of the database?

  • Yes. Type a number that represents the number of records you want to skip, such as 500 to skip the first 500 records in the database.
  • No. Press [ENTER].

11. How do you want to lock the database to prevent it from being updated with Record Building during the conversion?

  • Lock the entire database (recommended). Press [ENTER]
  • Lock one record at a time. Type 2 and press [ENTER]. (This option significantly increases the time needed for the conversion. OCLC recommends that you lock the entire database instead and leave it unavailable for online updates during this time.)

12. The conversion begins and you see the following message:

Working, please wait | | | |

As it proceeds, SSDOT periodically displays the time elapsed.

13. When the conversion completes, you see a Pears database update report. Click here for an example.

14. To make the Pears database available through the WebZ interface, click here.
15. To update the database through Record Builder, click here [this will go to a document that doesn't exist yet].

Return to Contents


Update Report Example

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

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

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

Database Report
------------------------------------------------------
Number of Records . . . . . . . . . . . . . . . . 9
Number of Terms . . . . . . . . . . . . . . . . . 132
Number of Postings Lists . . . . . . . . . . . .  0
Number of Regions . . . . . . . . . . . . . . . . 7
Block size . . . . . . . . . . . . . . . . . . . 16,384 Bytes
Total Database Size . . . . . . . . . . . . . . . 0.1094 Megabytes

------------------------------------------------------
Report Generated by user

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


Press [ENTER] key to continue:

Return to Contents


See Also

Pears System Overview
Pears-Newton Comparison
Pears Database Description Configuration File


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

Last Modified: