JPS6154519A - Elimination of double keying - Google Patents

Elimination of double keying

Info

Publication number
JPS6154519A
JPS6154519A JP59175995A JP17599584A JPS6154519A JP S6154519 A JPS6154519 A JP S6154519A JP 59175995 A JP59175995 A JP 59175995A JP 17599584 A JP17599584 A JP 17599584A JP S6154519 A JPS6154519 A JP S6154519A
Authority
JP
Japan
Prior art keywords
key
keys
duplicate
records
record
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
Application number
JP59175995A
Other languages
Japanese (ja)
Inventor
Emiko Yamazaki
恵美子 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP59175995A priority Critical patent/JPS6154519A/en
Publication of JPS6154519A publication Critical patent/JPS6154519A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

PURPOSE:To reduce the quantity of error record by noticing that the uniformity of a unique index is preserved even though one of double keys is remained, therefore only the head one of double keys is validated unlike a conventional case when all double keys are regarded as errors. CONSTITUTION:For instance, an error check processing part detects that a key ''2'' is double in rows of input order numbers 2 and 9 together with a key ''3'' double in rows of input order numbers 6 and 7 with Six1 respectively. Under such conditions, the flag of the head one of the double keys is set at ''1'' with the flag of the later key set at ''0'' respectively. These flags are stored to an error information able. Then each row of a table which is sorted again with the input order numbers is read out for check of flags in order to decide an improper record. Then an improper record is decided when the record having only a single key of flag ''0'' is detected.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベース処理システムにおけるエラーの
重複キー排除処理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a duplicate key elimination processing method for errors in a database processing system.

〔従来の技術〕[Conventional technology]

たとえば集団健康診断においては、多数の受診者に対し
てそれぞれX線検査、心電図検査、各種の生化学検査等
を独立して実施し、検査結果を一括管理する方法がとら
れる。このような場合、受診者には受付番号として連続
番号が与えられ、さらに各検査項目ごとに検査順に固有
の検査番号が与えられる。第2図はその1例を示したも
のである。
For example, in group health checkups, a method is used in which X-ray examinations, electrocardiogram examinations, various biochemical tests, etc. are independently conducted on a large number of examinees, and the test results are collectively managed. In such a case, the examinee is given a consecutive number as a reception number, and is further given a unique test number for each test item in the order of the test. FIG. 2 shows one example.

この結果、各受診者は、受付番号を基本キーとし、そし
て各検査項目ごとの検査番号を複数の二次キーとしても
つことになる。なお、ここでは前者をC1x(プライマ
リ・インデックス)、後者はSix (セカンダリ・イ
ンデックス)として表している。
As a result, each patient has the reception number as a primary key and the examination number for each examination item as a plurality of secondary keys. Note that here, the former is expressed as C1x (primary index), and the latter is expressed as Six (secondary index).

ところで、このようなインデックスCixあるいはSi
xのキーをもつデータのレコードがある期間内に各受診
者について1回ずつしか人力されないものとすれば、入
力された各レコードのキー(Ci xあるいはS i 
x)は一意的に定まるユニークインデックスとなる。し
たがってもしレコード間で重複するキーが検出されたな
らばそれはエラーであるということができる。
By the way, such an index Cix or Si
If a data record with key x is entered manually only once for each patient within a certain period, then the key of each input record (Ci x or S i
x) is a unique index that is uniquely determined. Therefore, if duplicate keys are detected between records, it can be said that it is an error.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来の重複キーチェックでは、重複するキーをもつレコ
ードは全てエラーとしていた。しかし、これではエラー
件数が非常に多くなり能率が低下するとともに、本来正
当なレコードまで過剰にエラーとして排除される可能性
があるという問題があった。
In conventional duplicate key checks, all records with duplicate keys are treated as errors. However, this has the problem that the number of errors increases significantly, reducing efficiency, and that even records that are actually legitimate may be excessively excluded as errors.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、重複キーが存在する場合に重複キー中の1方
は残してもユニークインデックスの一意性は保存される
ことに着目し、重複キーについて入力順を識別可能にし
て重複キー中の先頭のキーのみを残すようにするもので
ある。
The present invention focuses on the fact that when duplicate keys exist, the uniqueness of a unique index is preserved even if one of the duplicate keys is left, and by making it possible to identify the input order of duplicate keys, This is to leave only the keys of .

そしてそのための本発明の構成は、キー間に重複を許さ
ないユニークインデックスを有するデータベースの処理
システムにおいて、入力された複数のレコードのキーを
入力順情報とともに昇順にソートする手段と、該昇順に
ソートされたキー配列上で重複キーを検出し検出された
重複キーの組ごとに人力の先後を表わすフラグを各キー
に付加した重複キーの配列を作成する手段と、該重複キ
ーの配列を上記入力順情報に基づいてレコードの入力順
にソートする手段とをそなえ、該入力順にソートされた
重複キーの配列上で重複キーの後のキーを表わすフラグ
をもつキーのレコードを不当レコードとして排除するこ
とを特徴としている。
To achieve this, the present invention provides means for sorting the keys of a plurality of input records in ascending order along with input order information in a database processing system having a unique index that does not allow duplication between keys; means for detecting duplicate keys on the detected key arrangement, and creating a duplicate key arrangement by adding a flag indicating the future of human power to each key for each set of detected duplicate keys, and inputting the duplicate key arrangement as described above. and a means for sorting records in the input order based on the order information, and eliminating as an invalid record a record of a key having a flag indicating a key after the duplicate key on the array of duplicate keys sorted in the input order. It is a feature.

〔実施例〕〔Example〕

以下に、本発明の詳細を実施例にしたかって説明する。 The details of the present invention will be explained below using examples.

第1図は本発明の1実施例の全体構成図である。FIG. 1 is an overall configuration diagram of one embodiment of the present invention.

図において、1はデータベース処理装置、2ばソート処
理部、3はエラーチェック処理部、4はエラーリミット
制御部、5はシステム全体を制御管理する制御部、6は
入力データ、7はエラーリミット、8はソートワークフ
ァイル、9はエラー情報テーブル、10はデータベース
、11はログを表わす。
In the figure, 1 is a database processing device, 2 is a sort processing unit, 3 is an error check processing unit, 4 is an error limit control unit, 5 is a control unit that controls and manages the entire system, 6 is input data, 7 is an error limit, 8 represents a sort work file, 9 an error information table, 10 a database, and 11 a log.

作業開始によりソート処理部2は、指示により入力デー
タ6のレコード配列を特定のキーにしたがって昇順にソ
ートする。ソート結果は、ソートワークファイル8に格
納する。
Upon starting the work, the sort processing unit 2 sorts the record array of the input data 6 in ascending order according to a specific key according to an instruction. The sort results are stored in the sort work file 8.

エラーチェック処理部3は、ソートワークファイル8に
格納されている入力データ中の不当レコードをチェック
する。不当レコードとは以下のものをいう。
The error check processing unit 3 checks invalid records in the input data stored in the sort work file 8. Unauthorized records refer to the following:

■インデックスCixまたはSix構成カラム内のNO
T  NULLカラム、すなわち空きであってはいけな
いカラムがI’JULLであるレコード。
■NO in index Cix or Six constituent column
T A record in which a NULL column, that is, a column that must not be empty, is I'JULL.

■インデックスCixで昇順に配列されていないレコー
ド。
■Records that are not arranged in ascending order by index Cix.

■インデックスCixまたはSixで重複キーとなった
後のレコード。
■Record after becoming a duplicate key in index Cix or Six.

このような不当レコードが検出された場合、エラーチェ
ック処理部3はエラー情報テーブル9に記録する。第3
図はエラーチェック処理のフロー図である。
When such an invalid record is detected, the error check processing section 3 records it in the error information table 9. Third
The figure is a flow diagram of error check processing.

エラーリミット制御部4は、指定されたエラーリミット
7の値に基づいて、入力データ中に不当レコードが検出
されたとき、不当レコードの件数がエラーリミット範囲
内にある間は、不当レコードを排除すなわち無視して処
理を続行させる。またこのとき、無視した旨の通知メツ
セージを出力する。エラーリミット制御部は、■、■、
■に基づいた不当レコードの件数がエラーリミットを超
えたとき、そこで処理を中止する。処理結果のデータお
よびその間のログ41は、データベース10に格納され
る。
Based on the specified value of the error limit 7, when an invalid record is detected in the input data, the error limit control unit 4 eliminates the invalid record while the number of invalid records is within the error limit range. Ignore it and continue processing. At this time, a notification message indicating that the message has been ignored is output. The error limit control section is ■, ■,
When the number of invalid records based on (2) exceeds the error limit, the process is stopped at that point. The data of the processing results and the log 41 during that time are stored in the database 10.

第4図は、上記のエラーリミット制御を通用した具体例
であり、入力データのレコードを入力順に配列したテー
ブルを示している。図において、テーブルの行(1)乃
至(9)は入力順を表わし、A乃至Gはカラムを表わす
FIG. 4 is a specific example in which the above error limit control is applied, and shows a table in which records of input data are arranged in the order of input. In the figure, rows (1) to (9) of the table represent the input order, and A to G represent columns.

エラーチェック処理部3は、インデックス(Cix、3
ixl、5ix2.5ix3.5ix4)で指定された
カラムについて、上記した■、■、■の条件に合致する
レコードを入力順にチェックし、不当レコードを無視し
てゆく。
The error check processing unit 3 uses the index (Cix, 3
ixl, 5ix2.5ix3.5ix4), records that meet the conditions of ■, ■, and ■ described above are checked in the order of input, and invalid records are ignored.

無視されるレコードは、■により8行目、■により5行
目、■により3行目と7行目である。6行目と9行目も
重複キーをもっているが、重複の先の方のキーが不当キ
ーとして無視されたために重複ではな(なったものであ
る。
The records that are ignored are the 8th line due to ■, the 5th line due to ■, and the 3rd and 7th lines due to ■. The 6th and 9th lines also have duplicate keys, but they are not duplicates because the earlier duplicate key was ignored as an invalid key.

この場合、3行目、5行目、7行目、8行目が無視され
、無視通知メ・ノセージが出力されて正常終了する。
In this case, the 3rd, 5th, 7th, and 8th lines are ignored, an ignore notification message is output, and the process ends normally.

次に、エラーチェック処理部3が行なう重複キー排除処
理について説明する。
Next, the duplicate key elimination process performed by the error check processing unit 3 will be explained.

第5図は入力データに基づいて作成した第4図と同様な
テーブルである。第6図はエラー情報テーブル9の内容
であり、第5図のチープル中で検出された重複キーのエ
ラー情報が記録されている。
FIG. 5 is a table similar to FIG. 4 created based on input data. FIG. 6 shows the contents of the error information table 9, in which error information about duplicate keys detected in the cheaple shown in FIG. 5 is recorded.

第6図のエラー情報テーブルには、重複エラーレコード
ごとにSix種別と、重複キーと、入力順番号とが表示
されている。また重複キーにはそれが出現した順序によ
り、先頭の場合は′1”、後の場合は“°0”のフラグ
が付加されている。なお、入力順番号は、ソート処理部
2の処理段階でソートキーに追加して覚えておくように
する。
The error information table in FIG. 6 displays the Six type, duplicate key, and input order number for each duplicate error record. Also, depending on the order in which the duplicate key appears, a flag is attached to it: '1' if it is the first one, and '°0' if it is later.The input order number is determined at the processing stage of the sort processing unit 2. Add it to the sort key and remember it.

エラーチェック処理部3は、5ixl、5ix2、S 
I X 3のそれぞれについてキーをソニトし、重複キ
ーの有無をチェックする。その結果、第5図に丸で囲ん
である重複キーを検出する。たとえば5ixlにおいて
、入力順番号2と9の行でキー“2”が重複し、入力順
番号6と7の行でキー“3”が重複していることが検出
される。なおこのときそれぞれの重複キーの類キーのフ
ラグは“′1”に設定され、後のキーのフラグは“0″
に設定される。
The error check processing unit 3 includes 5ixl, 5ix2, S
Sonit the keys for each IX3 and check for duplicate keys. As a result, duplicate keys, which are circled in FIG. 5, are detected. For example, in 5ixl, it is detected that the key "2" is duplicated in the lines with input order numbers 2 and 9, and the key "3" is duplicated in the lines with input order numbers 6 and 7. At this time, the flag of the class key of each duplicate key is set to "'1", and the flag of the subsequent key is set to "0".
is set to

このようにして検出された重複キーをもつレコードの情
報は、第6図に示すように、エラー情報テーブルにSi
x順かつキーの昇順で配列される。
Information on records with duplicate keys detected in this way is stored in the error information table in the Si
They are arranged in x order and in ascending key order.

しかし、この状態で不当レコードを決定する処理を行な
いエラーメツセージ出力すると、ユーザ側からは、入力
順とは無関係なわかりにくい配列でデータが・表示され
ぞいるように見えることになる。
However, if the process of determining invalid records is performed in this state and an error message is output, it will appear to the user that the data is being displayed in an incomprehensible arrangement that is unrelated to the input order.

そこで第7図に示すように、入力順番号でソートし直し
たテーブルをつくり、この上で不当レコードを決定する
処理を行なう。第8図はそのアルゴリズムを示したもの
である。
Therefore, as shown in FIG. 7, a table is created that is re-sorted by input order number, and then processing is performed to determine invalid records. FIG. 8 shows the algorithm.

第7図において、まずテーブルの第1行を読み出し、フ
ラグをチェックするフラグが“1″で先頭キーであるこ
とを示していれば次の行を読み出し、同様にフラグをチ
ェックする。
In FIG. 7, the first row of the table is first read, and if the flag to be checked is "1" indicating that it is the first key, the next row is read and the flags are checked in the same way.

他方、フラグが“0”であれば同じレコード内すなわち
同じ人力順番号をもつ全ての行を調べ、それらのフラグ
が全て“0″であればこのレコードを不当レコードと決
定してエラーにし、また同じレコード中に1つでも先頭
キーを示す“1”が立っているフラグのキーがあれば、
そのフラグを“0”に変更し、その重複キーをもつメン
バのうち残りのレコードの先頭のものに“1”を引き継
がせ、自身は不当レコードとする。
On the other hand, if the flag is "0", all lines in the same record, that is, with the same manual sequence number, are checked, and if all of those flags are "0", this record is determined to be an invalid record and an error is made. If there is at least one flag key with “1” set indicating the first key in the same record,
The flag is changed to "0" and "1" is inherited by the member with the duplicate key at the head of the remaining records, making itself an invalid record.

すなわち1つでも0”のフラグのキーをもつレコードは
不当レコードとして排除されるため、この排除されるレ
コードと他のキーについて重複関係にある後のレコード
は、排除されるレコードに代わってそのキーについては
先頭の地位を獲得することになるからである。
In other words, a record that has even one key with a flag of 0" is excluded as an invalid record, so subsequent records that have a duplicate relationship with this excluded record and other keys will use that key instead of the excluded record. This is because they will gain the leading position.

第7図のテーブルにおいては、3行目と4行目のキーの
フラグ1”がそれぞれ重複の相手側である6行目と7行
目の後のキーのフラグに引き継がれ、6行目と7行目の
フラグは“0”から“1”に変更される。
In the table shown in Figure 7, the flag 1'' of the keys in the 3rd and 4th rows is inherited by the flags of the keys after the keys in the 6th and 7th rows, which are the duplicate partners, respectively. The flag on the seventh line is changed from "0" to "1".

以上の操作をテーブルの順次の行に適用し、最後の行に
達したとき終了する。この結果第5図の例では、人力順
番号6と9のレコードのみが不当レコードとして排除さ
れ、メツセージ出力表示される。
Apply the above operations to successive rows of the table and stop when the last row is reached. As a result, in the example shown in FIG. 5, only records with manual order numbers 6 and 9 are excluded as invalid records, and messages are output and displayed.

〔発明の効果〕〔Effect of the invention〕

以上のように本発明によれば、従来重複キーの全てをエ
ラーとしていたものを先頭のキーだけ有効化することに
より、エラーレコード量を減少させることができ処理効
率を向上させることができる。またエラー出力情報は入
力順に配列されるため見易いも−のとなる。
As described above, according to the present invention, the amount of error records can be reduced and the processing efficiency can be improved by activating only the first key, whereas conventionally all duplicate keys were treated as errors. Furthermore, the error output information is arranged in the order of input, making it easy to read.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の1実施例システムの構成図、第2図は
インデックスを説明するためのデータの具体例を示す図
、第3図は本実施例におけるエラーチェック処理部のフ
ロー図、第4図は重複キーをもつデータの具体例による
動作説明図、第5図は他のデータの具体例を示す説明図
、第6図は第5図のデータに基づいて作成されたエラー
情報テーブルの説明図、第7図は第6図のテーブルを入
力順にソートしたテーブルの説明図、第8図は不当レコ
ードを決定するためのアルゴリズムを示すフロー図であ
る。 図中、1ばデータベース処理装置、2はソート処理部、
3はエラーチェック処理部、4はエラーリミット制御部
、5は制御部、6は入力データ、7はエラーリミット、
8はソートワークファイル、9はエラー情報テーブル、
10はデータヘース、11はログを表わす。 特許出願人   富士通株式会社 代理人弁理士  長谷用 文 廣(外1名)第 2I2
1 第67       87 口
FIG. 1 is a block diagram of a system according to an embodiment of the present invention, FIG. 2 is a diagram showing a specific example of data for explaining an index, FIG. 3 is a flow diagram of an error check processing section in this embodiment, and FIG. Figure 4 is an explanatory diagram of the operation using a specific example of data with duplicate keys, Figure 5 is an explanatory diagram showing a specific example of other data, and Figure 6 is an error information table created based on the data in Figure 5. FIG. 7 is an explanatory diagram of a table obtained by sorting the table of FIG. 6 in the order of input, and FIG. 8 is a flow diagram showing an algorithm for determining invalid records. In the figure, 1 is a database processing device, 2 is a sort processing unit,
3 is an error check processing unit, 4 is an error limit control unit, 5 is a control unit, 6 is input data, 7 is an error limit,
8 is the sort work file, 9 is the error information table,
10 represents a data storage, and 11 represents a log. Patent applicant Fujitsu Ltd. Representative Patent Attorney Fumihiro Hase (1 other person) No. 2I2
1 67th 87th mouth

Claims (1)

【特許請求の範囲】[Claims] キー間に重複を許さないユニークインデックスを有する
データベースの処理システムにおいて、入力された複数
のレコードのキーを入力順情報とともに昇順にソートす
る手段と、該昇順にソートされたキー配列上で重複キー
を検出し検出された重複キーの組ごとに入力の先後を表
わすフラグを各キーに付加した重複キーの配列を作成す
る手段と、該重複キーの配列を上記入力順情報に基づい
てレコードの入力順にソートする手段とをそなえ、該入
力順にソートされた重複キーの配列上で重複キーの後の
キーを表わすフラグをもつキーのレコードを不当レコー
ドとして排除することを特徴とする重複キー排除処理方
式。
In a database processing system having a unique index that does not allow duplication between keys, there is provided a means for sorting the keys of a plurality of input records in ascending order along with input order information, and a means for sorting the keys of a plurality of input records in ascending order, and eliminating duplicate keys on the key arrangement sorted in the ascending order. means for detecting and creating an array of duplicate keys by adding a flag indicating the previous or subsequent input to each key for each set of detected duplicate keys; and arranging the duplicate keys in the input order of records based on the input order information. What is claimed is: 1. A method for eliminating duplicate keys, comprising: means for sorting, and eliminating records of keys having a flag indicating a key after a duplicate key on an array of duplicate keys sorted in the input order as invalid records.
JP59175995A 1984-08-24 1984-08-24 Elimination of double keying Pending JPS6154519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59175995A JPS6154519A (en) 1984-08-24 1984-08-24 Elimination of double keying

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59175995A JPS6154519A (en) 1984-08-24 1984-08-24 Elimination of double keying

Publications (1)

Publication Number Publication Date
JPS6154519A true JPS6154519A (en) 1986-03-18

Family

ID=16005863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59175995A Pending JPS6154519A (en) 1984-08-24 1984-08-24 Elimination of double keying

Country Status (1)

Country Link
JP (1) JPS6154519A (en)

Similar Documents

Publication Publication Date Title
Warner et al. HELP? A program for medical decision-making
Seidel et al. The Ethnograph: A computer program for the analysis of qualitative data
JPS5843779B2 (en) medical office system
US5291590A (en) Method of detecting and processing abnormal message output from computer system and detecting and processing apparatus therefor
JPS6154519A (en) Elimination of double keying
JPH01163873A (en) Diagnosis supporting system
KR940007704A (en) Machine diagnostic method and its system
JPS6116326A (en) Sort processor
JPH03119452A (en) Back-up device for storage of knowhow
JPH0774988B2 (en) Processing equipment
JPH1125170A (en) Medical work accounting system and recording medium
Wise Microcomputer infection surveillance system
JP3186086B2 (en) Rule grouping method and apparatus, and fuzzy inference method and apparatus according to grouped rules
GLASS The role of generation in recognition
JPH01180064A (en) Receipt print processing system
JP2513865B2 (en) Medical office processing equipment
JPH0359789A (en) Bar code and bar code reader
Haller et al. 30. PERGYN: Perinatal gynecological information system
JPS63255734A (en) Automatic number generating system for providing specific code
JPS6224362A (en) Medical work system
Leiber The German syndrome identification and information system (DOFONOS)
JP2991482B2 (en) Numbering system
Rheault Theory and Practicality
McNicol Short-term recall of messages containing repeated items
JPH04152441A (en) Data base processing system