Main -> Documentation -> Database Builder – Pears  -> Making a Pears Database Available in WebZ

Making a Pears Database Available in WebZ

Just like local Newton databases, you can search Pears databases and retrieve records from them through your WebZ interface by configuring ZBase access to them. This topic explains how to set up the necessary configurations to enable ZBase access to your local Pears databases.

Contents

Introduction
Document Conventions
Database Configuration Procedure
WebZ Registration Procedure


Introduction

As with any of your local Newton databases, you begin configuring ZBase access to your local Pears databases by first registering them in your WebZ environment and then creating the necessary configuration files to enable searching, retrieval, and record formatting.

This document guides you through the steps for registering and configuring ZBase access to a Pears database. If you have configured ZBase access to your local Newton databases, the procedure is relatively the same for a Pears database. The only significant differences between the configurations for the two database types can be found in their respective database configuration files. When editing or creating one for a Pears database, you need to include two additional references under the [databases] section. One of those references is a fully qualified Pears database class. The second is a single data (.pdb) file. The single .pdb file holds all the records and indexes for a Pears database. (This takes the place of the references you make to five different physical files for a Newton database.)

Another significant difference in a database configuration file for a Pears database is in how you define indexes. Some indexes such as subjects, titles, and notes must reference a specific term normalizer. Most often the term normalizer class is either ORG.oclc.pears.IndexRoutines.Words or ORG.oclc.pears.IndexRoutines.PluralWords, which are the same classes that are often used in a database description configuration file to create indexes. (See the Example at the end of this document.)


Document Conventions

  • <WebZ_root> is the location of your WebZ environment
  • <database> represents the unique part of a database configuration file's name.
  • The marcus database is used in the examples below. This fictitious database contains US MARC data.

Database Configuration Procedure

Follow the procedure below to configure ZBase access to your Pears databases.

1. Make a copy of an existing local database configuration file or create a new one using the name of your Pears database.

Note:

Whether you copy an existing one or create a new one, OCLC recommends that you use the syntax <database>.ini to name your Pears database configuration file. You may also consider using an extension such as "_pears" to further identify a local Pears database configuration from a local Newton database configuration. For example, if you had a Pears database called Marcus, you might name its database configuration file marcus_pears.ini.

2. Reference the specific Pears database class ORG.oclc.pears.pears under the [database] section.

Example:

[database]
ZBaseDbType = ORG.oclc.db.DbNewton
dbName = marcus
Longname = US MARC Database
recordSyntax= BER
SupportsSort= true

class = ORG.oclc.pears.pears

3. Add or modify the path to the .pdb file that stores the records and indexes for the database.

Example:  
pdbFile = <WebZ_root>/dbbuilder/dbs/marcus/marcus.pdb

Note:

If you are modifying an existing Newton database configuration file, you need to replace the references to the five physical files with one reference to a single .pdb file.


4. Did you partition indexes for your Pears database?

  • Yes: Insert the references and definitions for the partitions.

    Example:  

    IndexFile*=IndexFile1
    IndexFile*=IndexFile2
    IndexFile*=IndexFile3
    IndexFile*=IndexFile4

    [indexfile1]
    filename = <WebZ_root>/dbbuilder/dbs/marcus/marcus.index3.pdb
    indexID = 3

    [indexfile2]
    filename = <WebZ_root>/dbbuilder/dbs/marcus/marcus.index6.pdb
    indexID = 6

    [indexfile3]
    filename = <WebZ_root>/dbbuilder/dbs/marcus/marcus.index14.pdb
    indexID = 14

    [indexfile4]
    filename = <WebZ_root>/dbbuilder/dbs/marcus/marcus.index16.pdb
    indexID = 16


  • No: Proceed to Step 5.
Note: When you partition indexes, adjunct .pdb files are created during the build process to house the partitioned terms. The names and locations of these partitioned index files is derived from the value you assign to the "filename" parameter in each partitioned index definition. (See the example above.)

5. Update or define the [Formats] section to include the formats that you wish to use to display records from your Pears database.

6. Define the list of available indexes under the [BIB1attributes] section that you want to use to search the database.

Example:  

[BIB1attributes]
OID=BIB1
filter = ORG.oclc.pears.IndexRoutines.Phrase
default= Keyword
index* = Title
index* = Author
index* = TitlePhrase
index* = MaterialType
index* = Publisher
index* = Language
index* = LCCardnumber
index* = SubjectWords
index* = Keyword
index* = ControlNumber
stopwords= default


Note:

In order to retrieve the expected results when you search a Pears database, you must change the filter class under the [BIB1attributes] section to be ORG.oclc.pears.IndexRoutines.Phrase.


7. Create a definition for each index that you listed under the [BIB1attributes] section.

Example:

[Title]
longname=Title
abb = ti:
use = 4
structure = 2
alternateId = 1
filter = ORG.oclc.pears.IndexRoutines.PluralWords

[Author]
longname = Author
abb = au:
use = 1003
structure = 2
alternateId = 3


Note:

Ensure that the value you declare for an index's alternateID parameter corresponds to an appropriate and corresponding index parameter in the Pears database description configuration file.


8. Optionally, define retrictors.

Example:

[PubType]
longname = Record Format
abb = pt:
use = 1001
structure = 2
alternateID = 4
restrictor = true
gadgetType = selectList
value1 = All:
value2 = Books:bks
value3 = Magazines, Newspapers, Journals:ser
value4 = Visual Material:vis
value5 = Sound Recordings:rec
value6 = Musical Scores:sco
value7 = Maps:map


Note: When defining the publication type restrictor for a MARC database, use the three-character codes depicted in the example above as the restrictor terms (the values to the right of the colon). These are the standard and only recognized codes accepted by the specific class that handles publication-type restrictor information.

9. Define the [IndexLists] section.
10. Save and close the database configuration file.

WebZ Registration Procedure

Follow the procedure below to register your Pears database with the WebZ environment.

1. Open the databases.ini file found in your <WebZ_root>/ini directory.

2. Put a reference to your Pears database using the syntax dbs* = /dbs/<database>.ini.

Example:

Assuming the name of your database configuration file is marcus_pears.ini:

# Local databases
db* = dbs/ERICThesaurus.ini
dB* = dbs/LCSH.ini
dB* = dbs/marcus_pears.ini
dB* = dbs/MeSH.ini
dB* = dbs/PsycThesaurus.ini

3. Save and close the databases.ini file.

4. Optionally, define the necessary formatting configuration files to display the records from your Pears database.

Notes: Often, you can reuse formatting configuration files. So it may not be necessary to perform this step if you have existing ones that will work with your current database.

 

5. Stop and restart your WebZ environment.

6. Test access to your Pears database through zclient or through your WebZ interface to ensure that you can conduct searches, browse indexes, and display records.


Return to Contents

Example

The following is an example of a Pears database configuration file:

[database]
ZBaseDbType = ORG.oclc.db.DbNewton
dbName = marcus
LongName = US MARC Database
recordSyntax = BER
SupportsSort = true
class = ORG.oclc.pears.pears

pdbFile=<WebZ_root>/dbbuilder/dbs/marcus/marcus.pdb

[Formats]
full=<WebZ_root>/format/obiv1/PearsFormats.ini
brief=<WebZ_root>/format/obiv1/PearsFormats.ini
bookmark=<WebZ_root>/format/obiv1/PearsFormats.ini
bookmarkfull=<WebZ_root>/format/obiv1/PearsFormats.ini
multifull=<WebZ_root>/format/obiv1/PearsFormats.ini
isoill=<WebZ_root>/format/obiv1/PearsFormats.ini
fullnf=<WebZ_root>/format/obiv1/PearsFormats.ini
briefnf=<WebZ_root>/format/obiv1/PearsFormats.ini
multifullnf=<WebZ_root>/format/obiv1/PearsFormats.ini
dump=ORG.oclc.fmts.obi.UTFRecordDumper

# this allows for more than 1 attribute type BIB1, EXP1, ZDSR
[attributes]
type1=BIB1attributes

[BIB1attributes]
OID=BIB1
default= Keywords
filter = ORG.oclc.pears.IndexRoutines.Phrase
parse_mode= 0
operator= 0
index1 = Keywords
index2 = Authors
index3 = OCLCNum
index4 = OCLCNumStr
index5 = Lang
index6 = Titles
index7 = FullTitles
index8 = Utitle
index9 = Conference
index10 = CorpName
index11 = GovDoc
index12 = MusicNumPhrase
index13 = ReportNo
index14 = ISSN
index15 = Notes
index16 = Publisher
index17 = PubLoc
index18 = Series
index19 = Dewey
index20 = LCNum
index21 = SubjectWords
index22 = SubjectHeadings
index23 = Year
index24 = PubType

stopwords= default

[Keywords]
longname=Keywords
filter=ORG.oclc.pears.IndexRoutines.Words
collapse = _+-:;@$
abb = kw:
use = 1016
structure = 2
plural = true
alternateID = 91

[Authors]
abb = au:
use=1003
structure=2
alternateID = 8

[OCLCNum]
longname=ID
abb = an:
use = 201
structure = 2
alternateID = 201


[OCLCNumStr]
longname=OCLC Num Str
abb = as:
use = 200
structure = 2
alternateID = 200

[Lang]
longname= Language
abb = ln:
use = 54
structure = 2
restrictor = true
gadgetType = selectList
value1 = All:
value2 = Arabic:arabic
value3 = Chinese:chinese
value4 = English:english
value5 = French:french
value6 = German:german
value7 = Italian:italian
value8 = Japanese:japanese
value9 = Portuguese:portuguese
value10 = Russian:russian
value11 = Spanish:spanish
value12 = Vietnamese:vietnamese
alternateID = 31

[Titles]
abb = dc:
use = 4
structure = 2
alternateID = 2

[FullTitles]
longname = Exact Titles
abb = ti=
use = 4
structure = 1
alternateID = 1

[UTitle]
longname = Uniform Title
abb = ut:
use = 6
structure = 2
alternateID = 3
filter = ORG.oclc.pears.IndexRoutines.PluralWords

[Conference]
longname= Conference Name
abb = cn=
use 3
structure = 1
alternateID = 12

[CorpName]
longname=Corporate Name
abb = co=
use = 2
structure = 1
alternateID = 10

[GovDoc]
longName = Gov Doc Number
abb = gn:
use = 50
structure = 2
alternateID = 20
filter = ORG.oclc.pears.IndexRoutines.Phrase
collapse = ?!,”’:;&_-.<>[]

[MusicNumPhrase]
longname = Music Number
abb = mp
use = 51
structure=1
alternateID = 25

[ReportNo]
longname = Report Number
abb = rn:
use = 1027
structure = 2
alternateID = 21
filter = ORG.oclc.pears.IndexRoutines.Phrase
collapse = ?!,$&:;'"_-<>[].+()

[ISSN]
longname = ISSN, ISBN
abb = sn:
use = 1007
structure = 2
alternateID = 23
routine = ORG.oclc.pears.IndexRoutines.Words
collapse = ?!,$&:;'"_-<>[].

[Notes]
longname = Notes
abb = nt:
use = 63
structure = 2
plural = true
alternateID = 43
filter = ORG.oclc.pears.IndexRoutines.PluralWords

[Publisher]
longname = Publisher
abb = pb:
use = 1018
structure = 2
alternateID = 36

[PubLoc]
longname = Publication Location
abb = pl:
use = 59
structure = 2
alternateID = 37

[Series]
longname = Series Name
abb = se:
use = 5
structure = 2
alternateID = 63

[Dewey]
longname = Dewey Class.
abb = dw:
use = 13
structure = 2
alternateID = 19
filter = ORG.oclc.pears.IndexRoutines.Phrase
collapse = ?!,”’:;&_-<>[]@+()\u0020

[LCNum]
longname = LC Class.
abb = lc:
use = 16
structure = 2
alternateID = 18
filter = ORG.oclc.pears.IndexRoutines.LCClass

[SubjectWords]
longname=Subject Words
abb = ds:
use=21
structure=2
plural = true
alternateID = 70

[SubjectHeadings]
longname=Subject Headings
abb = sh=
use=21
structure=1
alternateID = 69

[Year]
abb = yr:
use = 30
structure =2
alternateID = 30
range = true
min = 1067
max = 2100
restrictor=true
gadgetType = inputBox


[PubType]
longname = Record Format
abb = pt:
use = 1001
structure = 2
alternateID = 4
restrictor = true
gadgetType = selectList
value1 = All:
value2 = Books:bks
value3 = Magzns, newsp, jrnl:ser
value4 = Visual Material:vis
value5 = Sound Recordinds:rec
value6 = Musical scores:sco
value7 = Maps:map
value8 = Mixed Materials:mix
value9 = Computer Files:com

[sort]
localsort=true
articles=a, an, the
PresentRecordSyntax=BER
PresentStepSize=20
maxSortRecords=200
maxAutoSortRecords=50
key1=titleKey
key2=authorKey
key3=dateKey

[titleKey]
name=Title
use=4
parm1=245/1

[authorKey]
name=Author
use=1003
parm1=100/1
parm2=700/1,4,5

[dateKey]
name=Date
use=30
parm1=260/3


[IndexLists]
tabbar = Titles, OCLCNum, Keywords
long = all
browse = all
limits = Year, PubType, Lang


See Also

Configuring Access to a Record Builder Database Through the WebZ Interface
Comparing Pears and Newton
Creating a New Pears Database
Pears Database Description Configuration File
Pears INdexing Routines


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

Last Modified: