1 .\" Copyright (c) 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)recno.3 8.5 (Berkeley) 8/18/94
34 .\" Japanese Version Copyright (c) 1999 Shouichi Saito
35 .\" all rights reserved.
36 .\" Translated Mon Jul 26 12:18:39 JST 1999
37 .\" by Shouichi Saito <ss236rx@ymg.urban.ne.jp>
38 .\" Proofed Tue Aug 19 1999 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
40 .\"WORD: access method アクセスメソッド
41 .\"WORD: pad character 埋め文字
42 .TH RECNO 3 1994-08-18 "" "Linux Programmer's Manual"
45 .\"O recno \- record number database access method
46 recno \- レコード番号データベースへのアクセスメソッド
50 #include <sys/types.h>
57 .\"O is the library interface to database files.
60 はデータベースファイルに対するライブラリインターフェースである。
61 .\"O One of the supported file formats is record number files.
62 .\"O The general description of the database access methods is in
64 .\"O this manual page describes only the recno specific information.
65 サポートされているファイルフォーマットの一つに、
66 レコード番号ファイル (record number file: recno file) がある。
67 データベースへのアクセスメソッドに関する一般的な記述は
70 このマニュアルページでは recno 特有の情報についてのみ記述する。
72 .\"O The record number data structure is either variable or fixed-length
73 .\"O records stored in a flat-file format, accessed by the logical record
75 レコード番号データ構造は、フラットなファイル形式に格納された
76 可変長/固定長レコードからなり、論理レコード番号でアクセスされる。
77 .\"O The existence of record number five implies the existence of records
78 .\"O one through four, and the deletion of record number one causes
79 .\"O record number five to be renumbered to record number four, as well
80 .\"O as the cursor, if positioned after record number one, to shift down
82 レコード番号 5 があれば、レコード番号 1 から 4 も存在する。
83 レコード番号 1 を削除すると、レコード番号 5 は 4 に付け替えられ、
84 カーソルも移動する。レコード番号 1 以降のものは一つ繰り上がるわけである。
86 .\"O The recno access method specific data structure provided to
88 .\"O is defined in the
90 .\"O include file as follows:
92 で使う recno アクセスメソッドに特有のデータ構造体は、
94 インクルードファイルで次のように定義されている。
100 unsigned int cachesize;
110 .\"O The elements of this structure are defined as follows:
114 .\"O The flag value is specified by ORing
115 .\"O any of the following values:
116 flag の値は以下の値の論理和で指定される。
120 .\"O The records are fixed-length, not byte delimited.
121 レコード長が固定であり、バイト区切りではない。
122 .\"O The structure element
124 .\"O specifies the length of the record, and the structure element
126 .\"O is used as the pad character.
131 は埋め文字 (pad character) を指定する。
132 .\"O Any records, inserted into the database, that are less than
134 .\"O bytes long are automatically padded.
137 バイトに満たないものでは、残りの部分に埋め文字が自動的に入る。
140 .\"O In the interface specified by
142 .\"O the sequential record retrieval fills in both the caller's key and
143 .\"O data structures.
145 で指定されたインターフェイスでは、シーケンシャルなレコード取得は
146 呼び出しキーとデータ構造体の両方を埋めていく。
149 .\"O flag is specified, the
151 .\"O routines are not required to fill in the key structure.
152 .\"O This permits applications to retrieve records at the end of files without
153 .\"O reading all of the intervening records.
155 フラグが指定されていると、キー構造体を埋めるのに
158 これを用いれば、アプリケーションがファイルの終りの方を取得する際に、
159 その途中のレコードを読まなくても済む事になる。
162 .\"O This flag requires that a snapshot of the file be taken when
164 .\"O is called, instead of permitting any unmodified records to be read from
165 .\"O the original file.
169 オリジナルファイルから変更されていないレコードを読む代わりに、
174 .\"O A suggested maximum size, in bytes, of the memory cache.
177 .\"O advisory, and the access method will allocate more memory rather than fail.
180 .\"O is 0 (no size is specified) a default cache is used.
181 想定されるメモリキャッシュの最大サイズ (バイト単位)。
184 参考であり、アクセスメソッドはこの値を越えたメモリの
187 が 0 (あるいは指定されていない) の場合、デフォルトのキャッシュが使われる。
190 .\"O The recno access method stores the in-memory copies of its records
192 .\"O This value is the size (in bytes) of the pages used for nodes in that tree.
193 recno アクセスメソッドは、自身のレコードのコピーをメモリ内部に
195 この値は、その btree 中のノードに対して用いられる
199 .\"O is 0 (no page size is specified) a page size is chosen based on the
200 .\"O underlying file system I/O block size.
203 .\"O for more information.
205 が 0 (あるいは指定されていない) の場合、
206 ファイルシステムの I/O ブロックサイズを基にして
213 .\"O The byte order for integers in the stored database metadata.
214 .\"O The number should represent the order as an integer; for example,
215 .\"O big endian order would be the number 4,321.
218 .\"O is 0 (no order is specified) the current host order is used.
219 データベースに格納されているメタデータの整数値のバイトオーダー。
220 この数字は、順序を整数で表したものである。
221 例えばビッグエンディアンなら、この数値は 4,321 となる。
223 が 0 (指定されていない) の場合、現在のホスト
227 .\"O The length of a fixed-length record.
231 .\"O The delimiting byte to be used to mark the end of a record for
232 .\"O variable-length records, and the pad character for fixed-length
235 レコードの終りを示す区切りバイト (区切り文字) である。
236 固定レコード長では埋め文字として使われる。
237 .\"O If no value is specified, newlines ("\en") are used to mark the end
238 .\"O of variable-length records and fixed-length records are padded with
241 可変レコード長のレコードの終りには改行 ("\en") が使われる。
242 固定レコード長のレコードは空白 (space) で埋められる。
245 .\"O The recno access method stores the in-memory copies of its records
249 .\"O is non-NULL, it specifies the name of the btree file,
250 .\"O as if specified as the filename for a
252 .\"O of a btree file.
254 自身のレコードのコピーをメモリ内部で btree に保存している。
256 が NULL でない場合、これは btree ファイル名
259 する時に指定するファイル名) を指定する。
261 .\"O The data part of the key/data pair used by the
264 .\"O is the same as other access methods.
266 アクセスメソッドで使われるキー/データ対のデータ部分は、
268 .\"O The key is different.
271 .\"O field of the key should be a pointer to a memory location of type
273 .\"O as defined in the
281 型の、メモリ位置へのポインタでなければならない。
286 .\"O This type is normally the largest unsigned integral type available to
287 .\"O the implementation.
288 この型は通常、その実装で利用可能な最大の符号無し整数である。
291 .\"O field of the key should be the size of that type.
296 .\"O Because there can be no metadata associated with the underlying
297 .\"O recno access method files, any changes made to the default values
298 .\"O (e.g., fixed record length or byte separator value) must be explicitly
299 .\"O specified each time the file is opened.
300 recno アクセスメソッドのファイルに関連づけられる
302 デフォルト値 (固定レコード長やセパレータ文字など)
303 に対する変更はファイルを開く毎に明示的に指定しなければならない。
305 .\"O In the interface specified by
309 .\"O interface to create a new record will cause the creation of multiple,
310 .\"O empty records if the record number is more than one greater than the
311 .\"O largest record currently in the database.
315 インターフェイスを使って新しいレコードを作成するときに、
316 指定したレコード番号がデータベース中に存在している最大レコード番号より
322 .\"O access method routines may fail and set
324 .\"O for any of the errors specified for the library routine
326 .\"O or the following:
337 .\"O An attempt was made to add a record to a fixed-length database that
338 .\"O was too large to fit.
339 固定長データベースにレコードを追加するとき、データが長すぎた。
341 .\"O Only big and little endian byte order is supported.
342 バイトオーダーとしてはビッグエンディアンとリトルエンディアンのみが
350 .IR "Document Processing in a Relational Database System" ,
351 Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman,
352 Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982.