JPH06348760A - Method for generation of key to store text in database - Google Patents
Method for generation of key to store text in databaseInfo
- Publication number
- JPH06348760A JPH06348760A JP5266652A JP26665293A JPH06348760A JP H06348760 A JPH06348760 A JP H06348760A JP 5266652 A JP5266652 A JP 5266652A JP 26665293 A JP26665293 A JP 26665293A JP H06348760 A JPH06348760 A JP H06348760A
- Authority
- JP
- Japan
- Prior art keywords
- key
- text
- database
- index
- unique
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 27
- 125000004122 cyclic group Chemical group 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 6
- 206010009944 Colon cancer Diseases 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明はデータ処理システム、更
に具体的にはデータ・ベースにおいて情報にアクセスす
るための一意的キーの生成に関するFIELD OF THE INVENTION This invention relates to data processing systems, and more particularly to generating unique keys for accessing information in a database.
【0002】[0002]
【従来の技術】多くのアプリケーションが、データ・ベ
ースに挿入される記録に関連する一意的識別子(ID)
または一意的キーに対する必要性を持っている。現代の
技術は貯蔵される記録に緩く関連された情報のストリン
グの縦続から一意的キーが作成されうることを教示して
いる。例えば、一意的キーは日付、時刻、ドメイン名、
ユーザ名、ライブラリ名等の縦続から成るものとして生
成されている。このような縦続は一意的キーを生成する
のに成功しているが、その手順には、非常に大きなキー
を作り出すのでシステムの貯蔵装置および処理の要件を
増大するという不利がある。BACKGROUND OF THE INVENTION Many applications have a unique identifier (ID) associated with a record that is inserted into a database.
Or you have a need for unique keys. Modern technology teaches that a unique key can be created from a cascade of strings of information loosely related to the records stored. For example, the unique key is date, time, domain name,
It is generated as a series of user names and library names. While such cascades have been successful in generating unique keys, the procedure has the disadvantage of creating very large keys, thus increasing the storage and processing requirements of the system.
【0003】現代の技術に伴うもう一つの問題、特に一
意的キーがデータ・ベース中の記録をインデックスする
ために用いられる場合における問題は、記録中のテキス
トと一意的キーとの間に自然な関係または直接的関係が
欠如していることである。テキストとキーとの間の直接
的関係の欠如はデータ・ベースに重複した記録の存在を
もたらし、これは特定の記録に対する貯蔵及び検索時間
を増大させる。Another problem with modern technology, especially when unique keys are used to index records in a database, is the natural problem between the text in the record and the unique key. Lack of relationships or direct relationships. The lack of direct relationship between text and keys results in the presence of duplicate records in the database, which increases storage and retrieval time for a particular record.
【0004】従来の方法は、検査多項式(循環冗長検査
CRC16)をハッシング(Hashing)発生器として利用
して、記録に対するディスク・ファイル・アドレスを与
えるための記録に付属するキーの長さを低減している。
この方法はハッシング発生器を用いて、その他のハッシ
ング手順に付随する長い同義語の連なりを低減してい
る。順次の数字キーが作られ、これはデータを貯蔵した
り取り出したりすのに要する時間の低減をもたらした。
各記録は3乃至24バイトの長さの一意的数字データ・
キーを含んでいる。このデータ・キーはハッシング発生
器を用いてもとの3ないし24バイト長から2バイトの
インデックスに圧縮される。この手法は同義語と呼ばれ
る重複記入事項を可能な限り生じることなくインデック
ス・テーブルを作成することを指向している。2バイト
のインデックスが用いられるが、これは64K個の記入
事項についてのインデックス・テーブルを必要とする。
記録を貯蔵するときにインデックスが空であるならば、
その記録はストリングの最初の記録となり、その記録の
ディスク・アドレスがインデックス・テーブルに入れら
れる。インデックスの記入が空でないならば、ストリン
グの各記録は、誤りとなる重複キーの有無について調べ
られる。重複キーが見つからなければその記録は貯蔵さ
れ、同義語ストリング・ポインタが更新される。記録を
読みとるときにインデックス記入が空であるならば、記
録は存在しない。インデックス記入が空でなければ、ス
トリング中の各記録が読みとられて検索キーが比較され
る。もし同一のキーが見つかると、その記録の所在が突
き止められ、そうでなければその記録は存在しない。The conventional method utilizes a check polynomial (Cyclic Redundancy Check CRC16) as a Hashing generator to reduce the length of the keys attached to the record to provide the disk file address for the record. ing.
This method uses a hashing generator to reduce the long synonym sequences associated with other hashing procedures. Sequential numeric keys were created, which provided a reduction in the time required to store and retrieve data.
Each record has a unique numeric data length of 3 to 24 bytes.
Contains the key. The data key is compressed using a hashing generator from an original length of 3 to 24 bytes to a 2-byte index. This approach is aimed at creating an index table with as few duplicate entries as possible called synonyms. A 2-byte index is used, which requires an index table for 64K entries.
If the index is empty when storing a record,
That record becomes the first record of the string and the disc address of that record is placed in the index table. If the index entry is not empty, each record in the string is examined for erroneous duplicate keys. If no duplicate key is found, the record is saved and the synonym string pointer is updated. If the index entry is empty when reading the record, then the record does not exist. If the index entry is not empty, each record in the string is read and the search keys are compared. If the same key is found, the record is located, otherwise the record does not exist.
【0005】上述の解決法はデータ・キーについて循環
冗長検査生成器を使用して順次番号のキーを生成し、こ
の結果データ・ベースに記録を貯蔵したりこれから取り
出したりするのに要する時間を低減していた。しかしな
がら、この解決法は依然従来技術の病弊、つまりインデ
ックス素子がテキストに対し自然なまたは直接的な関係
を持っていないと言う問題を抱えている。その理由は、
この解決法が3ないし24バイトな一意的データ・キー
から出発して2バイトのインデックス・キーを生じるた
めにCRC発生器にかけるからである。もとのデータ・
キーはテキストに対し直接的関係を持っておらず、従っ
て同様にCRCインデックスも直接的関係を持たないこ
とになる。更に、この解決手法は重複データの貯蔵を排
除せず、従って一意的キーが与えられないときには動作
不能となる。The above solution uses a cyclic redundancy check generator on the data keys to generate sequentially numbered keys, thus reducing the time required to store and retrieve records from the database. Was. However, this solution still suffers from the drawback of the prior art, namely that the index element has no natural or direct relationship to the text. The reason is,
This solution starts with a unique data key of 3 to 24 bytes and applies it to the CRC generator to produce a 2-byte index key. Original data
The key has no direct relationship to the text, and so does the CRC index as well. Moreover, this solution does not eliminate the storage of duplicate data and thus becomes inoperable when a unique key is not provided.
【0006】この結果、データ・ベース中の重複したテ
キスト記入事項を排除できるように、データ・ベースに
貯蔵されんとするテキストに対し直接的関係を有する一
意的キーを生成する手順を与える手法が必要とされてい
る。As a result, there is a technique for providing a procedure for generating a unique key that has a direct relationship to the text to be stored in the database so that duplicate text entries in the database can be eliminated. is necessary.
【0007】[0007]
【発明が解決しようとする課題】本発明はデータ・ベー
スに貯蔵されようとするテキストに直接的に関連する一
意的な識別子を生成するための方法及び装置に関する。SUMMARY OF THE INVENTION The present invention is directed to a method and apparatus for generating a unique identifier that is directly associated with text to be stored in a database.
【0008】[0008]
【課題を解決するための手段】「殆ど一意的な」キーは
テキスト・フィールドから直接に導き出される。このキ
ーはテキストを循環冗長検査生成器に直接入力する事に
よって生成される。この生成器はテキストに基づき4バ
イトのCRC番号を発生する。この4バイトのCRC番
号はシーケンス・カウンタの内容と縦続されてテキスト
を貯蔵したり取り出したりするためにデータ・ベースに
入れられるインデックス中でキーとして用いられる。生
成されたキーが真に一意的であることを保証するため
に、重複キーが存在するか否かについて検査が行われ
る。重複キーが見い出されると、新たに生成されたキー
に対するテキストがデータ・ベース中に既に貯蔵されて
いるテキストと比較される。このテキスト・ストリング
が互いに等しくないならばCRC番号と共にインデック
ス中に貯蔵され、初期値1であるシーケンス・カウンタ
が増分され、一意的なキーが見つかるかまたはデータ・
ベース中にそのテキストが見つかるまで、新しいキーが
生成される。The "almost unique" key is derived directly from the text field. This key is generated by entering the text directly into the Cyclic Redundancy Check Generator. This generator generates a 4-byte CRC number based on the text. This 4-byte CRC number is cascaded with the contents of the sequence counter and is used as a key in an index placed in the database for storing and retrieving text. To ensure that the generated keys are truly unique, a check is made as to whether duplicate keys exist. When a duplicate key is found, the text for the newly generated key is compared to the text already stored in the database. If this text string is not equal to each other then it is stored in the index along with the CRC number and the initial value of 1 the sequence counter is incremented to find the unique key or the data
New keys are generated until the text is found in the base.
【0009】[0009]
【実施例】図中特に図1を参照すると、そこには本発明
の方法及び装置を実施するのに用いられ得るデータ処理
システム10の絵が描かれている。データ処理システム
10はプロセッサ12(内部の中央処理装置、読み出し
専用メモリ、ランダム・アクセス・メモリ、等の図示し
ないが当業者によく知られたものを含む)、当業者に周
知の態様でこれに接続されたキーボード14およびディ
スプレイ・モニタ16を含んでいる。1 is a pictorial representation of a data processing system 10 that may be used to implement the method and apparatus of the present invention. The data processing system 10 includes a processor 12 (including an internal central processing unit, read only memory, random access memory, etc., not shown but well known to those skilled in the art), in a manner well known to those skilled in the art. It includes a connected keyboard 14 and display monitor 16.
【0010】プロセッサ12は、アプリケーション・プ
ログラム、データまたはその他のソフトウエアを内蔵す
るディスケット13等の取り外し可能な貯蔵媒体を受け
入れるようになっている。データ処理システム10が、
パーソナル・コンピュータまたはホスト・コンピュータ
に結合されたワークステーション等の任意の適当なコン
ピュータを用いて構成されうることは当業者にとって自
明であろう。本発明の方法及び装置を実施するのに用い
られ得るデータ処理システムの1例はIBM社によって
製造されているIBMパーソナル・システム/2(PS
/2)である。The processor 12 is adapted to receive a removable storage medium such as a diskette 13 containing application programs, data or other software. The data processing system 10
It will be apparent to those skilled in the art that it can be configured using any suitable computer such as a personal computer or a workstation coupled to a host computer. One example of a data processing system that may be used to implement the method and apparatus of the present invention is the IBM Personal System / 2 (PS) manufactured by IBM Corporation.
/ 2).
【0011】次に図2を参照すると、一意的識別子を生
成するための従来技術の手法が示されている。多くのア
プリケーションが、データ・ベースに挿入される記録に
付随する一意的な識別子についての必要性を持ってい
る。このキーはデータ・ベースに記録を貯蔵しかつここ
から記録を取り出すためのインデックスとして用いられ
る。Referring now to FIG. 2, a prior art approach to generating a unique identifier is shown. Many applications have a need for unique identifiers associated with records inserted into the database. This key is used as an index to store and retrieve records from the database.
【0012】図2を具体的に参照すると、一意的キーを
生成するための従来技法は関係する情報を縦続すること
によって行われる。例えば、記録/テキスト50の所在
を突き止めるために日付42、時刻44、ドメイン名4
6、およびユーザ名48が縦続されうる。当業者にとっ
て理解されように、このような縦続は長い一意的キーを
生成することが多く、この結果システム貯蔵装置および
処理上の必要要件を増大させる。更に、生成されたキー
は、記録をデータ・ベースに挿入するアプリケーション
を指名する際に存在するもう1つの問題、即ちインデッ
クス素子がテキストに対して自然な関係または直接的な
関係を持っていないと言う問題を不問にしている。従っ
て、データ・ベースに重複したテキスト項目を生じると
いう問題があり、これは所要の貯蔵装置容量を増大さ
せ、キャッシュ・メモリが当たる確率を低減し、検索時
間を増大させる。本発明の装置及び方法はこれら問題の
すべてに直接取り組んでこれらを取り除くものである。With specific reference to FIG. 2, the conventional technique for generating a unique key is performed by cascading related information. For example, date 42, time 44, domain name 4 to locate record / text 50
6, and the username 48 can be cascaded. As will be appreciated by those skilled in the art, such cascading often produces long unique keys, which increases system storage and processing requirements. In addition, the generated key is another problem that exists in nominating the application that inserts the record into the database, namely that the index element has no natural or direct relationship to the text. The question to say is unquestioned. Therefore, there is the problem of creating duplicate text items in the database, which increases the storage capacity required, reduces the probability of hitting cache memory, and increases search time. The device and method of the present invention directly addresses and eliminates all of these problems.
【0013】本発明は、データ・ベースに貯蔵しようと
するテキスト・ストリングをCRC番号またはコード生
成のため循環冗長検査生成器(CRC)に直接入力す
る。本発明がどのように実施されるかを示す概念的図解
が図3に示される。テキスト・ストリング52(データ
・ベースに貯蔵されようとするテキストより成る)はC
RC発生器54に入力され、これがCRC番号56を発
生する。この新たに発生されたCRC番号またはコード
56はシーケンス・カウンタの内容と縦続されテキスト
・ストリング52をデータ・ベースに貯蔵するためのイ
ンデックスとして使用される。The present invention inputs a text string to be stored in a database directly into a cyclic redundancy check generator (CRC) for CRC number or code generation. A conceptual illustration showing how the invention may be implemented is shown in FIG. The text string 52 (comprising the text to be stored in the database) is C
Input to RC generator 54, which produces CRC number 56. This newly generated CRC number or code 56 is cascaded with the contents of the sequence counter and is used as an index to store the text string 52 in the database.
【0014】4バイトCRCの発生は、2バイトCRC
に比べて非類似なテキスト・ストリングについて類似の
CRCを生じない可能性を増大させることが当業者に認
識されるであろう。また、4バイトは40億個の一意的
組み合わせを表すことができるのに対して2バイトは6
4000個の組み合わせを表すことができるに過ぎない
ことも当業者にとって認識されるであろう。従って、大
きなCRCは非類似テキスト・ストリングに類似のCR
Cを生じる可能性を低減する。任意の新しいCRCが異
なる値の既存のストリングと重複しない可能性はデータ
・ベースの大きさに依存する。例えば、100万個の記
入事項を有するデータ・ベースの場合、4バイトCRC
インデックスを使用すると、新たな一意的ストリングが
データ・ベースに既に存在するキーを生じる確率は42
94分の1となる。可能性は低いけれども2つの異なる
ストリングが同一のキーを生成する可能性が依然存在す
るので、これが生じたことを検出する措置がとられなけ
ればならない。データ・ベースの設計者は特定のアプリ
ケーションにおける必要性に基づいてインデックスのサ
イズを選択し、必要に応じてインデックス・サイズを増
減する事ができることは明らかである。4-byte CRC is generated by 2-byte CRC
It will be appreciated by those skilled in the art that it increases the likelihood of not producing a similar CRC for dissimilar text strings compared to. Also, 4 bytes can represent 4 billion unique combinations, while 2 bytes are 6
It will also be appreciated by those skilled in the art that only 4000 combinations can be represented. Therefore, a large CRC is a CR similar to a dissimilar text string.
Reduce the likelihood of producing C. The likelihood that any new CRC will not overlap with existing strings of different values depends on the size of the database. For example, for a database with 1 million entries, a 4-byte CRC
Using an index, the probability that a new unique string will yield a key that already exists in the database is 42.
It is 1/94. Since it is unlikely, but there is still the possibility that two different strings will generate the same key, steps must be taken to detect when this has occurred. Obviously, the data base designer can choose the size of the index based on the needs of the particular application and increase or decrease the index size as needed.
【0015】図4を参照すると、そこには本発明を用い
てテキストをデータ・ベースに貯蔵する手法が概念的な
ブロック・ダイアグラムで示されている。アプリケーシ
ョンCPU(中央処理装置)60は特定のデータ処理活
動(例えば、給与計算アプリケーション、エアライン予
約、ネットワーク・アプリケーション)を行うプログラ
ムを実行する能力を有する。データ・ベースCPU64
はアプリケーションCPU60に接続されてデータ・ベ
ース貯蔵装置66にテキストを貯蔵しまたこれからテキ
ストを取り出すために用いられる。CRC発生器62は
アプリケーションCPU60に接続され、CRC番号を
発生し、これがシーケンス番号と縦続されてデータ・ベ
ース貯蔵装置66からテキストを取り出すためのインデ
ックス中のキーとして用いられる。当業者にとって、別
々のCPUで遂行される機能が組み合わされて単一のC
PUに置かれても良いことは明らかであろう。Referring to FIG. 4, there is shown a conceptual block diagram of a technique for storing text in a database using the present invention. Application CPU (Central Processing Unit) 60 has the ability to execute programs that perform specific data processing activities (eg, payroll applications, airline reservations, network applications). Data base CPU 64
Is connected to the application CPU 60 and is used to store and retrieve text from a database store 66. The CRC generator 62 is connected to the application CPU 60 and generates a CRC number, which is cascaded with the sequence number and is used as a key in the index to retrieve the text from the database store 66. For those skilled in the art, the functions performed by different CPUs may be combined to create a single C
It will be clear that it may be placed in the PU.
【0016】本発明はキーを生成するためにデータ・ベ
ースに貯蔵されようとする項目の内容値またはテキスト
値を用いる。データ項目に対するキーまたはインデック
スはデータ項目全体の複合体として作られるので一意的
キー(複合によりそのキーを生じたデータに対するも
の)が生成される。このキーはデータ・ベース中に重複
データが存在するか否かを迅速に調べるために使用され
る。この概念の小規模な例が票Aに示される。The present invention uses the content or text value of the item to be stored in the database to generate the key. The key or index for a data item is created as a composite of the entire data item so that a unique key (for the data that produced the key by the composite) is generated. This key is used to quickly check for duplicate data in the database. A small example of this concept is shown in vote A.
【0017】 表 A CRC データ・ベース中の項目のテキスト X’0F3B’ 'Austin is the capital of Texas.' X’22E5’ 'Go ahead...Make my day.' X’64AA’ 'Austin is the capital of Tejas.' X’6CC7’ 'Now is the time for all good men to come together.' 表Aに示されたように、各データ記録からのテキストは
2バイトの16進数に畳み込まれる。2バイト16進数
は当業者に良く知られた方法でCRC数56を発生する
ためデータ記録52(図3)をCRC発生器54に直接
入力することによって発生される。この2バイトの16
進数はシーケンス・カウンタの内容と縦続されてデータ
・ベースに記録を貯蔵しまたはこれから記録を取り出す
ためのインデックス中のキーとして用いられる。さて、
例えば新しいテキスト・ストリング('Now is the firs
t day of the rest of your life.'がデータ・ベースに
貯蔵するために与えられたとすると、この手順がとられ
ることになる。先ずテキスト・ストリング52に基づき
CRC数56を発生するためにテキスト・ストリング5
2(図3)がCRC発生器54に入力される。テキスト
・ストリング’Nowis the first day of the rest of y
our life.'に対しCRC数はX’8A54’である。デ
ータは、キーが一意的であるという条件のもとで、CR
C数及びシーケンス番号によりソートされてデータ・ベ
ースに貯蔵されるものとして、データ・ベースは定義さ
れている。この定義を用いてデータ・ベースに記録を貯
蔵するならば、条件が達成されることを保証するための
検査が自動的に行われることが当業者に理解できるであ
ろう。従って、一致があるか否かを調べるために、表A
に示された縦続キーのCRC数に対して単純な2進検索
が行われる。2バイト16進数(X’8A54’)はデ
ータ・ベース中に重複記入事項が存在するか否かを調べ
るために他のインデックス記入事項と比較される。比較
のためにキー・フィールドを用いることにより一致比較
されるデータのサイズが最小にされ、これによりCPU
の消費およびメモリ使用が低減される。これに加え、こ
の手順はキャッシュの有効性を増大しかつ強化する。Table A Text of Items in CRC Database X'0F3B '' Austin is the capital of Texas. 'X'22E5''Go ahead ... Make my day.'X'64AA'' Austin is the capital of Tejas. 'X'6CC7''Now is the time for all good men to come together.' As shown in Table A, the text from each data record is folded into a 2-byte hexadecimal number. The 2-byte hexadecimal number is generated by inputting data record 52 (FIG. 3) directly to CRC generator 54 to generate CRC number 56 in a manner well known to those skilled in the art. 16 of these 2 bytes
The radix is cascaded with the contents of the sequence counter and is used as a key in the index to store or retrieve records from the database. Now,
For example, a new text string ('Now is the firs
Given that t day of the rest of your life. 'was given for storage in the database, this procedure would be taken. First, the text string 5 is generated to generate the CRC number 56 based on the text string 52.
2 (FIG. 3) is input to the CRC generator 54. Text string'Nowis the first day of the rest of y
The CRC number for our life. 'is X'8A54'. The data is CR, provided the key is unique.
The database is defined as being sorted by C number and sequence number and stored in the database. It will be understood by those skilled in the art that if records are stored in the database using this definition, the checks will automatically be made to ensure that the conditions are met. Therefore, to see if there is a match, see Table A.
A simple binary search is performed on the CRC number of the cascade key shown in. The 2-byte hexadecimal number (X'8A54 ') is compared to other index entries to see if there are duplicate entries in the database. The use of key fields for comparison minimizes the size of the data that is matched and compared, which allows the CPU
Consumption and memory usage are reduced. In addition to this, this procedure increases and enhances the effectiveness of the cache.
【0018】2バイト16進数を発生するための上述の
解説は、説明を簡単かつ明瞭にするために取り上げられ
たものであるが、これは本発明の好適な実施例である4
バイトCRCインデックス・キーを発生するためにも容
易に拡張可能であることは当業者に自明であろう。更
に、本発明は初期インデックス・キーを生成するために
CRC発生器を使用することに限定されるものでないこ
とも当業者にとって自明であろう。ある範囲にわたって
数を生成しかつ同じ入力テキスト・ストリングに対して
同じ数を常に生成するようなものであるならば任意の方
法または手順が本発明に適用可能である。The above discussion for generating a 2-byte hexadecimal number is taken for simplicity and clarity of description, which is the preferred embodiment of the present invention.
It will be apparent to those skilled in the art that it can be easily extended to generate a byte CRC index key. Further, it will be apparent to those skilled in the art that the present invention is not limited to using a CRC generator to generate the initial index key. Any method or procedure is applicable to the present invention as long as it produces numbers over a range and always produces the same number for the same input text string.
【0019】図5には本発明に従ってキーを生成する循
環冗長検査生成器を用いた一意的キーを生成するための
フローダイアアグラムが示されている。この手順はブロ
ック70で開始し、ブロック72に進みここでテキスト
・ストリングをCRC発生器に入力することにより殆ど
一意的なキーが生成される。ブロック74において、C
RC発生器により発生された殆ど一意的なキーにシーケ
ンス・カウンタが割り当てられる。シーケンス・カウン
タはブロック76で1づつ増分され、このシーケンス・
カウンタの内容をこの殆ど一意的なキーに縦続させるこ
とにより一意的キーが作られる。ブロック78におい
て、この一意的キーをインデックスに貯蔵し、テキスト
・ストリングをデータ・ベースに貯蔵する試みがなされ
る。ブロック80において、一意的キーの貯蔵の試みが
成功であったか否かが調べられる。イエスならばこのフ
ローはブロック84で終了する。ノーであるならブロッ
ク82においてデータ・ベース中のテキスト・ストリン
グが挿入しようと試みているテキスト・ストリングに一
致するか否かが調べられる。イエスならばテキスト・ス
トリングは重複しており、フローはブロック84で終了
して重複したテキストの貯蔵が回避される。ノーならば
フローはブロック76に戻ってシーケンス・カウンタが
1だけ増分され、キーとテキストとの一致が見い出され
るかまたは一意的なキーおよびテキストがデータ・ベー
スに貯蔵されるまで上記手順が繰り返される。本発明が
固定長および可変長のテキスト・ストリングを含むいか
なる長さのテキスト・ストリングに対しても一意的キー
を生成する能力を有することが当業者に理解されるであ
ろう。FIG. 5 shows a flow diagram for generating a unique key using the cyclic redundancy check generator for generating a key according to the present invention. The procedure begins at block 70 and proceeds to block 72 where a nearly unique key is generated by inputting a text string into the CRC generator. At block 74, C
A sequence counter is assigned to the almost unique key generated by the RC generator. The sequence counter is incremented by 1 at block 76 to
A unique key is created by cascading the contents of the counter to this almost unique key. At block 78, an attempt is made to store this unique key in the index and the text string in the database. At block 80, it is checked if the attempt to store the unique key was successful. If yes, the flow ends at block 84. If no, block 82 checks to see if the text string in the database matches the text string that is trying to be inserted. If yes, the text strings are duplicates and the flow ends at block 84 to avoid storing duplicate texts. If no, flow returns to block 76 where the sequence counter is incremented by one and the above procedure is repeated until either a key-text match is found or a unique key-text is stored in the database. . It will be appreciated by those skilled in the art that the present invention has the ability to generate unique keys for text strings of any length, including fixed and variable length text strings.
【0020】要約すると、本発明はデータ・ベースに貯
蔵される記録に対するインデックスとして使用されうる
一意的なキーを生成するための方法及び装置を提供す
る。一層重要なことはキーとインデックスが貯蔵される
記録と自然なまたは直接的な関係を有することである。
本発明はCRC数を発生するためにCRC発生器を使用
し、このCRC数がシーケンス・カウンタの内容と縦続
されてデータ・ベースに貯蔵されんとするテキスト・ス
トリングに基づいた一意的キーを生成する。本発明を用
いてキーを生成することにより、データ・ベース中のテ
キストの一意性を調べるためにキーを使用することがで
きるようになる。本発明で生成されたキーはあらゆる条
件のもとで一意的であるとは限らないが本発明はシーケ
ンス・カウンタを備えることにより真に一意的なキーを
達成する。このシーケンス・カウンタは通常1である。
テキスト・ストリングから発生されたCRC数がデータ
・ベースに既に貯蔵されているCRC数と等しいことが
見い出されるときに、シーケンス・カウンタは真に一意
的なキーを生成するために用いられる。これは次のよう
にして行われる。先ず、新たに生成されたキーをインデ
ックス中に既に貯蔵されているキーと比較することによ
り新たに生成されたキーが事実重複であるか否かを調べ
る検査が行われる。新たに生成されたキーがインデック
ス中に既に貯蔵されているキーと等しいならばそれが同
一のテキスト・ストリングからもたらされたものである
か否かの検査がなされる。テキスト・ストリングが同一
でないならば、シーケンス・カウンタが増分され新しい
シーケンス番号を用いてデータ・ベースの検査が繰り返
される。本発明は非一意的なテキスト・ストリングがC
RCキー比較に基づいて容易にインデックスされるデー
タを持つことを可能にする。ユーザにとっての最大の利
益は重複テキスト・データの排除であり、これにより一
層効率的なアプリケーション及びデータ・ベースがもた
らされる。In summary, the present invention provides a method and apparatus for generating a unique key that can be used as an index for records stored in a database. More importantly, the keys and indexes have a natural or direct relationship with the stored records.
The present invention uses a CRC generator to generate a CRC number which is cascaded with the contents of the sequence counter to generate a unique key based on a text string which is not stored in the database. To do. Generating a key using the present invention allows the key to be used to check the uniqueness of text in a database. Although the key generated by the present invention is not unique under all conditions, the present invention achieves a truly unique key by including a sequence counter. This sequence counter is usually one.
The sequence counter is used to generate a truly unique key when the number of CRCs generated from the text string is found to be equal to the number of CRCs already stored in the database. This is done as follows. First, a check is made to see if the newly generated key is in fact a duplicate by comparing the newly generated key with the keys already stored in the index. If the newly generated key is equal to the key already stored in the index, then a check is made as to whether it came from the same text string. If the text strings are not the same, the sequence counter is incremented and the database check is repeated with the new sequence number. The present invention uses non-unique text strings as C
Allows having data that is easily indexed based on RC key comparison. The greatest benefit to the user is the elimination of duplicate text data, which results in a more efficient application and database.
【0021】[0021]
【発明の効果】本発明の効果は重複テキスト・データの
排除であり、これにより一層効率的なアプリケーション
及びデータ・ベースがもたらされる。The effect of the present invention is the elimination of duplicate text data, which results in a more efficient application and database.
【図1】本発明が実施されうるデータ処理システムの外
観図。FIG. 1 is an external view of a data processing system in which the present invention can be implemented.
【図2】従来技術において実施されていた一意的キーの
生成を示す図。FIG. 2 is a diagram showing generation of a unique key that is performed in the related art.
【図3】本発明を用いて一意的キーを生成するのに用い
られる装置の概念的ダイアグラム。FIG. 3 is a conceptual diagram of an apparatus used to generate a unique key using the present invention.
【図4】本発明を用いて一意的キーを生成しこれをデー
タ・ベースにちょぞうするための手法を示す概念的ダイ
アグラム。FIG. 4 is a conceptual diagram showing a technique for generating a unique key and selecting it in a database using the present invention.
【図5】本発明を用いて一意的キーを生成し、これを用
いてテキスト・ストリングをデータ・ベースに貯蔵する
手順を示すフロー・ダイアグラム。FIG. 5 is a flow diagram illustrating a procedure for generating a unique key using the present invention and using it to store a text string in a database.
16:ディスプレイ・モニタ 14:キーボード 16: Display monitor 14: Keyboard
フロントページの続き (72)発明者 デイル・ビ−・ストリングフェロウ・ジュ ニア アメリカ合衆国テキサス州、ノ−ス・ア− ビング、クリアスプリング・ドライブ、 2509番地Front Page Continuation (72) Inventor Dale Bee String Fellow Junia No. 2509, Clear Spring Drive, North Abing, Texas, USA
Claims (5)
トリングをアクセスするためのインデックス中に用いら
れる識別子を生成する方法において、 上記テキスト・ストリングに基づいて上記識別子を生成
するため上記テキスト・ストリングを循環冗長検査生成
器に入力するステップと、 上記識別子を上記テキスト・ストリングに関連付けるス
テップと、 上記識別子を上記テキスト・ストリングと共に貯蔵する
ステップと、 より成るデータ・ベースにテキストを貯蔵するのに用い
るキーを生成する方法。1. A method for generating an identifier used in an index for accessing a text string stored in a database, the method comprising: generating the identifier based on the text string; Inputting to the cyclic redundancy check generator; associating the identifier with the text string; storing the identifier with the text string; a key used to store the text in a database consisting of: How to generate.
記インデックスに貯蔵する前にシーケンス・フィールド
を上記識別子に加えることを含む請求項1記載の方法。2. The method of claim 1, wherein the associating step comprises adding a sequence field to the identifier before storing the identifier in the index.
トリングをアクセスするためのインデックスであってそ
の中に以前に貯蔵された複数のキーを有するインデック
ス中に用いられるキーを生成するための方法において、 上記キーを上記テキスト・ストリングの関数として与え
るステップと、 上記キーを上記インデックス中に以前に貯蔵されていた
複数のキーの各々と比較するステップと、 上記キーが以前に貯蔵されていた複数のキーの1つに等
しいとき、上記キーにシーケンス・フィールドを加える
ステップと、 より成るデータ・ベースにテキストを貯蔵するのに用い
るキーを生成する方法。3. A method for generating a key used in an index for accessing a text string stored in a database, the index having a plurality of keys previously stored therein. , Providing the key as a function of the text string, comparing the key to each of a plurality of keys previously stored in the index, and A method of generating a key used to store text in a database comprising adding a sequence field to said key when equal to one of the keys.
された以前に貯蔵されていた複数のキーの1つに関連す
る以前に貯蔵されていたテキスト・ストリングを読み出
すステップと、 与えられたキーに関連するテキスト・ストリングを上記
読み出されたテキスト・ストリングと比較して両者が同
一であるか否かを調べるステップと、 を更に含む請求項3記載の方法。4. Retrieving a previously stored text string associated with one of a plurality of previously stored keys found to be equal to the given key, and the given key 4. The method of claim 3, further comprising the step of comparing a text string associated with to the read text string to see if they are the same.
は、上記両テキスト・ストリングが同一であるとき上記
与えられたキーを棄却する事を含む請求項4記載の方
法。5. The method of claim 4, wherein the step of checking for identity includes discarding the given key when the text strings are identical.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US186893A | 1993-01-08 | 1993-01-08 | |
| US001868 | 1993-01-08 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06348760A true JPH06348760A (en) | 1994-12-22 |
Family
ID=21698194
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5266652A Pending JPH06348760A (en) | 1993-01-08 | 1993-10-25 | Method for generation of key to store text in database |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06348760A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002086761A1 (en) * | 2001-04-18 | 2002-10-31 | Satoshi Omori | Method and apparatus of recording sequencial data of biological substances |
| US8005830B2 (en) | 2007-04-04 | 2011-08-23 | Nec Corporation | Similar files management apparatus and method and program therefor |
-
1993
- 1993-10-25 JP JP5266652A patent/JPH06348760A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002086761A1 (en) * | 2001-04-18 | 2002-10-31 | Satoshi Omori | Method and apparatus of recording sequencial data of biological substances |
| US7308452B2 (en) | 2001-04-18 | 2007-12-11 | Satoshi Omori | Method and device for recording sequence information on biological compounds |
| US8005830B2 (en) | 2007-04-04 | 2011-08-23 | Nec Corporation | Similar files management apparatus and method and program therefor |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5995962A (en) | Sort system for merging database entries | |
| US7644082B2 (en) | Abbreviated index | |
| US6678687B2 (en) | Method for creating an index and method for searching an index | |
| US8266150B1 (en) | Scalable document signature search engine | |
| JP4542195B2 (en) | Database query system and method | |
| JP4848317B2 (en) | Database indexing system, method and program | |
| US7593940B2 (en) | System and method for creation, representation, and delivery of document corpus entity co-occurrence information | |
| US20070282831A1 (en) | Content data indexing and result ranking | |
| JP3263963B2 (en) | Document search method and apparatus | |
| US20160055348A1 (en) | Double key coding methods of providing fast search, analysis, and data retrieval of encrypted data without decryption | |
| US20030120647A1 (en) | Method and apparatus for indexing document content and content comparison with World Wide Web search service | |
| US10649997B2 (en) | Method, system and computer program product for performing numeric searches related to biometric information, for finding a matching biometric identifier in a biometric database | |
| Faloutsos et al. | Fast text access methods for optical and large magnetic disks: Designs and performance comparison | |
| US20080091413A1 (en) | Systems and methods for building an electronic dictionary of multi-word names and for performing fuzzy searches in the dictionary | |
| EP3844639A1 (en) | System and method for facilitating efficient indexing in a database system | |
| US20150363496A1 (en) | Methods of providing fast search, analysis, and data retrieval of encrypted data without decryption | |
| US20080215585A1 (en) | System and method for creation, representation, and delivery of document corpus entity co-occurrence information | |
| JPH09179872A (en) | Method and device for indexing data base by using finite state transducer | |
| US20070136243A1 (en) | System and method for data indexing and retrieval | |
| Li et al. | Mining the smallest association rule set for predictions | |
| US20030023584A1 (en) | Universal information base system | |
| KR20220013084A (en) | Document storage management server for performing storage processing of document files received from a client terminal in conjunction with a plurality of document storage and operating method thereof | |
| KR100818742B1 (en) | Document retrieval method using relevance of index word's location information in document | |
| Valduriez et al. | A multikey hashing scheme using predicate trees | |
| JP2001022766A (en) | Method and device for high speed processing for multidimensional database |