# /research/software/pears/documentation/pears_createdb.htm

originally: http://www.oclc.org/research/software/pears/documentation/pears_createdb.htm

# Creating a Pears Database

When you build a Pears database, you use the Bartlett utility to convert and import an input data file into a single output (.pdb) file that contains the indexes and records for the database. The following information outlines the procedure for creating a Pears database using the Bartlett utility. Links are also provided to other related procedures and reference information.

## Requirements

Prior to running Bartlett to build a new Pears database, you need to assemble an input data file and define a database description configuration file for the database. The input data file contains the records in their native format and the database description configuration file contains the rules for generating indexes and storing records based on the contents of the input data file.

### Procedure

The following steps outline the procedure for creating a Pears database using the Bartlett utility:

1. Make a directory for your new database.
Suggestion: | While you can place the new database directory anywhere on your SiteSearch file system, you may find it most practicle to create it as a sub-directory from your WebZ_root directory.
2. Copy the input data file and the database description configuration file for the database into the new directory.
Result: | You have a directory containing an input data file and a database description configuration file for the new database.
3. Type the following command line within the new directory to execute Bartlett:
`java Bartlett <dbname> -i<data input file> -d<db descr config file>`
Note: | If you execute Bartlett from a directory other than where the data input and database description configuration files reside, you must fully qualify the path to the files.
Result: | Bartlett creates a single .pdb file for the new database.

## Example

`>java Bartlett marc -imarc.usmarc -dmarcdesc.ini`

Result: | Bartlett creates the database file, marc.pdb.

## See Also

- Pears Database Description Configuration File
- Bartlett Utility

## Pears Contact

- Ralph LeVan (levan@oclc.org)

Content Last Modified: April 19, 2001