Intial commit

This commit is contained in:
Mario Fetka
2024-05-27 16:13:40 +02:00
parent f8dc12b10a
commit d71d446104
2495 changed files with 539746 additions and 0 deletions

366
berkdb/docs/btree.3.ps Normal file
View File

@@ -0,0 +1,366 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.08
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.08 0
%%Pages: 2
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.08 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 132.34(BTREE\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 132.34(anual BTREE\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72 84 S
(ME).18 E F0(btree \255 btree database access method)108 96 Q F1(SYNOPSIS)72
112.8 Q/F2 10/Times-Bold@0 SF(#include <sys/types.h>)108 124.8 Q(#include <db)
108 136.8 Q(.h>)-.4 E F1(DESCRIPTION)72 153.6 Q F0 .198(The routine)108 165.6 R
/F3 10/Times-Italic@0 SF(dbopen)2.698 E F0 .198(is the library interf)2.698 F
.198(ace to database \214les.)-.1 F .198
(One of the supported \214le formats is btree \214les.)5.198 F .974
(The general description of the database access methods is in)108 177.6 R F3
(dbopen)3.475 E F0 .975(\(3\), this manual page describes only).24 F
(the btree speci\214c information.)108 189.6 Q(The btree data structure is a s\
orted, balanced tree structure storing associated k)108 206.4 Q -.15(ey)-.1 G
(/data pairs.).15 E .504(The btree access method speci\214c data structure pro)
108 223.2 R .504(vided to)-.15 F F3(dbopen)3.004 E F0 .503
(is de\214ned in the <db)3.003 F .503(.h> include \214le as)-.4 F(follo)108
235.2 Q(ws:)-.25 E(typedef struct {)108 252 Q(u_long \215ags;)144 264 Q
(u_int cachesize;)144 276 Q(inde)144 288 Q(x_t psize;)-.15 E(int lorder;)144
300 Q(int mink)144 312 Q -.15(ey)-.1 G(page;).15 E
(int \(*compare\)\(const DBT *k)144 324 Q -.15(ey)-.1 G(1, const DBT *k).15 E
-.15(ey)-.1 G(2\);).15 E(int \(*pre\214x\)\(const DBT *k)144 336 Q -.15(ey)-.1
G(1, const DBT *k).15 E -.15(ey)-.1 G(2\);).15 E 2.5(}B)108 348 S(TREEINFO;)
121.97 348 Q(The elements of this structure are as follo)108 364.8 Q(ws:)-.25 E
14.61(\215ags The)108 381.6 R(\215ag v)2.5 E(alue is speci\214ed by)-.25 E F3
(or)2.5 E F0('ing an).73 E 2.5(yo)-.15 G 2.5(ft)313.2 381.6 S(he follo)321.81
381.6 Q(wing v)-.25 E(alues:)-.25 E(R_DUP)144 398.4 Q 1.296(Permit duplicate k)
180 410.4 R -.15(ey)-.1 G 3.796(si).15 G 3.796(nt)275.578 410.4 S 1.296
(he tree, i.e. permit insertion if the k)287.154 410.4 R 1.596 -.15(ey t)-.1 H
3.796(ob).15 G 3.796(ei)466.878 410.4 S 1.296(nserted already)477.894 410.4 R
-.15(ex)180 422.4 S 1.935(ists in the tree.).15 F 1.935(The def)6.935 F 1.935
(ault beha)-.1 F(vior)-.2 E 4.435(,a)-.4 G 4.435(sd)358.215 422.4 S 1.935
(escribed in)371.54 422.4 R F3(dbopen)4.435 E F0 1.935(\(3\), is to o).24 F
-.15(ve)-.15 G 1.935(rwrite a).15 F .148(matching k)180 434.4 R .448 -.15(ey w)
-.1 H .148(hen inserting a ne).15 F 2.649(wk)-.25 G .449 -.15(ey o)329.709
434.4 T 2.649(rt).15 G 2.649(of)355.407 434.4 S .149(ail if the R_NOO)366.286
434.4 R(VER)-.5 E .149(WRITE \215ag is speci-)-.55 F 5.972(\214ed. The)180
446.4 R 3.472(R_DUP \215ag is o)5.972 F -.15(ve)-.15 G 3.472
(rridden by the R_NOO).15 F(VER)-.5 E 3.471(WRITE \215ag, and if the)-.55 F
(R_NOO)180 458.4 Q(VER)-.5 E .781
(WRITE \215ag is speci\214ed, attempts to insert duplicate k)-.55 F -.15(ey)-.1
G 3.282(si).15 G .782(nto the tree will)474.604 458.4 R -.1(fa)180 470.4 S(il.)
.1 E 1.13(If the database contains duplicate k)180 487.2 R -.15(ey)-.1 G 1.129
(s, the order of retrie).15 F -.25(va)-.25 G 3.629(lo).25 G 3.629(fk)439.644
487.2 S -.15(ey)451.503 487.2 S 1.129(/data pairs is unde-).15 F .837
(\214ned if the)180 499.2 R F3 -.1(ge)3.337 G(t).1 E F0 .837
(routine is used, ho)3.337 F(we)-.25 E -.15(ve)-.25 G -.4(r,).15 G F3(seq)3.737
E F0 .838(routine calls with the R_CURSOR \215ag set)3.337 F(will al)180 511.2
Q -.1(wa)-.1 G(ys return the logical `).1 E(`\214rst')-.74 E 2.5('o)-.74 G 2.5
(fa)333.85 511.2 S .3 -.15(ny g)344.12 511.2 T(roup of duplicate k).15 E -.15
(ey)-.1 G(s.).15 E(cachesize)108 528 Q 3.056(As)144 540 S .556
(uggested maximum size \(in bytes\) of the memory cache.)158.166 540 R .555
(This v)5.556 F .555(alue is)-.25 F F2(only)3.055 E F0(advisory)3.055 E 3.055
(,a)-.65 G .555(nd the)514.725 540 R .759
(access method will allocate more memory rather than f)144 552 R 3.259
(ail. Since)-.1 F -2.15 -.25(ev e)3.259 H .76(ry search e).25 F .76
(xamines the root)-.15 F .055
(page of the tree, caching the most recently used pages substantially impro)144
564 R -.15(ve)-.15 G 2.554(sa).15 G .054(ccess time.)459.578 564 R .054
(In addi-)5.054 F .661(tion, ph)144 576 R .662(ysical writes are delayed as lo\
ng as possible, so a moderate cache can reduce the number)-.05 F .601
(of I/O operations signi\214cantly)144 588 R 5.601(.O)-.65 G -.15(bv)280.744
588 S(iously).15 E 3.101(,u)-.65 G .601(sing a cache increases \(b)324.995 588
R .6(ut only increases\) the lik)-.2 F(eli-)-.1 E .19(hood of corruption or lo\
st data if the system crashes while a tree is being modi\214ed.)144 600 R(If)
5.191 E F3(cac)2.691 E(hesize)-.15 E F0(is)2.691 E 2.5(0\()144 612 S
(no size is speci\214ed\) a def)154.83 612 Q(ault cache is used.)-.1 E 12.95
(psize P)108 628.8 R .45
(age size is the size \(in bytes\) of the pages used for nodes in the tree.)
-.15 F .449(The minimum page size is)5.449 F .442
(512 bytes and the maximum page size is 64K.)144 640.8 R(If)5.442 E F3(psize)
2.942 E F0 .442(is 0 \(no page size is speci\214ed\) a page size)2.942 F
(is chosen based on the underlying \214le system I/O block size.)144 652.8 Q
9.62(lorder The)108 669.6 R 1.597(byte order for inte)4.097 F 1.596
(gers in the stored database metadata.)-.15 F 1.596
(The number should represent the)6.596 F .688(order as an inte)144 681.6 R .689
(ger; for e)-.15 F .689(xample, big endian order w)-.15 F .689
(ould be the number 4,321.)-.1 F(If)5.689 E F3(lor)3.189 E(der)-.37 E F0 .689
(is 0 \(no)3.189 F(order is speci\214ed\) the current host order is used.)144
693.6 Q 174.135(4.4BSD June)72 732 R(4, 1993)2.5 E(1)535 732 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 132.34(BTREE\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 132.34(anual BTREE\(3\))340.17 48 R(mink)108 84 Q -.15(ey)-.1 G(page).15
E 1.423(The minimum number of k)144 96 R -.15(ey)-.1 G 3.923(sw).15 G 1.422
(hich will be stored on an)282.245 96 R 3.922(ys)-.15 G 1.422(ingle page.)
400.618 96 R 1.422(This v)6.422 F 1.422(alue is used to)-.25 F .257
(determine which k)144 108 R -.15(ey)-.1 G 2.757(sw).15 G .257
(ill be stored on o)242.001 108 R -.15(ve)-.15 G(r\215o).15 E 2.757(wp)-.25 G
.257(ages, i.e. if a k)348.006 108 R .558 -.15(ey o)-.1 H 2.758(rd).15 G .258
(ata item is longer than the)435.11 108 R 1.102(pagesize di)144 120 R 1.102
(vided by the mink)-.25 F -.15(ey)-.1 G 1.102(page v).15 F 1.102
(alue, it will be stored on o)-.25 F -.15(ve)-.15 G(r\215o).15 E 3.602(wp)-.25
G 1.102(ages instead of in the)451.164 120 R(page itself.)144 132 Q(If)5 E/F1
10/Times-Italic@0 SF(mink)2.5 E -.3(ey)-.1 G(pa).3 E -.1(ge)-.1 G F0
(is 0 \(no minimum number of k)2.6 E -.15(ey)-.1 G 2.5(si).15 G 2.5(ss)392.84
132 S(peci\214ed\) a v)403.12 132 Q(alue of 2 is used.)-.25 E(compare)108 148.8
Q .751(Compare is the k)144 160.8 R 1.051 -.15(ey c)-.1 H .751
(omparison function.).15 F .751(It must return an inte)5.751 F .752
(ger less than, equal to, or greater)-.15 F .913(than zero if the \214rst k)144
172.8 R 1.213 -.15(ey a)-.1 H -.18(rg).15 G .913
(ument is considered to be respecti).18 F -.15(ve)-.25 G .913
(ly less than, equal to, or greater).15 F .352(than the second k)144 184.8 R
.652 -.15(ey a)-.1 H -.18(rg).15 G 2.852(ument. The).18 F .353
(same comparison function must be used on a gi)2.852 F -.15(ve)-.25 G 2.853(nt)
.15 G .353(ree e)503.127 184.8 R -.15(ve)-.25 G(ry).15 E .817
(time it is opened.)144 196.8 R(If)5.817 E F1(compar)3.317 E(e)-.37 E F0 .817
(is NULL \(no comparison function is speci\214ed\), the k)3.317 F -.15(ey)-.1 G
3.316(sa).15 G .816(re com-)508.364 196.8 R(pared le)144 208.8 Q(xically)-.15 E
2.5(,w)-.65 G(ith shorter k)214.57 208.8 Q -.15(ey)-.1 G 2.5(sc).15 G
(onsidered less than longer k)282.92 208.8 Q -.15(ey)-.1 G(s.).15 E 10.17
(pre\214x Pre\214x)108 225.6 R .291(is the pre\214x comparison function.)2.791
F .292(If speci\214ed, this routine must return the number of bytes)5.291 F
.937(of the second k)144 237.6 R 1.237 -.15(ey a)-.1 H -.18(rg).15 G .937
(ument which are necessary to determine that it is greater than the \214rst k)
.18 F -.15(ey)-.1 G(ar)144 249.6 Q 3.477(gument. If)-.18 F .977(the k)3.477 F
-.15(ey)-.1 G 3.477(sa).15 G .977(re equal, the k)241.898 249.6 R 1.277 -.15
(ey l)-.1 H .978(ength should be returned.).15 F .978
(Note, the usefulness of this)5.978 F .558(routine is v)144 261.6 R .558
(ery data dependent, b)-.15 F .558
(ut, in some data sets can produce signi\214cantly reduced tree sizes)-.2 F
.354(and search times.)144 273.6 R(If)5.354 E F1(pr)2.854 E(e\214x)-.37 E F0
.354(is NULL \(no pre\214x function is speci\214ed\),)2.854 F/F2 10
/Times-Bold@0 SF(and)2.854 E F0 .354(no comparison function)2.854 F .193
(is speci\214ed, a def)144 285.6 R .193(ault le)-.1 F .193
(xical comparison routine is used.)-.15 F(If)5.192 E F1(pr)2.692 E(e\214x)-.37
E F0 .192(is NULL and a comparison rou-)2.692 F
(tine is speci\214ed, no pre\214x comparison is done.)144 297.6 Q .79
(If the \214le already e)108 314.4 R .79(xists \(and the O_TR)-.15 F .79
(UNC \215ag is not speci\214ed\), the v)-.4 F .79
(alues speci\214ed for the parameters)-.25 F
(\215ags, lorder and psize are ignored in f)108 326.4 Q -.2(avo)-.1 G 2.5(ro).2
G 2.5(ft)284.4 326.4 S(he v)293.01 326.4 Q(alues used when the tree w)-.25 E
(as created.)-.1 E -.15(Fo)108 343.2 S(rw).15 E
(ard sequential scans of a tree are from the least k)-.1 E .3 -.15(ey t)-.1 H
2.5(ot).15 G(he greatest.)348.55 343.2 Q 1.043(Space freed up by deleting k)108
360 R -.15(ey)-.1 G 1.043(/data pairs from the tree is ne).15 F -.15(ve)-.25 G
3.543(rr).15 G 1.043(eclaimed, although it is normally made)378.686 360 R -.2
(av)108 372 S 1.394(ailable for reuse.)-.05 F 1.394
(This means that the btree storage structure is gro)6.394 F(w-only)-.25 E 6.395
(.T)-.65 G 1.395(he only solutions are to)441.09 372 R -.2(avo)108 384 S(id e)
.2 E(xcessi)-.15 E .3 -.15(ve d)-.25 H
(eletions, or to create a fresh tree periodically from a scan of an e).15 E
(xisting one.)-.15 E .344(Searches, insertions, and deletions in a btree will \
all complete in O lg base N where base is the a)108 400.8 R -.15(ve)-.2 G .343
(rage \214ll).15 F -.1(fa)108 412.8 S(ctor).1 E 5.798(.O)-.55 G .799
(ften, inserting ordered data into btrees results in a lo)146.188 412.8 R 3.299
<778c>-.25 G .799(ll f)377.505 412.8 R(actor)-.1 E 5.799(.T)-.55 G .799
(his implementation has been)423.443 412.8 R(modi\214ed to mak)108 424.8 Q 2.5
(eo)-.1 G(rdered insertion the best case, resulting in a much better than norm\
al page \214ll f)185.4 424.8 Q(actor)-.1 E(.)-.55 E/F3 9/Times-Bold@0 SF
(SEE ALSO)72 441.6 Q F1(dbopen)108 453.6 Q F0(\(3\),).24 E F1(hash)2.5 E F0
(\(3\),).28 E F1(mpool)2.5 E F0(\(3\),).51 E F1 -.37(re)2.5 G(cno).37 E F0
(\(3\)).18 E F1(The Ubiquitous B-tr)108 477.6 Q(ee)-.37 E F0 2.5(,D).18 G
(ouglas Comer)209.47 477.6 Q 2.5(,A)-.4 G(CM Comput. Surv)276.72 477.6 Q 2.5
(.1)-.65 G(1, 2 \(June 1979\), 121-138.)360.25 477.6 Q F1(Pr)108 501.6 Q 1.588
(e\214x B-tr)-.37 F(ees)-.37 E F0 4.088(,B).27 G 1.587(ayer and Unterauer)
177.636 501.6 R 4.087(,A)-.4 G 1.587(CM T)270.447 501.6 R 1.587
(ransactions on Database Systems, V)-.35 F 1.587(ol. 2, 1 \(March 1977\),)-1.29
F(11-26.)108 513.6 Q F1(The Art of Computer Pr)108 537.6 Q -.1(og)-.45 G -.15
(ra).1 G(mming V).15 E(ol. 3: Sorting and Sear)-1.11 E -.15(ch)-.37 G(ing).15 E
F0 2.5(,D).22 G(.E. Knuth, 1968, pp 471-480.)382 537.6 Q F3 -.09(BU)72 554.4 S
(GS).09 E F0(Only big and little endian byte order is supported.)108 566.4 Q
174.135(4.4BSD June)72 732 R(4, 1993)2.5 E(2)535 732 Q EP
%%Trailer
end
%%EOF

508
berkdb/docs/dbopen.3.ps Normal file
View File

@@ -0,0 +1,508 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.08
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.08 0
%%Pages: 4
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.08 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 124.01(DBOPEN\(3\) BSD)72 48 R(Programmer')2.5 E 2.5
(sM)-.55 G 124.01(anual DBOPEN\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72
84 S(ME).18 E F0(dbopen \255 database access methods)108 96 Q F1(SYNOPSIS)72
112.8 Q/F2 10/Times-Bold@0 SF(#include <sys/types.h>)108 124.8 Q
(#include <limits.h>)108 136.8 Q(#include <db)108 148.8 Q(.h>)-.4 E(DB *)108
172.8 Q(dbopen\(const char *\214le, int \215ags, int mode, DBTYPE type,)108
184.8 Q(const v)158 196.8 Q(oid *openinf)-.1 E(o\);)-.25 E F1(DESCRIPTION)72
213.6 Q/F3 10/Times-Italic@0 SF(Dbopen)108 225.6 Q F0 .032
(is the library interf)2.532 F .031(ace to database \214les.)-.1 F .031
(The supported \214le formats are btree, hashed and UNIX \214le)5.031 F 2.82
(oriented. The)108 237.6 R .32
(btree format is a representation of a sorted, balanced tree structure.)2.82 F
.321(The hashed format is an)5.321 F -.15(ex)108 249.6 S .424
(tensible, dynamic hashing scheme.).15 F .423
(The \215at-\214le format is a byte stream \214le with \214x)5.423 F .423
(ed or v)-.15 F .423(ariable length)-.25 F 2.906(records. The)108 261.6 R .407
(formats and \214le format speci\214c information are described in detail in t\
heir respecti)2.906 F .707 -.15(ve m)-.25 H(anual).15 E(pages)108 273.6 Q F3
(btr)2.5 E(ee)-.37 E F0(\(3\),).18 E F3(hash)2.5 E F0(\(3\) and).28 E F3 -.37
(re)2.5 G(cno).37 E F0(\(3\).).18 E .433(Dbopen opens)108 290.4 R F3(\214le)
2.933 E F0 .433(for reading and/or writing.)2.933 F .433(Files ne)5.433 F -.15
(ve)-.25 G 2.933(ri).15 G .433(ntended to be preserv)346.737 290.4 R .433
(ed on disk may be created)-.15 F(by setting the \214le parameter to NULL.)108
302.4 Q(The)108 319.2 Q F3<8d61>4.661 E(gs)-.1 E F0(and)4.661 E F3 2.161
(mode ar)4.661 F(guments)-.37 E F0 2.161(are as speci\214ed to the)4.661 F F3
(open)4.661 E F0 2.162(\(2\) routine, ho).24 F(we)-.25 E -.15(ve)-.25 G 2.962
-.4(r, o).15 H 2.162(nly the O_CREA).4 F -.74(T,)-1.11 G .128
(O_EXCL, O_EXLOCK, O_NONBLOCK, O_RDONL)108 331.2 R 2.708 -1.29(Y, O)-1 H(_RD)
1.29 E .128(WR, O_SHLOCK and O_TR)-.3 F .127(UNC \215ags are)-.4 F 2.5
(meaningful. \(Note,)108 343.2 R(opening a database \214le O_WR)2.5 E(ONL)-.4 E
2.5(Yi)-1 G 2.5(sn)342.67 343.2 S(ot possible.\))354.06 343.2 Q(The)108 360 Q
F3(type)5.337 E F0(ar)5.337 E 2.837
(gument is of type DBTYPE \(as de\214ned in the <db)-.18 F 2.838
(.h> include \214le\) and may be set to)-.4 F(DB_BTREE, DB_HASH or DB_RECNO.)
108 372 Q(The)108 388.8 Q F3(openinfo)2.85 E F0(ar)2.85 E .349(gument is a poi\
nter to an access method speci\214c structure described in the access method')
-.18 F(s)-.55 E .03(manual page.)108 400.8 R(If)5.03 E F3(openinfo)2.53 E F0
.031(is NULL, each access method will use def)2.53 F .031
(aults appropriate for the system and the)-.1 F(access method.)108 412.8 Q F3
(Dbopen)108 429.6 Q F0 .416
(returns a pointer to a DB structure on success and NULL on error)2.917 F 5.416
(.T)-.55 G .416(he DB structure is de\214ned in)423.21 429.6 R(the <db)108
441.6 Q(.h> include \214le, and contains at least the follo)-.4 E
(wing \214elds:)-.25 E(typedef struct {)108 465.6 Q(DBTYPE type;)144 477.6 Q
(int \(*close\)\(const DB *db\);)144 489.6 Q
(int \(*del\)\(const DB *db, const DBT *k)144 501.6 Q -.15(ey)-.1 G 2.5(,u)-.5
G(_int \215ags\);)318.92 501.6 Q(int \(*fd\)\(const DB *db\);)144 513.6 Q
(int \(*get\)\(const DB *db, DBT *k)144 525.6 Q -.15(ey)-.1 G 2.5(,D)-.5 G
(BT *data, u_int \215ags\);)297.53 525.6 Q(int \(*put\)\(const DB *db, DBT *k)
144 537.6 Q -.15(ey)-.1 G 2.5(,c)-.5 G(onst DBT *data,)295.31 537.6 Q
(u_int \215ags\);)194 549.6 Q(int \(*sync\)\(const DB *db, u_int \215ags\);)144
561.6 Q(int \(*seq\)\(const DB *db, DBT *k)144 573.6 Q -.15(ey)-.1 G 2.5(,D)-.5
G(BT *data, u_int \215ags\);)298.64 573.6 Q 2.5(}D)108 585.6 S(B;)122.52 585.6
Q .101
(These elements describe a database type and a set of functions performing v)
108 602.4 R .101(arious actions.)-.25 F .101(These functions)5.101 F(tak)108
614.4 Q 3.039(eap)-.1 G .539(ointer to a structure as returned by)140.078 614.4
R F3(dbopen)3.038 E F0 3.038(,a).24 G .538
(nd sometimes one or more pointers to k)323.196 614.4 R -.15(ey)-.1 G .538
(/data struc-).15 F(tures and a \215ag v)108 626.4 Q(alue.)-.25 E 16.28
(type The)108 643.2 R
(type of the underlying access method \(and \214le format\).)2.5 E 12.95
(close A)108 660 R .988(pointer to a routine to \215ush an)3.488 F 3.489(yc)
-.15 G .989(ached information to disk, free an)293.968 660 R 3.489(ya)-.15 G
.989(llocated resources, and)446.662 660 R .112
(close the underlying \214le\(s\).)144 672 R .111(Since k)5.112 F -.15(ey)-.1 G
.111(/data pairs may be cached in memory).15 F 2.611(,f)-.65 G .111
(ailing to sync the \214le)455.666 672 R .494(with a)144 684 R F3(close)2.994 E
F0(or)2.994 E F3(sync)2.994 E F0 .495
(function may result in inconsistent or lost information.)2.994 F F3(Close)
5.495 E F0 .495(routines return)2.995 F(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15
G(istrib)132.57 732 Q 89.875(ution September)-.2 F(13, 1993)2.5 E(1)535 732 Q
EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 124.01(DBOPEN\(3\) BSD)72 48 R(Programmer')2.5 E 2.5
(sM)-.55 G 124.01(anual DBOPEN\(3\))340.17 48 R(-1 on error \(setting)144 84 Q
/F1 10/Times-Italic@0 SF(errno)2.5 E F0 2.5(\)a).18 G(nd 0 on success.)254.43
84 Q 21.28(del A)108 100.8 R(pointer to a routine to remo)2.5 E .3 -.15(ve k)
-.15 H -.15(ey).05 G(/data pairs from the database.).15 E(The parameter)144
117.6 Q F1<8d61>2.5 E(g)-.1 E F0(may be set to the follo)2.5 E(wing v)-.25 E
(alue:)-.25 E(R_CURSOR)144 134.4 Q .289
(Delete the record referenced by the cursor)180 146.4 R 5.288(.T)-.55 G .288
(he cursor must ha)363.342 146.4 R .588 -.15(ve p)-.2 H(re).15 E .288
(viously been initial-)-.25 F(ized.)180 158.4 Q F1(Delete)144 175.2 Q F0 .03
(routines return -1 on error \(setting)2.53 F F1(errno)2.53 E F0 .03
(\), 0 on success, and 1 if the speci\214ed).18 F F1 -.1(ke)2.53 G(y)-.2 E F0
-.1(wa)2.53 G 2.53(sn).1 G .03(ot in)521.91 175.2 R(the \214le.)144 187.2 Q
25.17(fd A)108 204 R .451
(pointer to a routine which returns a \214le descriptor representati)2.951 F
.75 -.15(ve o)-.25 H 2.95(ft).15 G .45(he underlying database.)431.73 204 R(A)
5.45 E .942(\214le descriptor referencing the same \214le will be returned to \
all processes which call)144 216 R F1(dbopen)3.442 E F0(with)3.442 E 1.629
(the same)144 228 R F1(\214le)4.129 E F0 4.129(name. This)4.129 F 1.628
(\214le descriptor may be safely used as a ar)4.128 F 1.628(gument to the)-.18
F F1(fcntl)4.128 E F0 1.628(\(2\) and).51 F F1(\215oc)144 240 Q(k)-.2 E F0 .425
(\(2\) locking functions.).67 F .425
(The \214le descriptor is not necessarily associated with an)5.425 F 2.925(yo)
-.15 G 2.925(ft)492.7 240 S .425(he under)501.735 240 R(-)-.2 E .198
(lying \214les used by the access method.)144 252 R .198
(No \214le descriptor is a)5.198 F -.25(va)-.2 G .198
(ilable for in memory databases.).25 F F1(Fd)5.198 E F0
(routines return -1 on error \(setting)144 264 Q F1(errno)2.5 E F0
(\), and the \214le descriptor on success.).18 E 21.28(get A)108 280.8 R
(pointer to a routine which is the interf)2.5 E .001(ace for k)-.1 F -.15(ey)
-.1 G .001(ed retrie).15 F -.25(va)-.25 G 2.501(lf).25 G .001
(rom the database.)399.755 280.8 R .001(The address and)5.001 F .061
(length of the data associated with the speci\214ed)144 292.8 R F1 -.1(ke)2.561
G(y)-.2 E F0 .06(are returned in the structure referenced by)2.561 F F1(data)
2.56 E F0(.).26 E F1(Get)144 304.8 Q F0(routines return -1 on error \(setting)
2.5 E F1(errno)2.5 E F0(\), 0 on success, and 1 if the).18 E F1 -.1(ke)2.5 G(y)
-.2 E F0 -.1(wa)2.5 G 2.5(sn).1 G(ot in the \214le.)471.66 304.8 Q 20.72(put A)
108 321.6 R(pointer to a routine to store k)2.5 E -.15(ey)-.1 G
(/data pairs in the database.).15 E(The parameter)144 338.4 Q F1<8d61>2.5 E(g)
-.1 E F0(may be set to one of the follo)2.5 E(wing v)-.25 E(alues:)-.25 E
(R_CURSOR)144 355.2 Q .051(Replace the k)180 367.2 R -.15(ey)-.1 G .051
(/data pair referenced by the cursor).15 F 5.052(.T)-.55 G .052
(he cursor must ha)393.98 367.2 R .352 -.15(ve p)-.2 H(re).15 E .052
(viously been)-.25 F(initialized.)180 379.2 Q(R_IAFTER)144 396 Q 1.165
(Append the data immediately after the data referenced by)180 408 R F1 -.1(ke)
3.664 G(y)-.2 E F0 3.664(,c).32 G 1.164(reating a ne)446.758 408 R 3.664(wk)
-.25 G -.15(ey)511.27 408 S(/data).15 E(pair)180 420 Q 6.065(.T)-.55 G 1.065
(he record number of the appended k)209.675 420 R -.15(ey)-.1 G 1.065
(/data pair is returned in the).15 F F1 -.1(ke)3.565 G(y)-.2 E F0(structure.)
3.565 E(\(Applicable only to the DB_RECNO access method.\))180 432 Q(R_IBEFORE)
144 448.8 Q 1.293(Insert the data immediately before the data referenced by)180
460.8 R F1 -.1(ke)3.793 G(y)-.2 E F0 3.793(,c).32 G 1.293(reating a ne)446.371
460.8 R 3.793(wk)-.25 G -.15(ey)511.27 460.8 S(/data).15 E(pair)180 472.8 Q
6.54(.T)-.55 G 1.54(he record number of the inserted k)210.15 472.8 R -.15(ey)
-.1 G 1.541(/data pair is returned in the).15 F F1 -.1(ke)4.041 G(y)-.2 E F0
(structure.)4.041 E(\(Applicable only to the DB_RECNO access method.\))180
484.8 Q(R_NOO)144 501.6 Q(VER)-.5 E(WRITE)-.55 E(Enter the ne)180 513.6 Q 2.5
(wk)-.25 G -.15(ey)242.69 513.6 S(/data pair only if the k).15 E .3 -.15(ey d)
-.1 H(oes not pre).15 E(viously e)-.25 E(xist.)-.15 E(R_SETCURSOR)144 530.4 Q
1.36(Store the k)180 542.4 R -.15(ey)-.1 G 1.36(/data pair).15 F 3.86(,s)-.4 G
1.359(etting or initializing the position of the cursor to reference it.)283.94
542.4 R(\(Applicable only to the DB_BTREE and DB_RECNO access methods.\))180
554.4 Q .563(R_SETCURSOR is a)144 571.2 R -.25(va)-.2 G .564
(ilable only for the DB_BTREE and DB_RECNO access methods because).25 F
(it implies that the k)144 583.2 Q -.15(ey)-.1 G 2.5(sh).15 G -2.25 -.2(av e)
241.81 583.2 T(an inherent order which does not change.)2.7 E .416
(R_IAFTER and R_IBEFORE are a)144 600 R -.25(va)-.2 G .416
(ilable only for the DB_RECNO access method because the).25 F(y)-.15 E 1.221
(each imply that the access method is able to create ne)144 612 R 3.722(wk)-.25
G -.15(ey)385.644 612 S 3.722(s. This).15 F 1.222(is only true if the k)3.722 F
-.15(ey)-.1 G 3.722(sa).15 G(re)532.23 612 Q
(ordered and independent, record numbers for e)144 624 Q(xample.)-.15 E .289
(The def)144 640.8 R .289(ault beha)-.1 F .289(vior of the)-.2 F F1(put)2.789 E
F0 .289(routines is to enter the ne)2.789 F 2.789(wk)-.25 G -.15(ey)388.998
640.8 S .288(/data pair).15 F 2.788(,r)-.4 G .288(eplacing an)444.284 640.8 R
2.788(yp)-.15 G(re)503.03 640.8 Q(viously)-.25 E -.15(ex)144 652.8 S(isting k)
.15 E -.15(ey)-.1 G(.)-.5 E F1(Put)144 669.6 Q F0 .37
(routines return -1 on error \(setting)2.87 F F1(errno)2.87 E F0 .37
(\), 0 on success, and 1 if the R_NOO).18 F(VER)-.5 E(WRITE)-.55 E F1<8d61>2.87
E(g)-.1 E F0 -.1(wa)144 681.6 S 2.5(ss).1 G(et and the k)165.84 681.6 Q .3 -.15
(ey a)-.1 H(lready e).15 E(xists in the \214le.)-.15 E(4.4 Berk)72 732 Q(ele)
-.1 E 2.5(yD)-.15 G(istrib)132.57 732 Q 89.875(ution September)-.2 F(13, 1993)
2.5 E(2)535 732 Q EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 124.01(DBOPEN\(3\) BSD)72 48 R(Programmer')2.5 E 2.5
(sM)-.55 G 124.01(anual DBOPEN\(3\))340.17 48 R 20.17(seq A)108 84 R .002
(pointer to a routine which is the interf)2.502 F .002
(ace for sequential retrie)-.1 F -.25(va)-.25 G 2.502(lf).25 G .002
(rom the database.)416.694 84 R .001(The address)5.001 F .219
(and length of the k)144 96 R .519 -.15(ey a)-.1 H .219
(re returned in the structure referenced by).15 F/F1 10/Times-Italic@0 SF -.1
(ke)2.72 G(y)-.2 E F0 2.72(,a).32 G .22(nd the address and length of)426.42 96
R(the data are returned in the structure referenced by)144 108 Q F1(data)2.5 E
F0(.).26 E .937(Sequential k)144 124.8 R -.15(ey)-.1 G .937(/data pair retrie)
.15 F -.25(va)-.25 G 3.437(lm).25 G .936(ay be)289.748 124.8 R .936(gin at an)
-.15 F 3.436(yt)-.15 G .936(ime, and the position of the `)359.292 124.8 R
(`cursor')-.74 E 3.436('i)-.74 G 3.436(sn)519.894 124.8 S(ot)532.22 124.8 Q(af)
144 136.8 Q 1.585(fected by calls to the)-.25 F F1(del)4.085 E F0(,).51 E F1
-.1(ge)4.085 G(t).1 E F0(,).68 E F1(put)4.086 E F0 4.086(,o).68 G(r)308.452
136.8 Q F1(sync)4.086 E F0 4.086(routines. Modi\214cations)4.086 F 1.586
(to the database during a)4.086 F 1.404(sequential scan will be re\215ected in\
the scan, i.e. records inserted behind the cursor will not be)144 148.8 R
(returned while records inserted in front of the cursor will be returned.)144
160.8 Q(The \215ag v)144 177.6 Q(alue)-.25 E/F2 10/Times-Bold@0 SF(must)2.5 E
F0(be set to one of the follo)2.5 E(wing v)-.25 E(alues:)-.25 E(R_CURSOR)144
194.4 Q .523(The data associated with the speci\214ed k)180 206.4 R .824 -.15
(ey i)-.1 H 3.024(sr).15 G 3.024(eturned. This)367.236 206.4 R(dif)3.024 E .524
(fers from the)-.25 F F1 -.1(ge)3.024 G(t).1 E F0(routines)3.024 E 1.143
(in that it sets or initializes the cursor to the location of the k)180 218.4 R
1.443 -.15(ey a)-.1 H 3.642(sw).15 G 3.642(ell. \(Note,)464.924 218.4 R 1.142
(for the)3.642 F 1.275(DB_BTREE access method, the returned k)180 230.4 R 1.575
-.15(ey i)-.1 H 3.775(sn).15 G 1.276(ot necessarily an e)386.425 230.4 R 1.276
(xact match for the)-.15 F .598(speci\214ed k)180 242.4 R -.15(ey)-.1 G 5.598
(.T)-.5 G .598(he returned k)246.396 242.4 R .898 -.15(ey i)-.1 H 3.098(st).15
G .598(he smallest k)325.188 242.4 R .898 -.15(ey g)-.1 H .598
(reater than or equal to the speci\214ed).15 F -.1(ke)180 254.4 S 1.3 -.65
(y, p)-.05 H(ermitting partial k).65 E .3 -.15(ey m)-.1 H
(atches and range searches.\)).15 E(R_FIRST)144 271.2 Q 1.043(The \214rst k)180
283.2 R -.15(ey)-.1 G 1.044(/data pair of the database is returned, and the cu\
rsor is set or initialized to).15 F(reference it.)180 295.2 Q(R_LAST)144 312 Q
.085(The last k)180 324 R -.15(ey)-.1 G .085(/data pair of the database is ret\
urned, and the cursor is set or initialized to ref-).15 F(erence it.)180 336 Q
(\(Applicable only to the DB_BTREE and DB_RECNO access methods.\))5 E(R_NEXT)
144 352.8 Q(Retrie)180 364.8 Q .604 -.15(ve t)-.25 H .304(he k).15 F -.15(ey)
-.1 G .304(/data pair immediately after the cursor).15 F 5.304(.I)-.55 G 2.804
(ft)410.622 364.8 S .305(he cursor is not yet set, this is)419.536 364.8 R
(the same as the R_FIRST \215ag.)180 376.8 Q(R_PREV)144 393.6 Q(Retrie)180
405.6 Q .755 -.15(ve t)-.25 H .455(he k).15 F -.15(ey)-.1 G .455
(/data pair immediately before the cursor).15 F 5.455(.I)-.55 G 2.955(ft)419.05
405.6 S .454(he cursor is not yet set, this)428.115 405.6 R .62
(is the same as the R_LAST \215ag.)180 417.6 R .621
(\(Applicable only to the DB_BTREE and DB_RECNO)5.621 F(access methods.\))180
429.6 Q .911(R_LAST and R_PREV are a)144 446.4 R -.25(va)-.2 G .911
(ilable only for the DB_BTREE and DB_RECNO access methods).25 F(because the)144
458.4 Q 2.5(ye)-.15 G(ach imply that the k)202.16 458.4 Q -.15(ey)-.1 G 2.5(sh)
.15 G -2.25 -.2(av e)302.18 458.4 T(an inherent order which does not change.)
2.7 E F1(Seq)144 475.2 Q F0 .061(routines return -1 on error \(setting)2.561 F
F1(errno)2.561 E F0 .061(\), 0 on success and 1 if there are no k).18 F -.15
(ey)-.1 G .061(/data pairs less).15 F .35
(than or greater than the speci\214ed or current k)144 487.2 R -.15(ey)-.1 G
5.349(.I)-.5 G 2.849(ft)346.467 487.2 S .349
(he DB_RECNO access method is being used,)355.426 487.2 R .025
(and if the database \214le is a character special \214le and no complete k)144
499.2 R -.15(ey)-.1 G .025(/data pairs are currently a).15 F -.25(va)-.2 G(il-)
.25 E(able, the)144 511.2 Q F1(seq)2.5 E F0(routines return 2.)2.5 E 15.17
(sync A)108 528 R .458(pointer to a routine to \215ush an)2.958 F 2.957(yc)-.15
G .457(ached information to disk.)289.72 528 R .457
(If the database is in memory only)5.457 F(,)-.65 E(the)144 540 Q F1(sync)2.5 E
F0(routine has no ef)2.5 E(fect and will al)-.25 E -.1(wa)-.1 G(ys succeed.).1
E(The \215ag v)144 556.8 Q(alue may be set to the follo)-.25 E(wing v)-.25 E
(alue:)-.25 E(R_RECNOSYNC)144 573.6 Q .077(If the DB_RECNO access method is be\
ing used, this \215ag causes the sync routine to apply)180 585.6 R .75(to the \
btree \214le which underlies the recno \214le, not the recno \214le itself.)180
597.6 R .75(\(See the)5.75 F F1(bfname)3.25 E F0(\214eld of the)180 609.6 Q F1
-.37(re)2.5 G(cno).37 E F0(\(3\) manual page for more information.\)).18 E F1
(Sync)144 626.4 Q F0(routines return -1 on error \(setting)2.5 E F1(errno)2.5 E
F0 2.5(\)a).18 G(nd 0 on success.)336.91 626.4 Q/F3 9/Times-Bold@0 SF(KEY/D)72
643.2 Q -1.35 -.855(AT A)-.315 H -.666(PA)3.105 G(IRS).666 E F0 .134
(Access to all \214le types is based on k)108 655.2 R -.15(ey)-.1 G .134
(/data pairs.).15 F .134(Both k)5.134 F -.15(ey)-.1 G 2.634(sa).15 G .134
(nd data are represented by the follo)359.078 655.2 R .135(wing data)-.25 F
(structure:)108 667.2 Q(typedef struct {)108 684 Q(4.4 Berk)72 732 Q(ele)-.1 E
2.5(yD)-.15 G(istrib)132.57 732 Q 89.875(ution September)-.2 F(13, 1993)2.5 E
(3)535 732 Q EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 124.01(DBOPEN\(3\) BSD)72 48 R(Programmer')2.5 E 2.5
(sM)-.55 G 124.01(anual DBOPEN\(3\))340.17 48 R -.2(vo)144 84 S(id *data;).2 E
(size_t size;)144 96 Q 2.5(}D)108 108 S(BT)122.52 108 Q(;)-.55 E
(The elements of the DBT structure are de\214ned as follo)108 124.8 Q(ws:)-.25
E 16.84(data A)108 141.6 R(pointer to a byte string.)2.5 E 17.95(size The)108
158.4 R(length of the byte string.)2.5 E -2.15 -.25(Ke y)108 175.2 T .829(and \
data byte strings may reference strings of essentially unlimited length althou\
gh an)3.579 F 3.328(yt)-.15 G 1.028 -.1(wo o)492.894 175.2 T 3.328(ft).1 G(hem)
522.78 175.2 Q 1.133(must \214t into a)108 187.2 R -.25(va)-.2 G 1.134
(ilable memory at the same time.).25 F 1.134
(It should be noted that the access methods pro)6.134 F 1.134(vide no)-.15 F
(guarantees about byte string alignment.)108 199.2 Q/F1 9/Times-Bold@0 SF(ERR)
72 216 Q(ORS)-.27 E F0(The)108 228 Q/F2 10/Times-Italic@0 SF(dbopen)3.389 E F0
.889(routine may f)3.389 F .889(ail and set)-.1 F F2(errno)3.388 E F0 .888
(for an)3.388 F 3.388(yo)-.15 G 3.388(ft)324.376 228 S .888
(he errors speci\214ed for the library routines)333.874 228 R F2(open)3.388 E
F0(\(2\)).24 E(and)108 240 Q F2(malloc)2.5 E F0(\(3\) or the follo).31 E(wing:)
-.25 E([EFTYPE])108 256.8 Q 2.5<418c>144 268.8 S(le is incorrectly formatted.)
159.28 268.8 Q([EINV)108 285.6 Q(AL])-1.35 E 2.812(Ap)144 297.6 S .313(aramete\
r has been speci\214ed \(hash function, pad byte etc.\) that is incompatible w\
ith the current)159.032 297.6 R .406
(\214le speci\214cation or which is not meaningful for the function \(for e)144
309.6 R .405(xample, use of the cursor with-)-.15 F .099
(out prior initialization\) or there is a mismatch between the v)144 321.6 R .1
(ersion number of \214le and the softw)-.15 F(are.)-.1 E(The)108 338.4 Q F2
(close)3.469 E F0 .969(routines may f)3.469 F .969(ail and set)-.1 F F2(errno)
3.469 E F0 .969(for an)3.469 F 3.469(yo)-.15 G 3.469(ft)320.18 338.4 S .969
(he errors speci\214ed for the library routines)329.759 338.4 R F2(close)3.468
E F0(\(2\),).18 E F2 -.37(re)108 350.4 S(ad).37 E F0(\(2\),).77 E F2(write)2.5
E F0(\(2\),).18 E F2(fr)2.5 E(ee)-.37 E F0(\(3\), or).18 E F2(fsync)2.5 E F0
(\(2\).).31 E(The)108 367.2 Q F2(del)2.969 E F0(,).51 E F2 -.1(ge)2.969 G(t).1
E F0(,).68 E F2(put)2.969 E F0(and)2.969 E F2(seq)2.969 E F0 .469
(routines may f)2.969 F .469(ail and set)-.1 F F2(errno)2.97 E F0 .47(for an)
2.97 F 2.97(yo)-.15 G 2.97(ft)377.59 367.2 S .47
(he errors speci\214ed for the library rou-)386.67 367.2 R(tines)108 379.2 Q F2
-.37(re)2.5 G(ad).37 E F0(\(2\),).77 E F2(write)2.5 E F0(\(2\),).18 E F2(fr)2.5
E(ee)-.37 E F0(\(3\) or).18 E F2(malloc)2.5 E F0(\(3\).).31 E(The)108 396 Q F2
(fd)2.5 E F0(routines will f)2.5 E(ail and set)-.1 E F2(errno)2.5 E F0
(to ENOENT for in memory databases.)2.5 E(The)108 412.8 Q F2(sync)2.5 E F0
(routines may f)2.5 E(ail and set)-.1 E F2(errno)2.5 E F0(for an)2.5 E 2.5(yo)
-.15 G 2.5(ft)307.71 412.8 S(he errors speci\214ed for the library routine)
316.32 412.8 Q F2(fsync)2.5 E F0(\(2\).).31 E F1(SEE ALSO)72 429.6 Q F2(btr)108
441.6 Q(ee)-.37 E F0(\(3\),).18 E F2(hash)2.5 E F0(\(3\),).28 E F2(mpool)2.5 E
F0(\(3\),).51 E F2 -.37(re)2.5 G(cno).37 E F0(\(3\)).18 E F2 .904(LIBTP: P)108
465.6 R(ortable)-.8 E 3.404(,M)-.1 G .904(odular T)189.738 465.6 R -.15(ra)-.55
G .904(nsactions for UNIX).15 F F0 3.404(,M).94 G(ar)328.884 465.6 Q .904
(go Seltzer)-.18 F 3.403(,M)-.4 G .903(ichael Olson, USENIX proceedings,)
392.041 465.6 R -.4(Wi)108 477.6 S(nter 1992.).4 E F1 -.09(BU)72 494.4 S(GS).09
E F0 .399(The typedef DBT is a mnemonic for `)108 506.4 R .399
(`data base thang')-.74 F .399(', and w)-.74 F .399
(as used because noone could think of a rea-)-.1 F(sonable name that w)108
518.4 Q(asn')-.1 E 2.5(ta)-.18 G(lready used.)216.03 518.4 Q
(The \214le descriptor interf)108 535.2 Q
(ace is a kluge and will be deleted in a future v)-.1 E(ersion of the interf)
-.15 E(ace.)-.1 E(None of the access methods pro)108 552 Q(vide an)-.15 E 2.5
(yf)-.15 G(orm of concurrent access, locking, or transactions.)275.16 552 Q
(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G(istrib)132.57 732 Q 89.875
(ution September)-.2 F(13, 1993)2.5 E(4)535 732 Q EP
%%Trailer
end
%%EOF

292
berkdb/docs/hash.3.ps Normal file
View File

@@ -0,0 +1,292 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.08
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.08 0
%%Pages: 2
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.08 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 136.79(HASH\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 136.79(anual HASH\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72 84 S
(ME).18 E F0(hash \255 hash database access method)108 96 Q F1(SYNOPSIS)72
112.8 Q/F2 10/Times-Bold@0 SF(#include <sys/types.h>)108 124.8 Q(#include <db)
108 136.8 Q(.h>)-.4 E F1(DESCRIPTION)72 153.6 Q F0 .29(The routine)108 165.6 R
/F3 10/Times-Italic@0 SF(dbopen)2.79 E F0 .29(is the library interf)2.79 F .29
(ace to database \214les.)-.1 F .29
(One of the supported \214le formats is hash \214les.)5.29 F .974
(The general description of the database access methods is in)108 177.6 R F3
(dbopen)3.475 E F0 .975(\(3\), this manual page describes only).24 F
(the hash speci\214c information.)108 189.6 Q(The hash data structure is an e)
108 206.4 Q(xtensible, dynamic hashing scheme.)-.15 E .83
(The access method speci\214c data structure pro)108 223.2 R .83(vided to)-.15
F F3(dbopen)3.33 E F0 .83(is de\214ned in the <db)3.33 F .83
(.h> include \214le as fol-)-.4 F(lo)108 235.2 Q(ws:)-.25 E(typedef struct {)
108 259.2 Q(int bsize;)144 271.2 Q(int cachesize;)144 283.2 Q(int f)144 295.2 Q
-.1(fa)-.25 G(ctor;).1 E(u_long \(*hash\)\(const v)144 307.2 Q
(oid *, size_t\);)-.2 E(int lorder;)144 319.2 Q(int nelem;)144 331.2 Q 2.5(}H)
108 343.2 S(ASHINFO;)122.52 343.2 Q
(The elements of this structure are as follo)108 360 Q(ws:)-.25 E(bsize)108
376.8 Q F3(Bsize)144 376.8 Q F0 1.393(de\214nes the hash table b)3.893 F(uck)
-.2 E 1.393(et size, and is, by def)-.1 F 1.394(ault, 256 bytes.)-.1 F 1.394
(It may be preferable to)6.394 F
(increase the page size for disk-resident tables and tables with lar)144 388.8
Q(ge data items.)-.18 E(cachesize)108 405.6 Q 3.16(As)144 417.6 S .66
(uggested maximum size, in bytes, of the memory cache.)158.27 417.6 R .659
(This v)5.659 F .659(alue is)-.25 F F2(only)3.159 E F0(advisory)3.159 E 3.159
(,a)-.65 G .659(nd the)514.621 417.6 R
(access method will allocate more memory rather than f)144 429.6 Q(ail.)-.1 E
-2.1 -.25(ff a)108 446.4 T(ctor).25 E F3(Ffactor)9.7 E F0 .482
(indicates a desired density within the hash table.)2.981 F .482
(It is an approximation of the number of)5.482 F -.1(ke)144 458.4 S .429
(ys allo)-.05 F .429(wed to accumulate in an)-.25 F 2.929(yo)-.15 G .429(ne b)
291.454 458.4 R(uck)-.2 E .429(et, determining when the hash table gro)-.1 F
.428(ws or shrinks.)-.25 F(The def)144 470.4 Q(ault v)-.1 E(alue is 8.)-.25 E
(hash)108 487.2 Q F3(Hash)144 487.2 Q F0 .1(is a user de\214ned hash function.)
2.6 F .1(Since no hash function performs equally well on all possible)5.1 F
.924(data, the user may \214nd that the b)144 499.2 R .923
(uilt-in hash function does poorly on a particular data set.)-.2 F(User)5.923 E
1.408(speci\214ed hash functions must tak)144 511.2 R 3.909(et)-.1 G 1.609 -.1
(wo a)293.431 511.2 T -.18(rg).1 G 1.409
(uments \(a pointer to a byte string and a length\) and).18 F
(return an u_long to be used as the hash v)144 523.2 Q(alue.)-.25 E 9.62
(lorder The)108 540 R 1.597(byte order for inte)4.097 F 1.596
(gers in the stored database metadata.)-.15 F 1.596
(The number should represent the)6.596 F .688(order as an inte)144 552 R .689
(ger; for e)-.15 F .689(xample, big endian order w)-.15 F .689
(ould be the number 4,321.)-.1 F(If)5.689 E F3(lor)3.189 E(der)-.37 E F0 .689
(is 0 \(no)3.189 F .822(order is speci\214ed\) the current host order is used.)
144 564 R .822(If the)5.822 F .822(\214le already e)5.822 F .821
(xists, the speci\214ed v)-.15 F .821(alue is)-.25 F(ignored and the v)144 576
Q(alue speci\214ed when the tree w)-.25 E(as created is used.)-.1 E(nelem)108
592.8 Q F3(Nelem)144 592.8 Q F0 .701
(is an estimate of the \214nal size of the hash table.)3.2 F .701
(If not set or set too lo)5.701 F 2.001 -.65(w, h)-.25 H .701(ash tables will)
.65 F -.15(ex)144 604.8 S .448(pand gracefully as k).15 F -.15(ey)-.1 G 2.948
(sa).15 G .448(re entered, although a slight performance de)255.912 604.8 R
.447(gradation may be noticed.)-.15 F(The def)144 616.8 Q(ault v)-.1 E
(alue is 1.)-.25 E .79(If the \214le already e)108 633.6 R .79
(xists \(and the O_TR)-.15 F .79(UNC \215ag is not speci\214ed\), the v)-.4 F
.79(alues speci\214ed for the parameters)-.25 F(bsize, f)108 645.6 Q -.1(fa)
-.25 G(ctor).1 E 2.5(,l)-.4 G(order and nelem are ignored and the v)167.23
645.6 Q(alues speci\214ed when the tree w)-.25 E(as created are used.)-.1 E
1.232(If a hash function is speci\214ed,)108 662.4 R F3(hash_open)3.731 E F0
1.231(will attempt to determine if the hash function speci\214ed is the)3.731 F
(same as the one with which the database w)108 674.4 Q(as created, and will f)
-.1 E(ail if it is not.)-.1 E(Backw)108 691.2 Q .861(ard compatible interf)-.1
F .861(aces to the routines described in)-.1 F F3(dbm)3.362 E F0 .862
(\(3\), and).32 F F3(ndbm)3.362 E F0 .862(\(3\) are pro).32 F .862(vided, ho)
-.15 F(we)-.25 E -.15(ve)-.25 G -.4(r,).15 G(4.4 Berk)72 732 Q(ele)-.1 E 2.5
(yD)-.15 G(istrib)132.57 732 Q 96.815(ution August)-.2 F(17, 1993)2.5 E(1)535
732 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 136.79(HASH\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 136.79(anual HASH\(3\))340.17 48 R(these interf)108 84 Q
(aces are not compatible with pre)-.1 E(vious \214le formats.)-.25 E/F1 9
/Times-Bold@0 SF(SEE ALSO)72 100.8 Q/F2 10/Times-Italic@0 SF(btr)108 112.8 Q
(ee)-.37 E F0(\(3\),).18 E F2(dbopen)2.5 E F0(\(3\),).24 E F2(mpool)2.5 E F0
(\(3\),).51 E F2 -.37(re)2.5 G(cno).37 E F0(\(3\)).18 E F2(Dynamic Hash T)108
136.8 Q(ables)-.92 E F0 2.5(,P).27 G(er)206.79 136.8 Q(-Ak)-.2 E 2.5(eL)-.1 G
(arson, Communications of the A)242.86 136.8 Q(CM, April 1988.)-.4 E F2 2.5(AN)
108 160.8 S .3 -.15(ew H)123.28 160.8 T(ash P).15 E(ac)-.8 E(ka)-.2 E .2 -.1
(ge f)-.1 H(or UNIX).1 E F0 2.5(,M).94 G(ar)248.41 160.8 Q(go Seltzer)-.18 E
2.5(,U)-.4 G(SENIX Proceedings, W)308.09 160.8 Q(inter 1991.)-.4 E F1 -.09(BU)
72 177.6 S(GS).09 E F0(Only big and little endian byte order is supported.)108
189.6 Q(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G(istrib)132.57 732 Q 96.815
(ution August)-.2 F(17, 1993)2.5 E(2)535 732 Q EP
%%Trailer
end
%%EOF

12209
berkdb/docs/hash.usenix.ps Normal file

File diff suppressed because it is too large Load Diff

12340
berkdb/docs/libtp.usenix.ps Normal file

File diff suppressed because it is too large Load Diff

320
berkdb/docs/mpool.3.ps Normal file
View File

@@ -0,0 +1,320 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.08
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.08 0
%%Pages: 2
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.08 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 129.01(MPOOL\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 129.01(anual MPOOL\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72 84 S
(ME).18 E F0(mpool \255 shared memory b)108 96 Q(uf)-.2 E(fer pool)-.25 E F1
(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(#include <db)108 124.8 Q(.h>)-.4 E
(#include <mpool.h>)108 136.8 Q(MPOOL *)108 160.8 Q(mpool_open \(DBT *k)108
172.8 Q(ey)-.1 E 2.5(,i)-.55 G(nt fd, pgno_t pagesize, pgno_t maxcache\);)
216.25 172.8 Q -.1(vo)108 196.8 S(id).1 E(mpool_\214lter \(MPOOL *mp, v)108
208.8 Q(oid \(*pgin\)\(v)-.1 E(oid *, pgno_t, v)-.1 E(oid *\),)-.1 E -.1(vo)158
220.8 S(id \(*pgout\)\(v).1 E(oid *, pgno_t, v)-.1 E(oid *\), v)-.1 E
(oid *pgcookie\);)-.1 E -.1(vo)108 244.8 S(id *).1 E
(mpool_new \(MPOOL *mp, pgno_t *pgnoaddr\);)108 256.8 Q -.1(vo)108 280.8 S
(id *).1 E(mpool_get \(MPOOL *mp, pgno_t pgno, u_int \215ags\);)108 292.8 Q
(int)108 316.8 Q(mpool_put \(MPOOL *mp, v)108 328.8 Q(oid *pgaddr)-.1 E 2.5(,u)
-.92 G(_int \215ags\);)290.62 328.8 Q(int)108 352.8 Q
(mpool_sync \(MPOOL *mp\);)108 364.8 Q(int)108 388.8 Q
(mpool_close \(MPOOL *mp\);)108 400.8 Q F1(DESCRIPTION)72 417.6 Q/F3 10
/Times-Italic@0 SF(Mpool)108 429.6 Q F0 1.013(is the library interf)3.513 F
1.013(ace intended to pro)-.1 F 1.013(vide page oriented b)-.15 F(uf)-.2 E
1.012(fer management of \214les.)-.25 F 1.012(The b)6.012 F(uf)-.2 E(fers)-.25
E(may be shared between processes.)108 441.6 Q .416(The function)108 458.4 R F3
(mpool_open)2.916 E F0 .417(initializes a memory pool.)2.917 F(The)5.417 E F3
-.1(ke)2.917 G(y)-.2 E F0(ar)2.917 E .417(gument is the byte string used to ne)
-.18 F(gotiate)-.15 E .697(between multiple processes wishing to share b)108
470.4 R(uf)-.2 E 3.196(fers. If)-.25 F .696(the \214le b)3.196 F(uf)-.2 E .696
(fers are mapped in shared memory)-.25 F 3.196(,a)-.65 G(ll)534.44 470.4 Q .894
(processes using the same k)108 482.4 R 1.194 -.15(ey w)-.1 H .894
(ill share the b).15 F(uf)-.2 E 3.394(fers. If)-.25 F F3 -.1(ke)3.394 G(y)-.2 E
F0 .895(is NULL, the b)3.395 F(uf)-.2 E .895(fers are mapped into pri)-.25 F
-.25(va)-.25 G(te).25 E(memory)108 494.4 Q 5.116(.T)-.65 G(he)154.406 494.4 Q
F3(fd)2.616 E F0(ar)2.616 E .115(gument is a \214le descriptor for the underly\
ing \214le, which must be seekable.)-.18 F(If)5.115 E F3 -.1(ke)2.615 G(y)-.2 E
F0 .115(is non-)2.615 F(NULL and matches a \214le already being mapped, the)108
506.4 Q F3(fd)2.5 E F0(ar)2.5 E(gument is ignored.)-.18 E(The)108 523.2 Q F3
(pa)3.328 E -.1(ge)-.1 G(size).1 E F0(ar)3.329 E .829
(gument is the size, in bytes, of the pages into which the \214le is brok)-.18
F .829(en up.)-.1 F(The)5.829 E F3(maxcac)3.329 E(he)-.15 E F0(ar)108 535.2 Q
.153(gument is the maximum number of pages from the underlying \214le to cache\
at an)-.18 F 2.653(yo)-.15 G .153(ne time.)451.308 535.2 R .153(This v)5.153 F
.153(alue is)-.25 F .099(not relati)108 547.2 R .399 -.15(ve t)-.25 H 2.599(ot)
.15 G .099(he number of processes which share a \214le')168.727 547.2 R 2.6(sb)
-.55 G(uf)350.39 547.2 Q .1(fers, b)-.25 F .1(ut will be the lar)-.2 F .1
(gest v)-.18 F .1(alue speci\214ed by)-.25 F(an)108 559.2 Q 2.5(yo)-.15 G 2.5
(ft)129.79 559.2 S(he processes sharing the \214le.)138.4 559.2 Q(The)108 576 Q
F3(mpool_\214lter)3.254 E F0 .754(function is intended to mak)3.254 F 3.254(et)
-.1 G .754(ransparent input and output processing of the pages possi-)301.778
576 R 3.095(ble. If)108 588 R(the)3.095 E F3(pgin)3.095 E F0 .596
(function is speci\214ed, it is called each time a b)3.095 F(uf)-.2 E .596
(fer is read into the memory pool from the)-.25 F .125(backing \214le.)108 600
R .125(If the)5.125 F F3(pgout)2.625 E F0 .125
(function is speci\214ed, it is called each time a b)2.625 F(uf)-.2 E .125
(fer is written into the backing \214le.)-.25 F .276
(Both functions are are called with the)108 612 R F3(pgcookie)2.777 E F0
(pointer)2.777 E 2.777(,t)-.4 G .277
(he page number and a pointer to the page to being)337.27 612 R
(read or written.)108 624 Q .124(The function)108 640.8 R F3(mpool_ne)2.624 E
(w)-.15 E F0(tak)2.624 E .123(es an MPOOL pointer and an address as ar)-.1 F
2.623(guments. If)-.18 F 2.623(an)2.623 G .623 -.25(ew p)457.568 640.8 T .123
(age can be allo-).25 F .944(cated, a pointer to the page is returned and the \
page number is stored into the)108 652.8 R F3(pgnoaddr)3.445 E F0 3.445
(address. Other)3.445 F(-)-.2 E(wise, NULL is returned and errno is set.)108
664.8 Q 1.167(The function)108 681.6 R F3(mpool_g)3.667 E(et)-.1 E F0(tak)3.667
E 1.167(es a MPOOL pointer and a page number as ar)-.1 F 3.666(guments. If)-.18
F 1.166(the page e)3.666 F 1.166(xists, a)-.15 F .686
(pointer to the page is returned.)108 693.6 R .687
(Otherwise, NULL is returned and errno is set.)5.686 F .687
(The \215ags parameter is not)5.687 F(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G
(istrib)132.57 732 Q 104.595(ution June)-.2 F(4, 1993)2.5 E(1)535 732 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 129.01(MPOOL\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 129.01(anual MPOOL\(3\))340.17 48 R(currently used.)108 84 Q 1.463
(The function)108 100.8 R/F1 10/Times-Italic@0 SF(mpool_put)3.963 E F0 1.462
(unpins the page referenced by)3.962 F F1(pgaddr)3.962 E F0(.).73 E F1(Pgaddr)
6.462 E F0 1.462(must be an address pre)3.962 F(viously)-.25 E(returned by)108
112.8 Q F1(mpool_g)2.5 E(et)-.1 E F0(or)2.5 E F1(mpool_ne)2.5 E(w)-.15 E F0 5
(.T).31 G(he \215ag v)271.65 112.8 Q(alue is speci\214ed by)-.25 E F1(or)2.5 E
F0('ing an).73 E 2.5(yo)-.15 G 2.5(ft)434.74 112.8 S(he follo)443.35 112.8 Q
(wing v)-.25 E(alues:)-.25 E(MPOOL_DIR)108 129.6 Q(TY)-.6 E
(The page has been modi\214ed and needs to be written to the backing \214le.)
144 141.6 Q F1(Mpool_put)108 158.4 Q F0
(returns 0 on success and -1 if an error occurs.)2.5 E .247(The function)108
175.2 R F1(mpool_sync)2.747 E F0 .247(writes all modi\214ed pages associated w\
ith the MPOOL pointer to the backing \214le.)2.747 F F1(Mpool_sync)108 187.2 Q
F0(returns 0 on success and -1 if an error occurs.)2.5 E(The)108 204 Q F1
(mpool_close)2.698 E F0 .198(function free')2.698 F 2.698(su)-.55 G 2.698(pa)
245.432 204 S .498 -.15(ny a)257.57 204 T .198
(llocated memory associated with the memory pool cookie.).15 F(Modi-)5.197 E
(\214ed pages are)108 216 Q/F2 10/Times-Bold@0 SF(not)2.5 E F0
(written to the backing \214le.)2.5 E F1(Mpool_close)5 E F0
(returns 0 on success and -1 if an error occurs.)2.5 E/F3 9/Times-Bold@0 SF
(ERR)72 232.8 Q(ORS)-.27 E F0(The)108 244.8 Q F1(mpool_open)2.938 E F0 .438
(function may f)2.938 F .438(ail and set)-.1 F F1(errno)2.938 E F0 .438(for an)
2.938 F 2.938(yo)-.15 G 2.938(ft)344.87 244.8 S .439
(he errors speci\214ed for the library routine)353.918 244.8 R F1(mal-)2.939 E
(loc)108 256.8 Q F0(\(3\).).31 E(The)108 273.6 Q F1(mpool_g)2.5 E(et)-.1 E F0
(function may f)2.5 E(ail and set)-.1 E F1(errno)2.5 E F0(for the follo)2.5 E
(wing:)-.25 E([EINV)108 290.4 Q 29.98(AL] The)-1.35 F(requested record doesn')
2.5 E 2.5(te)-.18 G(xist.)305.96 290.4 Q(The)108 307.2 Q F1(mpool_ne)4.073 E(w)
-.15 E F0(and)4.073 E F1(mpool_g)4.073 E(et)-.1 E F0 1.573(functions may f)
4.073 F 1.573(ail and set)-.1 F F1(errno)4.073 E F0 1.573(for an)4.073 F 4.073
(yo)-.15 G 4.073(ft)421.336 307.2 S 1.573(he errors speci\214ed for the)431.519
307.2 R(library routines)108 319.2 Q F1 -.37(re)2.5 G(ad).37 E F0(\(2\)).77 E
F1 2.5(,w).54 G(rite)214.48 319.2 Q F0(\(2\)).18 E F1(,).54 E F0(and)2.5 E F1
(malloc)2.5 E F0(\(3\).).31 E(The)108 336 Q F1(mpool_sync)4.287 E F0 1.787
(function may f)4.287 F 1.787(ail and set)-.1 F F1(errno)4.288 E F0 1.788
(for an)4.288 F 4.288(yo)-.15 G 4.288(ft)356.694 336 S 1.788
(he errors speci\214ed for the library routine)367.092 336 R F1(write)108 348 Q
F0(\(2\).).18 E(The)108 364.8 Q F1(mpool_close)4.125 E F0 1.624(function may f)
4.125 F 1.624(ail and set)-.1 F F1(errno)4.124 E F0 1.624(for an)4.124 F 4.124
(yo)-.15 G 4.124(ft)357.842 364.8 S 1.624
(he errors speci\214ed for the library routine)368.076 364.8 R F1(fr)108 376.8
Q(ee)-.37 E F0(\(3\).).18 E F3(SEE ALSO)72 393.6 Q F1(dbopen)108 405.6 Q F0
(\(3\),).24 E F1(btr)2.5 E(ee)-.37 E F0(\(3\),).18 E F1(hash)2.5 E F0(\(3\),)
.28 E F1 -.37(re)2.5 G(cno).37 E F0(\(3\)).18 E(4.4 Berk)72 732 Q(ele)-.1 E 2.5
(yD)-.15 G(istrib)132.57 732 Q 104.595(ution June)-.2 F(4, 1993)2.5 E(2)535 732
Q EP
%%Trailer
end
%%EOF

341
berkdb/docs/recno.3.ps Normal file
View File

@@ -0,0 +1,341 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.08
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.08 0
%%Pages: 2
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.08 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 130.12(RECNO\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 130.12(anual RECNO\(3\))340.17 48 R/F1 9/Times-Bold@0 SF -.18(NA)72 84 S
(ME).18 E F0(recno \255 record number database access method)108 96 Q F1
(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(#include <sys/types.h>)108 124.8 Q
(#include <db)108 136.8 Q(.h>)-.4 E F1(DESCRIPTION)72 153.6 Q F0 1.158
(The routine)108 165.6 R/F3 10/Times-Italic@0 SF(dbopen)3.658 E F0 1.158
(is the library interf)3.658 F 1.158(ace to database \214les.)-.1 F 1.157
(One of the supported \214le formats is record)6.158 F 1.159(number \214les.)
108 177.6 R 1.159(The general description of the database access methods is in)
6.159 F F3(dbopen)3.66 E F0 1.16(\(3\), this manual page).24 F
(describes only the recno speci\214c information.)108 189.6 Q 1.944
(The record number data structure is either v)108 206.4 R 1.944
(ariable or \214x)-.25 F 1.944
(ed-length records stored in a \215at-\214le format,)-.15 F 2.04
(accessed by the logical record number)108 218.4 R 7.04(.T)-.55 G 2.04(he e)
286.31 218.4 R 2.04(xistence of record number \214v)-.15 F 4.54(ei)-.15 G 2.04
(mplies the e)442.1 218.4 R 2.04(xistence of)-.15 F .876
(records one through four)108 230.4 R 3.376(,a)-.4 G .875
(nd the deletion of record number one causes record number \214v)219.684 230.4
R 3.375(et)-.15 G 3.375(ob)489.93 230.4 S 3.375(er)503.305 230.4 S(enum-)514.45
230.4 Q .282(bered to record number four)108 242.4 R 2.782(,a)-.4 G 2.782(sw)
231.19 242.4 S .283(ell as the cursor)245.082 242.4 R 2.783(,i)-.4 G 2.783(fp)
316.633 242.4 S .283(ositioned after record number one, to shift do)327.746
242.4 R .283(wn one)-.25 F(record.)108 254.4 Q .373
(The recno access method speci\214c data structure pro)108 271.2 R .373
(vided to)-.15 F F3(dbopen)2.873 E F0 .373(is de\214ned in the <db)2.873 F .373
(.h> include \214le as)-.4 F(follo)108 283.2 Q(ws:)-.25 E(typedef struct {)108
300 Q(u_long \215ags;)144 312 Q(u_int cachesize;)144 324 Q(u_int psize;)144 336
Q(int lorder;)144 348 Q(size_t reclen;)144 360 Q(u_char b)144 372 Q -.25(va)
-.15 G(l;).25 E(char *bfname;)144 384 Q 2.5(}R)108 396 S(ECNOINFO;)121.97 396 Q
(The elements of this structure are de\214ned as follo)108 412.8 Q(ws:)-.25 E
14.61(\215ags The)108 429.6 R(\215ag v)2.5 E(alue is speci\214ed by)-.25 E F3
(or)2.5 E F0('ing an).73 E 2.5(yo)-.15 G 2.5(ft)313.2 429.6 S(he follo)321.81
429.6 Q(wing v)-.25 E(alues:)-.25 E(R_FIXEDLEN)144 446.4 Q .962
(The records are \214x)180 458.4 R .963(ed-length, not byte delimited.)-.15 F
.963(The structure element)5.963 F F3 -.37(re)3.463 G(clen).37 E F0
(speci\214es)3.463 E .345(the length of the record, and the structure element)
180 470.4 R F3(bval)2.844 E F0 .344(is used as the pad character)2.844 F 5.344
(.A)-.55 G -.15(ny)530.15 470.4 S .739
(records, inserted into the database, that are less than)180 482.4 R F3 -.37
(re)3.239 G(clen).37 E F0 .74(bytes long are automatically)3.239 F(padded.)180
494.4 Q(R_NOKEY)144 511.2 Q 2.34(In the interf)180 523.2 R 2.34
(ace speci\214ed by)-.1 F F3(dbopen)4.84 E F0 4.84(,t).24 G 2.34
(he sequential record retrie)344.98 523.2 R -.25(va)-.25 G 4.84<6c8c>.25 G 2.34
(lls in both the)478.25 523.2 R(caller')180 535.2 Q 3.556(sk)-.55 G 1.357 -.15
(ey a)217.336 535.2 T 1.057(nd data structures.).15 F 1.057
(If the R_NOKEY \215ag is speci\214ed, the)6.057 F F3(cur)3.557 E(sor)-.1 E F0
(routines)3.557 E .029(are not required to \214ll in the k)180 547.2 R .329
-.15(ey s)-.1 H 2.529(tructure. This).15 F .028(permits applications to retrie)
2.529 F .328 -.15(ve r)-.25 H .028(ecords at).15 F
(the end of \214les without reading all of the interv)180 559.2 Q
(ening records.)-.15 E(R_SN)144 576 Q(APSHO)-.35 E(T)-.4 E .964
(This \215ag requires that a snapshot of the \214le be tak)180 588 R .965
(en when)-.1 F F3(dbopen)3.465 E F0 .965(is called, instead of)3.465 F
(permitting an)180 600 Q 2.5(yu)-.15 G
(nmodi\214ed records to be read from the original \214le.)245.96 600 Q
(cachesize)108 616.8 Q 3.16(As)144 628.8 S .66
(uggested maximum size, in bytes, of the memory cache.)158.27 628.8 R .659
(This v)5.659 F .659(alue is)-.25 F F2(only)3.159 E F0(advisory)3.159 E 3.159
(,a)-.65 G .659(nd the)514.621 628.8 R .046
(access method will allocate more memory rather than f)144 640.8 R 2.546
(ail. If)-.1 F F3(cac)2.546 E(hesize)-.15 E F0 2.546(is 0)2.546 F .046
(\(no size is speci\214ed\) a)2.546 F(def)144 652.8 Q(ault cache is used.)-.1 E
12.95(psize The)108 669.6 R .715
(recno access method stores the in-memory copies of its records in a btree.)
3.216 F .715(This v)5.715 F .715(alue is the)-.25 F .805
(size \(in bytes\) of the pages used for nodes in that tree.)144 681.6 R(If)
5.805 E F3(psize)3.305 E F0 .806(is 0 \(no page size is speci\214ed\) a)3.305 F
1.468
(page size is chosen based on the underlying \214le system I/O block size.)144
693.6 R(See)6.467 E F3(btr)3.967 E(ee)-.37 E F0 1.467(\(3\) for more).18 F
(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G(istrib)132.57 732 Q 96.815
(ution August)-.2 F(18, 1994)2.5 E(1)535 732 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 130.12(RECNO\(3\) BSD)72 48 R(Programmer')2.5 E 2.5(sM)
-.55 G 130.12(anual RECNO\(3\))340.17 48 R(information.)144 84 Q 9.62
(lorder The)108 100.8 R 1.596(byte order for inte)4.096 F 1.596
(gers in the stored database metadata.)-.15 F 1.597
(The number should represent the)6.597 F .689(order as an inte)144 112.8 R .689
(ger; for e)-.15 F .689(xample, big endian order w)-.15 F .689
(ould be the number 4,321.)-.1 F(If)5.689 E/F1 10/Times-Italic@0 SF(lor)3.189 E
(der)-.37 E F0 .688(is 0 \(no)3.189 F
(order is speci\214ed\) the current host order is used.)144 124.8 Q 9.07
(reclen The)108 141.6 R(length of a \214x)2.5 E(ed-length record.)-.15 E -.15
(bv)108 158.4 S 16.68(al The)-.1 F .182
(delimiting byte to be used to mark the end of a record for v)2.682 F .183
(ariable-length records, and the pad)-.25 F .809(character for \214x)144 170.4
R .809(ed-length records.)-.15 F .809(If no v)5.809 F .809
(alue is speci\214ed, ne)-.25 F .809(wlines \(`)-.25 F(`\\n')-.74 E .808
('\) are used to mark the)-.74 F(end of v)144 182.4 Q
(ariable-length records and \214x)-.25 E
(ed-length records are padded with spaces.)-.15 E 3.51(bfname The)108 199.2 R
.505
(recno access method stores the in-memory copies of its records in a btree.)
3.005 F .506(If bfname is non-)5.506 F .065(NULL, it speci\214es the name of t\
he btree \214le, as if speci\214ed as the \214le name for a dbopen of a btree)
144 211.2 R(\214le.)144 223.2 Q .971(The data part of the k)108 240 R -.15(ey)
-.1 G .972(/data pair used by the recno access method is the same as other acc\
ess methods.).15 F .199(The k)108 252 R .499 -.15(ey i)-.1 H 2.699(sd).15 G(if)
157.507 252 Q 2.699(ferent. The)-.25 F F1(data)2.699 E F0 .199
(\214eld of the k)2.699 F .499 -.15(ey s)-.1 H .198
(hould be a pointer to a memory location of type).15 F F1 -.37(re)2.698 G
(cno_t).37 E F0 2.698(,a).68 G(s)536.11 252 Q .505(de\214ned in the <db)108 264
R .506(.h> include \214le.)-.4 F .506(This type is normally the lar)5.506 F
.506(gest unsigned inte)-.18 F .506(gral type a)-.15 F -.25(va)-.2 G .506
(ilable to the).25 F 2.5(implementation. The)108 276 R F1(size)2.5 E F0
(\214eld of the k)2.5 E .3 -.15(ey s)-.1 H(hould be the size of that type.).15
E .706(Because there can be no meta-data associated with the underlying recno \
access method \214les, an)108 292.8 R 3.206(yc)-.15 G(hanges)512.23 292.8 Q
1.262(made to the def)108 304.8 R 1.262(ault v)-.1 F 1.262(alues \(e.g. \214x)
-.25 F 1.263(ed record length or byte separator v)-.15 F 1.263
(alue\) must be e)-.25 F 1.263(xplicitly speci\214ed)-.15 F
(each time the \214le is opened.)108 316.8 Q .065(In the interf)108 333.6 R
.065(ace speci\214ed by)-.1 F F1(dbopen)2.564 E F0 2.564(,u).24 G .064
(sing the)261.548 333.6 R F1(put)2.564 E F0(interf)2.564 E .064
(ace to create a ne)-.1 F 2.564(wr)-.25 G .064
(ecord will cause the creation of)414.44 333.6 R .755(multiple, empty records \
if the record number is more than one greater than the lar)108 345.6 R .755
(gest record currently in)-.18 F(the database.)108 357.6 Q/F2 9/Times-Bold@0 SF
(ERR)72 374.4 Q(ORS)-.27 E F0(The)108 386.4 Q F1 -.37(re)2.922 G(cno).37 E F0
.421(access method routines may f)2.921 F .421(ail and set)-.1 F F1(errno)2.921
E F0 .421(for an)2.921 F 2.921(yo)-.15 G 2.921(ft)377.933 386.4 S .421
(he errors speci\214ed for the library rou-)386.964 386.4 R(tine)108 398.4 Q F1
(dbopen)2.5 E F0(\(3\) or the follo).24 E(wing:)-.25 E([EINV)108 415.2 Q(AL])
-1.35 E(An attempt w)144 427.2 Q(as made to add a record to a \214x)-.1 E
(ed-length database that w)-.15 E(as too lar)-.1 E(ge to \214t.)-.18 E F2
(SEE ALSO)72 444 Q F1(btr)108 456 Q(ee)-.37 E F0(\(3\)).18 E F1(dbopen)2.5 E F0
(\(3\),).24 E F1(hash)2.5 E F0(\(3\),).28 E F1(mpool)2.5 E F0(\(3\),).51 E F1
2.754(Document Pr)108 480 R 2.754(ocessing in a Relational Database System)-.45
F F0 5.255(,M).32 G 2.755(ichael Stonebrak)362.13 480 R(er)-.1 E 5.255(,H)-.4 G
2.755(eidi Stettner)454.06 480 R 5.255(,J)-.4 G(oseph)516.67 480 Q
(Kalash, Antonin Guttman, Nadene L)108 492 Q
(ynn, Memorandum No. UCB/ERL M82/32, May 1982.)-.55 E F2 -.09(BU)72 508.8 S(GS)
.09 E F0(Only big and little endian byte order is supported.)108 520.8 Q
(4.4 Berk)72 732 Q(ele)-.1 E 2.5(yD)-.15 G(istrib)132.57 732 Q 96.815
(ution August)-.2 F(18, 1994)2.5 E(2)535 732 Q EP
%%Trailer
end
%%EOF