JPH0573623A - Learning type data base processing system - Google Patents

Learning type data base processing system

Info

Publication number
JPH0573623A
JPH0573623A JP3231964A JP23196491A JPH0573623A JP H0573623 A JPH0573623 A JP H0573623A JP 3231964 A JP3231964 A JP 3231964A JP 23196491 A JP23196491 A JP 23196491A JP H0573623 A JPH0573623 A JP H0573623A
Authority
JP
Japan
Prior art keywords
constraint
unit
sequence
tuple
false
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
JP3231964A
Other languages
Japanese (ja)
Inventor
Shigeo Kaneda
重郎 金田
恵 ▲斉▼藤
Megumi Saito
Takefumi 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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP3231964A priority Critical patent/JPH0573623A/en
Publication of JPH0573623A publication Critical patent/JPH0573623A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a learning type data base processing system which can execute a data base processing only by means of describing the restriction relation of data and which can execute a high speed and secure processing. CONSTITUTION:A data base is stored in a data base holding means 11 and a restriction holding means 12 stores restriction expression. When the realization of the restriction relation is inspected and a restriction inspection means 13 indicates a unit to be corrected, a unit selection means 14 selects one unit and a sequence storage means 15 stores the unit to be corrected from the relation of restriction expression. A restriction holding means 12 is caused to indicate the unit to be corrected with a trigger as an opportunity. The name of the unit which the unit selection means 14 selects and the sufficient situation of a restriction rule are stored in the sequence storage means 15. When an operation similar to that of the trigger is executed again, a comparison means 16 compares them. The data base holding means 11 is corrected in accordance with a sequence stored in the sequence storage means 15 as long as the sufficient state of the restriction rule coincides.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は学習型データベース処理
システムに係り、特に、データ相互の制約関係のみを記
述することによりデータベース処理を実行する場合にお
いて、処理の正当性を高めた学習型データベース処理シ
ステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a learning type database processing system, and more particularly, to a learning type database processing which enhances the correctness of the processing when the database processing is executed by describing only the mutual constraint relations of data. Regarding the system.

【0002】[0002]

【従来の技術】リレーショナルデータベースモデルは大
量のデータを管理するために広く利用されている。リレ
ーショナルデータベースモデルではデータは全て「リレ
ーション」と呼ばれている表として管理される。
The relational database model is widely used for managing large amounts of data. In the relational database model, all data is managed as a table called "relation".

【0003】図2はリレーションの例を示す。同図
(A)は社員レーション、(B)は単身赴任届けリレー
ション、(C)は扶養申請リレーションを示す。同図の
リレーションの縦方向、例えば「社員コード」、「氏
名」等を属性と呼ぶ。また、リレーションの横方向、例
えば、社員コード“0001”に対応する一行を「タプ
ル」と呼ぶ。同図の(A)の「社員」リレーションには
7個の属性と、3個のタプルが存在する。このタプルの
順序は意味を持たない。社員コード「0001」のタプ
ルは7個のデータから構成されるが、それらを「属性
値」と呼ぶ。また、リレーションの属性の中には、当該
属性の値を決めることにより、リレーション中のタプル
をユニークに決定する属性が少なくとも1個存在し、こ
れを「キー属性」と呼ぶ。(A)の「社員」リレーショ
ンのキー属性は「社員コード」である。
FIG. 2 shows an example of a relation. In the figure, (A) shows an employee relation, (B) shows a single transfer notification relation, and (C) shows a support application relation. The vertical direction of the relation in the figure, for example, "employee code", "name", etc., is called an attribute. In addition, the horizontal direction of the relation, for example, one line corresponding to the employee code “0001” is called a “tuple”. There are 7 attributes and 3 tuples in the “employee” relation of FIG. The order of this tuple has no meaning. The tuple of the employee code “0001” is composed of seven pieces of data, which are called “attribute values”. Further, among the attributes of the relation, there is at least one attribute that uniquely determines the tuple in the relation by determining the value of the attribute, and this is called a "key attribute". The key attribute of the “employee” relation in (A) is “employee code”.

【0004】情報処理システムは、新しいタプルを追加
したり、古いタプルを消去したり、或いは、タプル中の
属性値を書き換えるようなリレーショナルデータベース
モデル等で表現されたデータ更新するような処理を実行
する。従来、この種の情報処理システムではどのタプル
を更新すべきかを判断することは、応用プログラム側で
考慮すべきことで、データベース管理システムは、単に
データを記憶する機能しか持たない。
The information processing system executes processing such as adding a new tuple, deleting an old tuple, or updating data represented by a relational database model that rewrites attribute values in the tuple. .. Conventionally, in this type of information processing system, it is an application program side to consider which tuple should be updated, and the database management system has only a function of storing data.

【0005】従来のデータベース管理システムは、外部
ユーザからの入力により、どのタプルを更新すべきかの
判断は全てプログラムで行われ、即ち、手続きとして実
現されている。このため、プログラムに少しでも改造が
ある場合には、手続き全体を見直す必要がある他、レア
ケースも含めて、全てのパスを予め生成しておく必要が
あり、プログラムの作成工数が大きくなる原因となって
いる。
In the conventional database management system, the decision as to which tuple should be updated is made by a program, that is, it is realized as a procedure according to an input from an external user. Therefore, if there is any modification to the program, it is necessary to review the entire procedure and it is necessary to generate all paths in advance, including rare cases. Has become.

【0006】このような問題を解決するために特願平3
−228983ではデータベースのタプルの有無及びタ
プル中の属性値をユニット変数とする制約表現を用い、
さらに、処理を高速化するために、前回の処理のシーケ
ンスを記憶しておいて同一の処理が要求された時に利用
するという宣言的なデータベース処理方式を開示してい
る。ここでいう制約とは、データベース中のデータが相
互に満足しなければならない意味的関係を記述したルー
ルである。
In order to solve such a problem, Japanese Patent Application No.
-228983 uses a constraint expression in which the presence or absence of a tuple in the database and the attribute value in the tuple are unit variables,
Further, in order to speed up the processing, a declarative database processing method is disclosed in which the sequence of the previous processing is stored and used when the same processing is requested. The constraint here is a rule that describes a semantic relationship that data in the database must satisfy each other.

【0007】図4は制約のルール表現を表として示した
例を示す。ルール表現としては、エキスパートシステム
構築支援ツールで一般的に利用される形式に準じる。同
図(A)は単身赴任届け制約、(B)は赴任状況制約、
(C)は扶養申請制約に関するルール表現である。エキ
スパートシステム構築支援システムのルールでは「?
x」「?y」のように「?」が付加されたものは「ルー
ル変数」と呼ばれ、ルール中では、当該データ項目の値
がバインドされる。
FIG. 4 shows an example in which the rule expression of constraints is shown as a table. The rule expression conforms to the format generally used in expert system construction support tools. In the same figure, (A) is a restriction on transfer assignment, (B) is a restriction on transfer status,
(C) is a rule expression regarding restrictions on dependent applications. According to the rules of the expert system construction support system, "?
A value added with “?” such as “x” or “? y” is called a “rule variable”, and the value of the data item is bound in the rule.

【0008】例えば、図4に示す(A)の単身赴任届け
制約における第1行目のルールは以下の意味を持つ。
「(指定されたキー属性、すなわち社員コードに対し
て)社員リレーション中にタプルが存在し
かつ単身赴任届けリレーション中
にタプルが存在し かつ単身赴
任届けリレーション中のタプルの「赴任」属性の値=単
身 かつ社員リレーション中のタプルの「住所」
属性の値=?y かつ単身赴任届けリレ
ーション中のタプルの「住所」属性の値=?x
かつ社員リレーション中のタプルの「住所1」属性の値
=?xの関係が成立する場合がある。」上記のルールの
意味は社員リレーションに当該社員コードを持つ社員が
存在するとき、もし、「赴任」の属性の値が「単身」で
あれば、単身赴任届けリレーションには当該社員のタプ
ルが存在している必要があり、この単身赴任届けリレー
ション中のタプル(以下、「単身赴任届けタプル」と呼
ぶ)の「帰省先」の属性の値は、この社員リレーション
中のタプル(以下、「社員タプル」と呼ぶ)の「住所
1」に値に等しく、単身赴任届けタプルの「住所」の属
性の値は社員タプルの「住所」の値に等しい事を意味し
ている。ここで「住所1」とは家族の住んでいる場所と
いうことになる。このように制約のルールは属性値相互
の関連を表すルールであればどんなものでも良い。
For example, the rule of the first line in the single transfer assignment restriction shown in FIG. 4A has the following meaning.
“A tuple exists in the employee relation (for the specified key attribute, ie employee code)
And there is a tuple in the single assignment report relation and the value of the "assignment" attribute of the tuple in the single assignment report relation = "address" of the tuple in the single relation and employee relationship
Attribute value =? y And the value of the "address" attribute of the tuple in the single assignment report relation =? x
And the value of the "address 1" attribute of the tuple in the employee relation =? The relationship of x may be established. The meaning of the above rule is that when there is an employee with the employee code in the employee relation, if the value of the attribute of "transfer" is "single", the tuple of the employee exists in the single transfer report relation. The value of the attribute of the "homecoming destination" of the tuple in the single assignment report relation (hereinafter referred to as the "single assignment report tuple") is the tuple in the employee relation The value of the “address” attribute of the single assignment report tuple is equal to the value of the “address” of the employee tuple. Here, "address 1" means the place where the family lives. As described above, the constraint rule may be any rule as long as it represents the mutual relation of attribute values.

【0009】上記の「学習型データベース処理システ
ム」(特願平3−228983)においては、図4の制
約関係は、データベースに対する制約関係の成立を検査
して制約が満たされていない場合に、修正すべきユニッ
トを提示する機能を有する制約検査手段により検証され
る。図4の制約関係に与える各属性の値は、通常はデー
タベース中の値をそのまま利用する訳であるが、データ
ベース中の値のままでは制約が満足されない場合があ
り、その場合に、一部の属性を仮に変更する必要があ
る。従って、制約に与えられる属性値を記憶するため
に、ユニットが準備される。図3はユニットの例を示
す。この「ユニット」とは、制約関係を満足するように
値を決定する変数の意味として制約充足問題では広く利
用されている用語である。
In the above-mentioned "learning type database processing system" (Japanese Patent Application No. 3-228983), the constraint relation of FIG. 4 is corrected when the constraint relation with the database is checked and the constraint is not satisfied. It is verified by the constraint checking means having the function of presenting the unit to be processed. As the value of each attribute given to the constraint relation of FIG. 4, the value in the database is normally used as it is, but the constraint may not be satisfied if the value in the database is left as it is. It is necessary to temporarily change the attributes. Therefore, the unit is prepared to store the attribute value given to the constraint. FIG. 3 shows an example of the unit. The "unit" is a term widely used in the constraint satisfaction problem as a meaning of a variable that determines a value so as to satisfy the constraint relationship.

【0010】図3において、「社員.タプル」とは与え
られたキーのもとで「社員」リレーションにタプルが存
在するか否かを表示するユニットである。また、「社
員.住所」は、社員リレーションにタプルが存在するか
否かを表示するユニットである。また、「社員.住所」
は、社員リレーションにタプルが存在した場合に、その
「住所」属性の値に相当する。通常、これらユニットは
データベースの値に対応するが、ユニットの値の一部が
変更される場合がある。図3の「取りうる値」として記
述されたものは、当該ユニットに代入される可能性のあ
る値の範囲を表示している。また、「(入力値)」と
は、予め値の候補が特定できず、システムのユーザから
取得して入れる必要がある事を意味している。「Nul
l」は、値が無いことが陽に宣言されて入れられない事
を意味している。例えば、「社員.氏名1」=Null
とは、当該社員が扶養に相当するような家族を有してい
ないことを意味する。
In FIG. 3, "employee.tuple" is a unit for displaying whether or not a tuple exists in the "employee" relation under a given key. The “employee.address” is a unit that displays whether or not tuples exist in the employee relation. Also, "employee.address"
Corresponds to the value of the "address" attribute of a tuple in the employee relation. Typically, these units correspond to database values, but some of the unit values may change. What is described as “possible value” in FIG. 3 indicates a range of values that may be substituted in the unit. Further, “(input value)” means that a value candidate cannot be specified in advance and must be acquired from the user of the system and input. "Nul
"L" means that no value is explicitly declared and cannot be entered. For example, "employee.name1" = Null
Means that the employee does not have a family equivalent to dependents.

【0011】図5は初期状態のユニット値を示す。例え
ば、図3に示したユニットの値が具体的には図5に示す
値であるとする。図5の値はシステムが何ら動作を行っ
ていない待ち状態に該当する。この場合には「社員.タ
プル」「単身赴任届け.タプル」「扶養申請.タプル」
は全て「無」である。また、図4には(A)単身赴任届
け制約、(B)赴任状況制約、(C)扶養申請制約の3
種の制約が記述されているが、図4の「社員.タプル」
「単身赴任届け.タプル」「扶養申請.タプル」が
「無」であるため、図4の(A),(B),(C)の一
番下の制約ルールが充足される。図4の各制約は横方向
(行)の中で、何れか1個が満足されれば良いので、図
5のユニットの値は全て制約を充足する状態である。
FIG. 5 shows the unit value in the initial state. For example, it is assumed that the unit value shown in FIG. 3 is specifically the value shown in FIG. The values in FIG. 5 correspond to the waiting state in which the system is not performing any operation. In this case, "employee.tuple""single transfer notification. Tuple""support application. Tuple"
Is all "none". Further, in FIG. 4, there are three restrictions: (A) single transfer notification restriction, (B) transfer status restriction, and (C) dependent application restriction.
Although the kind restrictions are described, "Employee.tuple" in Figure 4
Since “single assignment report. Tuple” and “support application. Tuple” are “none”, the constraint rules at the bottom of FIGS. 4A, 4B, and 4C are satisfied. Each constraint in FIG. 4 has only to be satisfied in the horizontal direction (row), so that the unit values in FIG. 5 all satisfy the constraint.

【0012】図6は社員タプル取得後のユニット値を示
す。ここで、図6の様に社員タプルが追加されたとす
る。この場合、例えば図4の(B)の赴任状況制約を調
べると一番下の行は制約充足とはならない。残りの3行
の中で、どの制約が充足されるかは、「社員.住所」等
の値を取得した後に調べる必要がある。
FIG. 6 shows the unit value after the employee tuple is acquired. Here, it is assumed that an employee tuple is added as shown in FIG. In this case, for example, when the assignment status constraint of FIG. 4B is checked, the bottom line does not satisfy the constraint. In the remaining three lines, it is necessary to check which constraint is satisfied after acquiring values such as "employee.address".

【0013】さらに、図7はデータ取得後のユニット値
を示す。図5のユニット値から図7のユニット値まで変
化すれば、制約は充足状態となる。このようにユニット
値に対応して制約が充足されているか否かを調べるの
が、制約検査手段の役割である。
Further, FIG. 7 shows unit values after data acquisition. If the unit value of FIG. 5 changes to the unit value of FIG. 7, the constraint is satisfied. The role of the constraint checking means is to check whether or not the constraint is satisfied corresponding to the unit value.

【0014】また、従来の制約検査手段には重要なもう
一つの機能が付与されている。即ち、制約検査手段の検
査結果が制約の充足が未確定、或いは、制約充足不可を
表示している時に、次に値を決定すべきユニット値を決
定して予め取りうる値として知られているものから適当
な値を選択する機能がある。さらに、一部のユニット値
を変更して制約が満足されている状態を探す機能があ
る。また、制約検査手段は、ユニットの値が予め決めら
れておらず、外部からの入力値(図3では「(入力
値)」と表している)の場合には、制約検査手段自らで
あれ、他のモジュールに取得を依頼する形であれ、シス
テムのユーザからその値を取得することを指示する機能
がある。
Another important function is added to the conventional constraint checking means. That is, it is known as a value that can be taken in advance by deciding a unit value whose value should be decided next when the result of the check of the constraint checking means shows that the constraint is unsatisfied or the constraint cannot be satisfied. There is a function to select an appropriate value from the ones. Furthermore, there is a function to change some unit values and search for a state where the constraint is satisfied. In the case where the value of the unit is not determined in advance and the input value from the outside (represented as “(input value)” in FIG. 3), the constraint checking means may be the constraint checking means itself. There is a function to instruct the system user to acquire the value, even if the module is requested to acquire the value.

【0015】また、ユニット値の一部に未取得のデータ
があり、制約検査手段による検査が実行できない場合に
は、制約検査手段は、未入力のユニット値の取得を指示
して未取得のユニット値を決める。このように、制約検
査手段は修正すべき、あるいは新たにデータ取得すべき
複数のユニットを提示する。
If some of the unit values have unacquired data and the constraint inspecting means cannot execute the inspection, the constraint inspecting means instructs acquisition of the uninputted unit value and the unacquired unit. Determine the value. In this way, the constraint checking means presents a plurality of units to be modified or to newly acquire data.

【0016】図4の(B)赴任状況制約の例で言うと、
この制約を満足させるためには図6に示す社員タプル取
得後のユニット値のうち、 「社員.タプル」を「無」に書き戻す: 「社員.住所」「社員.住所1」の値を次々と取得し
て、「社員.赴任」の値を確定する: の2通りが図4の制約より導かれる。この場合、人間で
あれば、直ちにが正しいと判断するが、図4の制約の
みからこれを決定する事はできない。さらに、上記のデ
ータ取得により、「社員.赴任」が「単身」となった場
合には、図4(A)単身赴任届け制約が非充足の状態と
なる。この制約を充足状態にするには図6において、 「社員.タプル」を「無」に書き換える: 「単身赴任届け.タプル」を「有」に書き換える: 「社員.赴任」を「同伴」に書き換える: の3通りがある。しかし、何れを選択することが意味的
に正しいかを図4の制約の表のみから判断することはで
きない。従って、人間が「単身赴任届け.タプル」を
「有」に書き換える動作を指示する必要がある。これに
より、「単身赴任届け制約」は充足状態となる。図4
(C)「扶養申請制約」については説明を省略する。
In the example of the assignment status constraint of FIG. 4B,
In order to satisfy this constraint, in the unit value after the employee tuple acquisition shown in FIG. 6, write back “Employee.tuple” to “none”: “Employee.address” “employee.address1” values one after another And determine the value of “employee.transfer”: The following two are derived from the constraints in Figure 4. In this case, a person immediately determines that it is correct, but this cannot be determined only from the constraints shown in FIG. Furthermore, when “employee.transfer” becomes “single” by the above data acquisition, the single transfer notification restriction in FIG. 4A becomes unsatisfactory. To satisfy this constraint, rewrite "Employee.tuple" to "No" in Fig. 6: Rewrite "single transfer. Tuple" to "Yes": Rewrite "employee.transfer" to "accompanied" : There are three ways. However, it is not possible to judge which of the selections is semantically correct only from the constraint table of FIG. Therefore, it is necessary for a human to instruct the operation of rewriting “single assignment report. Tuple” to “present”. As a result, the "single assignment report restriction" will be satisfied. Figure 4
(C) Description of "restriction application restrictions" is omitted.

【0017】従来の「学習型データベース処理システ
ム」(特願平3−228983)では、これらの複数の
修正可能なユニットの中からユーザに1個を選択させる
ために、ユニット選択手段を設けており、選択されたユ
ニット名称は、シーケンス記憶手段に記憶される。この
様に、シーケンスを記憶しておくことにより、後日、全
く同一のタプルに対する処理が要求される場合におい
て、記憶されたシーケンスを利用することにより、処理
を高速化できる。
In the conventional "learning type database processing system" (Japanese Patent Application No. 3-228983), a unit selecting means is provided in order to allow the user to select one of these plural modifiable units. The selected unit name is stored in the sequence storage means. By storing the sequence in this way, when processing for exactly the same tuple is required at a later date, the processing can be speeded up by using the stored sequence.

【0018】[0018]

【発明が解決しようとする課題】しかしながら、従来の
「学習型データベース処理システム」にはシーケンス記
憶手段に記憶してあるシーケンスが再利用された時に、
前回と全く同じ値がユーザから入力されるとは限らない
という問題がある。
However, in the conventional "learning type database processing system", when the sequence stored in the sequence storing means is reused,
There is a problem that the exact same value as the last time is not always input by the user.

【0019】例を挙げて説明する。図4の(B)「赴任
状況制約」では「TEST条件」があり、「社員」タプ
ルの「住所」属性の値と、「社員」タプルの「住所1」
の属性の値の一致・不一致により、満足される制約ルー
ル(制約の横方向1個1個を制約ルールと呼ぶこととす
る)が異なってくる。ここで「?x」と「?y」が前回
の処理時には一致していたとする。この場合には、制約
により「社員」タプルの「赴任」の属性の値は「同伴」
となる。前回の処理では図4の(A)単身赴任届け制約
から、最終的に「単身赴任届け.タプル」の値は「無」
として処理が終了していたとする。これらのデータの取
得のシーケンスはシーケンス記憶手段に記憶される。
An example will be described. There is a “TEST condition” in (b) “assignment status constraint” in FIG. 4 and the value of the “address” attribute of the “employee” tuple and “address 1” of the “employee” tuple.
Depending on whether the values of the attributes match or do not match, the constraint rules that are satisfied (each constraint in the horizontal direction is called a constraint rule) will differ. Here, it is assumed that “? X” and “? Y” match at the time of the previous processing. In this case, the value of the “assignment” attribute of the “employee” tuple is “accompanied” due to restrictions.
Becomes In the previous processing, the value of “single transfer report. Tuple” is finally “none” due to the restriction on single transfer report in (A) of FIG.
It is assumed that the processing has ended. The sequence of acquisition of these data is stored in the sequence storage means.

【0020】ここで、別の社員に対して同一の処理がト
リガされ、その結果、「社員.タプル」の「社員.住所
1」の属性の値が記憶されているシーケンス記憶手段が
記憶している前回のシーケンスに従って取得されていく
ことになったとする。しかし、今回は前回とは異なり、
単身赴任の対象者であったとするとルール変数「?x」
と「?y」の値が異なる。従って、「社員」タプルの
「赴任」属性の値は「単身」となるから、本来的には図
4の(A)単身赴任届け制約から最終的に「単身赴任届
け.タプル」の値は「有」として処理される必要があ
る。しかし、現実にはそうはならずに、前回の記憶され
たシーケンスをそのまま利用するので処理としては、
「単身赴任届け.タプル」の値は「無」とされ、処理と
しての正当性が保証されない。これは前回と全く同一の
社員に対して処理をしている訳ではないため、取得され
るデータの値が異なる場合があるにも係わらず、制約検
査を行わずに、同一の処理で対応しているためである。
Here, the same processing is triggered for another employee, and as a result, the sequence storage means in which the value of the attribute of “employee.address1” of “employee.tuple” is stored is stored. Suppose that it will be acquired according to the previous sequence. But this time, unlike last time,
Assuming that the target person is a single employee, the rule variable "? X"
And "? Y" have different values. Therefore, since the value of the “assignment” attribute of the “employee” tuple is “single”, the value of the “single assignment report. Tuple” is finally set to “single assignment report tuple” in FIG. 4A. Need to be treated as "Yes". However, in reality, this is not the case, and since the previously stored sequence is used as is,
The value of “single assignment report. Tuple” is set to “none”, and the validity of the process is not guaranteed. This does not mean that the same employee as the previous time is being processed, so even if the value of the acquired data may be different, the same processing can be performed without performing the constraint check. This is because

【0021】上記の従来の学習型データベース処理シス
テムの問題に対応する方策として、前回に取得したデー
タを全て記憶しておき、前回の値と一致している限り
は、処理を記憶しているシーケンスとして動作させ、も
し、一致している状態が崩れると制約検査手段を完全に
動作させて、以後、どのユニットを修正すると制約が満
足するかをユニット選択手段により選択する動作に切り
換えることで解決される。しかし、この方法は一人一人
の住所が異なるような現実の社会の多様性を許容できる
ものではなく、処理を速くするという学習効果を有する
学習型データベース処理システムの利用範囲を損なうと
いう問題がある。
As a measure to cope with the problem of the above-mentioned conventional learning type database processing system, all the previously acquired data are stored, and as long as the values match the previous values, the sequence storing the processing is stored. If the matching state collapses, the constraint checking means is fully operated, and thereafter, which unit is corrected to switch the operation to select which unit satisfies the constraint by the unit selecting means. It However, this method cannot tolerate the diversity of the actual society in which each person has a different address, and has a problem of impairing the range of use of the learning database processing system having the learning effect of speeding up the processing.

【0022】本発明は上記の点に鑑みなされたもので、
データ相互の制約関係のみを宣言的に記述するのみで、
データベース処理が可能であり、動作が高速でかつ、確
実な処理を行うことができる学習型データベース処理シ
ステムを提供することを目的とする。
The present invention has been made in view of the above points,
By declaratively describing only the mutual relations of data,
It is an object of the present invention to provide a learning type database processing system capable of performing database processing, operating at high speed, and performing reliable processing.

【0023】[0023]

【課題を解決しようとする手段】リレーショナルデータ
ベースモデルに基づいてデータベースを記憶するデータ
ベース保持手段と、データベース保持手段に記憶されて
いるタプルの有無及び、タプル毎の属性値をユニット変
数とする制約表現を記憶する制約保持手段と、データベ
ースに対する制約表現の関係が充足するかを検査して、
制約表現の関係が非充足の場合に、1個、又は複数個の
修正すべきユニットを提示する制約検査手段と、制約検
査手段で指定された修正すべきユニットが複数個あると
きに、ユニットから1個のユニットを選択するユニット
選択手段と、制約表現の関係が充足していたデータベー
ス状態を最初に非充足に遷移させた最初のタプルをデー
タベース保持手段に追加又は削除を行うトリガに対応さ
せて、最終的に制約表現の関係が充足するまでの修正す
べきユニット及び、制約中の各制約ルールの充足状態を
シーケンスとして記憶するシーケンス記憶手段と、シー
ケンス記憶手段に記憶された制約ルールの充足状態のシ
ーケンスと、制約検査手段により提示された制約ルール
の充足状態とを比較する比較手段とを有し、トリガを契
機として、制約検査手段により修正すべきユニットを提
示させ、修正すべきユニットが1つの場合にはユニット
を、修正すべきユニットが複数の場合にはユニット選択
手段により選択されたユニットを各制約ルールの充足状
態と共にシーケンス記憶手段に記憶し、トリガと同一動
作が再度行われたときには、比較手段により比較結果が
一致している場合には、シーケンス記憶手段に記憶され
ているユニットシーケンスに従ってデータベース保持手
段を修正する。
A database holding means for storing a database based on a relational database model, the presence / absence of tuples stored in the database holding means, and a constraint expression in which an attribute value for each tuple is a unit variable. Check whether the relation between the constraint holding means to be stored and the constraint expression for the database is satisfied,
When the relation of the constraint expression is unsatisfied, the constraint checking means for presenting one or more units to be corrected and the plurality of units to be corrected designated by the constraint checking means Corresponding to the unit selection means for selecting one unit and the trigger for adding or deleting the first tuple that first transits the unsatisfied database state satisfying the constraint expression relation to the database holding means. , A unit to be corrected until the relation of the constraint expressions is finally satisfied, a sequence storage unit that stores the satisfaction state of each constraint rule in the constraint as a sequence, and the satisfaction state of the constraint rule stored in the sequence storage unit And a comparing means for comparing the satisfaction state of the constraint rule presented by the constraint checking means, and the constraint checking is triggered by the trigger. The unit to be modified is presented by means, and when there is one unit to be modified, the unit is selected, and when there are a plurality of units to be modified, the unit selected by the unit selection means is sequenced together with the satisfaction state of each constraint rule. When the same operation as the trigger is performed again when stored in the storage means, and the comparison results match by the comparison means, the database holding means is modified according to the unit sequence stored in the sequence storage means.

【0024】[0024]

【作用】本発明の学習型データベース処理システムで
は、満足されていた制約を変化させて満足されない状態
に遷移させた最初のタプルの追加・削除を行う操作のト
リガに対応づけて、最終的に制約が再び満足されるまで
の修正すべきユニットシーケンスを記憶しておき、再度
同一の種類のトリガが発生した時はこの記憶されたシー
ケンスを処理に利用するという従来の学習型データベー
ス処理に加えて、シーケンス記憶手段に記憶されるもの
は、修正されるユニット名称のみならず、その修正によ
り充足された制約ルールの充足状況を合わせて記憶し、
同一のトリガにより、記憶されたシーケンスが処理に利
用される場合でも、常に制約関係の検査が行われ、制約
ルールの充足状態が記憶された充足状態と同一であるか
否かを比較手段により比較し、制約ルールの充足状態が
一致している限りはシーケンス記憶手段に記憶されたシ
ーケンスに従って処理を行う。
In the learning-type database processing system of the present invention, the constraint that is satisfied is changed to correspond to the trigger of the operation of adding / deleting the first tuple that is changed to the unsatisfied state, and finally the constraint is satisfied. In addition to the conventional learning type database processing of storing a unit sequence to be corrected until it is satisfied again and using this stored sequence for processing again when the same type of trigger occurs again, What is stored in the sequence storage means is not only the unit name to be corrected, but also the satisfaction status of the constraint rule satisfied by the modification is stored together.
Even if the stored sequence is used for processing by the same trigger, the constraint relation is always checked, and the comparison means compares whether the satisfaction state of the constraint rule is the same as the stored satisfaction state. However, as long as the satisfaction states of the constraint rules match, the processing is performed according to the sequence stored in the sequence storage means.

【0025】これにより、制約検査手段で検査を実行す
るだけであれば、計算量は少なくて済むが、どのユニッ
トを修正すると制約が充足される方向に遷移するかを調
べることは、極めて大きな計算量を必要とする。本発明
の動作は、記憶されたシーケンスが利用されている場合
でも、制約検査手段を制約ルールの充足状態が、前回の
シーケンス記憶時と同一であるか否かを調べることによ
り、ユーザから前回と異なるデータが入力されても、制
約により意味的に処理が保証されている範囲で、動作が
可能である。また、制約の充足状態の遷移が前回と異な
った時点で記憶されたシーケンスを放棄することで、最
終的にシーケンスが終了した時に、制約が必ず充足され
た状態で停止することが保証される。
As a result, the amount of calculation is small if only the checking is executed by the constraint checking means, but it is extremely large calculation to check which unit is modified to make a transition to satisfy the constraint. Need quantity. Even if the stored sequence is used, the operation of the present invention allows the constraint checking means to check whether the satisfaction state of the constraint rule is the same as the last time the sequence was stored, so Even if different data is input, the operation can be performed within the range where the processing is semantically guaranteed by the constraint. Further, by abandoning the sequence stored at the time when the transition of the constraint satisfaction state is different from the previous time, it is guaranteed that when the sequence finally ends, the constraint always stops in the satisfied state.

【0026】[0026]

【実施例】図1は本発明の一実施例の学習型データベー
ス処理システムの構成を示すブロック図である。学習型
データベース処理システム1はデータベース保持手段1
1、制約保持手段12、制約検査手段13、ユニット選
択手段14、シーケンス記憶手段15、比較手段16よ
りなる。
1 is a block diagram showing the structure of a learning type database processing system according to an embodiment of the present invention. The learning type database processing system 1 is a database holding means 1
1, a constraint holding unit 12, a constraint checking unit 13, a unit selecting unit 14, a sequence storing unit 15, and a comparing unit 16.

【0027】データベース保持手段11は、図2に示す
ようなリレーショナルモデルによりデータを保持する。
The database holding means 11 holds data according to a relational model as shown in FIG.

【0028】制約保持手段12は、データベース保持手
段11中のタプルの有無及び、各タプル中の属性値をユ
ニット変数とする制約表現を記憶する。制約保持手段1
2に保持される制約はデータベース保持手段11のデー
タが相互に満足しなければならない意味的関係を記述し
たルールである。図4に示すルール表現としては、エキ
スパートシステム構築支援ツールで極一般的に利用され
る形式に準じるが、データ間(リレーショナルモデルの
属性間)の制約関係を記述するものであれば、どの様な
形式であっても構わない。但し、本発明では各リレーシ
ョン中にタプルが存在するか否かを調べるためのキー属
性(本実施例では社員コード)が予め指定されている事
を前提としている。キー属性は、各リレーション毎に異
なっても良い。
The constraint holding unit 12 stores the presence / absence of tuples in the database holding unit 11 and the constraint expression in which the attribute value in each tuple is a unit variable. Constraint holding means 1
The constraint held in 2 is a rule that describes the semantic relationship that the data in the database holding means 11 must satisfy each other. The rule expression shown in FIG. 4 conforms to the format generally used in the expert system construction support tool, but what kind of description can be used as long as it describes the constraint relationship between data (between attributes of the relational model)? It can be in the form. However, the present invention is premised on that a key attribute (employee code in this embodiment) for checking whether or not a tuple exists in each relation is designated in advance. The key attribute may be different for each relation.

【0029】制約検査手段13は、図4に示された制約
関係を検証する機能及び、制約が満足されていない時に
修正すべき、或いは、入力要求すべきユニットを決定
し、提示する機能を持つ。
The constraint checking means 13 has a function of verifying the constraint relationship shown in FIG. 4 and a function of deciding and presenting a unit to be corrected or input required when the constraint is not satisfied. ..

【0030】ユニット選択手段14は、制約検査手段1
3により提示された修正すべきユニットが複数ある場合
には、その中の1個を選択する。例えば、ユニット選択
手段14は制約検査手段13から以下の 「社員.タプル」を「無」に書き換える: 「単身赴任届け.タプル」を「有」に書き換える: 「社員.赴任」を「同伴」に書き換える: の3種類の選択項目が提示されたとき、ユーザにその中
の1個を選択させる。ユニット選択手段14は具体的に
は どのユニットの修正を行うべきかをユーザに提示し; ユーザが選択したユニット名称を取得し; 当該ユニットの処理をシーケンス記憶手段に伝達す
る; 等の機能を有する。なお、制約検査手段13の検査結果
により修正すべき処理が1種類だけの場合には、基本的
にはこのユニット選択手段14の動作を待つことなくデ
ータベースへの処理を実行し、シーケンス記憶手段15
にその処理内容を記憶するのみで十分である。しかし、
選択肢が1種類しかない場合でも、敢えて確認のため、
ユニット選択手段14を動作させてユーザに確認させる
ことができる。
The unit selecting means 14 is the constraint checking means 1
If there is more than one unit to be modified presented by 3, select one of them. For example, the unit selection means 14 rewrites the following "employee.tuple" from the constraint inspection means 13 to "none": "single transfer. Tuple" to "present": "employee.transfer" to "accompanied" Rewrite: When three kinds of selection items of are presented, the user is made to select one of them. The unit selection means 14 specifically has a function of presenting to the user which unit should be corrected; acquiring the unit name selected by the user; transmitting the processing of the unit to the sequence storage means; .. If there is only one type of processing to be corrected according to the inspection result of the constraint inspection means 13, basically, the processing to the database is executed without waiting for the operation of the unit selection means 14, and the sequence storage means 15 is executed.
It suffices to store the processing content in the. But,
Even if you only have one option,
It is possible to operate the unit selection means 14 and make the user confirm.

【0031】図8はユニット選択手段14の動作を説明
するための図を示す。ユーザに修正動作を選択させるた
めには、タプルの追加または削除の場合には少なくと
も、 どのタプルに対するものか; タプルの追加・消去の区別; をユーザに表示する。図8ではその情報内容をCRT2
0上に表示している。タプルの属性値に対する処理の場
合にCRT20に表示する項目には −どのタプルに対するものか; −どの属性に対するものか; −属性値が予め候補として分かっている場合にはその属
性値; 等をCRT20上に表示する。CRT20上に表示した
項目を選択する機能が要求されるため、図8において
は、これをカーソル23と、マウス24によりユーザに
選択させる。ユーザは、CRT20に表示されるメッセ
ージ領域21のメッセージのガイドにより各処理の候補
22を選択する。
FIG. 8 is a diagram for explaining the operation of the unit selecting means 14. In order to allow the user to select the corrective action, at least in the case of adding or deleting a tuple, the tuple to which the tuple is added or deleted; is displayed to the user. In FIG. 8, the information contents are displayed on the CRT2.
It is displayed above 0. Items to be displayed on the CRT 20 when processing tuple attribute values are-for which tuple; -for which attribute; -if the attribute value is known in advance as a candidate attribute value; Display on top. Since the function of selecting the item displayed on the CRT 20 is required, the user selects this with the cursor 23 and the mouse 24 in FIG. The user selects a candidate 22 for each process according to the message guide in the message area 21 displayed on the CRT 20.

【0032】シーケンス記憶手段15は、満足されてい
た制約を変化させて満足されない状態に遷移させた最初
のタプルの追加・削除の操作であるトリガに対応づけ
て、最終的に制約が再び満足されるまでの修正すべきユ
ニットシーケンスを記憶する。更に、シーケンス記憶手
段15は修正すべきユニット名称のみならず、そのユニ
ット修正後の制約ルールの充足状態を併せて記憶する。
上記の例では「社員.タプルの追加」を契機としてユー
ザが選択したシーケンス ステップ1:「社員.住所」の取得 ステップ2:「社員.住所1」の取得 ステップ3:「単身赴任届け.タプル」を「有」に書き
換える ステップ4:「社員.氏名1」の取得 ステップ5:「社員.続柄1」の取得 を記憶する。これらのステップにより制約関係は再び満
足された状態となる。以上述べた処理のシーケンスは
「社員タプルの追加」と関連づけてシーケンス記憶手段
15に記憶される。そして、再び、同一の処理である
「社員タプルの追加」が行われると、記憶されたシーケ
ンスが再現される。
The sequence storage means 15 associates with the trigger, which is an operation of adding / deleting the first tuple that changes the satisfied constraint and makes a transition to the unsatisfied state, and finally the constraint is satisfied again. The unit sequence to be corrected is stored. Further, the sequence storage unit 15 stores not only the unit name to be corrected but also the satisfaction state of the constraint rule after the unit correction.
In the above example, the sequence selected by the user when "Add Employee.tuple" is triggered Step 1: Acquire "Employee.Address" Step 2: Acquire "Employee.Address 1" Step 3: "Single employee transfer. Tuple" Is rewritten to “present” Step 4: Acquisition of “employee.name1” Step 5: Acquisition of “employee.relationship1” is stored. By these steps, the constraint relation is satisfied again. The sequence of the processing described above is stored in the sequence storage means 15 in association with “addition of employee tuple”. Then, when the same process “addition of employee tuple” is performed again, the stored sequence is reproduced.

【0033】この場合、制約検査手段13は制約の検査
のみに利用される。その結果として得られた制約ルール
の充足状態は、シーケンス記憶手段15に記憶された制
約ルールの充足状態の記録と比較手段16により比較さ
れ、それらが一致している限りはシーケンス記憶手段1
5に記憶されたシーケンスに従って処理が実行される。
このように、種々のタプルのトリガを契機として、シー
ケンス及び、制約ルールの充足状況は記憶されている必
要がある。トリガが生じたときには、トリガの種類に応
じて、記憶されたシーケンスを次々と発生していること
によりデータベースの処理を実行する。
In this case, the constraint checking means 13 is used only for checking the constraint. The resulting satisfaction state of the constraint rule is compared with the record of the satisfaction state of the constraint rule stored in the sequence storage unit 15 and the comparison unit 16, and as long as they match, the sequence storage unit 1
The process is executed according to the sequence stored in 5.
As described above, it is necessary to store the sequence and the satisfaction status of the constraint rule triggered by various tuple triggers. When a trigger is generated, the stored sequence is generated one after another according to the type of the trigger, so that the database processing is executed.

【0034】図9は本発明の一実施例のシーケンス記憶
手段15の処理を示すフローチャートである。 ステップ100; 制約が充足されていた状態から、タ
プルの追加・削除により制約が非充足状態になった時に
は先ず、シーケンス記憶領域が調べられる。シーケンス
記憶領域にタプル名及び、追加・削除の種別はすでに登
録されているかを判断し、登録されていなければステッ
プ106へ移行する。 ステップ101; 既に当該タプルの名称と当該タプル
の処理種別(追加又は、削除)が記憶されていれば、シ
ーケンスがシーケンス記憶領域に有るかを判断し、読み
出すべきシーケンスがなければ、終了する。 ステップ102; シーケンスがシーケンス領域にある
場合には、処理シーケンスを1つ読み出す。 ステップ103; 読み出されたシーケンスに従って処
理を実行し、ユニット値の変更または、ユーザからの取
得を実行する。 ステップ104; シーケンス記憶手段15に記憶され
た制約ルールの充足状態と制約ルール充足状況が比較手
段16により同一かどうかが比較され、その一致が崩れ
ない限りはシーケンスに従って処理を実行する。 ステップ105; シーケンス記憶手段15に記憶され
た制約ルールの充足状態と比較手段16により比較さ
れ、その一致が崩れている場合には、シーケンス記憶手
段15に記憶したシーケンスによる処理を中止する。 ステップ106; シーケンス記憶領域にタプル名及
び、追加・削除の種別が登録されていなければ、シーケ
ンス記憶領域の未登録の項目に、当該タプル名称及び、
「追加」「削除」の種別の登録を行う。 ステップ107; 引き続いて制約検査手段13から指
示される動作シーケンス(ユニットと制約ルールの充足
状態)を、制約が充足状態となるまで記憶する。
FIG. 9 is a flow chart showing the processing of the sequence storage means 15 of one embodiment of the present invention. Step 100; When the constraint is unsatisfied by adding / deleting tuples from the condition that the constraint is satisfied, the sequence storage area is first examined. It is determined whether the tuple name and the type of addition / deletion are already registered in the sequence storage area. If they are not registered, the process proceeds to step 106. Step 101; If the name of the tuple and the processing type (addition or deletion) of the tuple are already stored, it is determined whether the sequence exists in the sequence storage area, and if there is no sequence to be read, the process ends. Step 102; If the sequence is in the sequence area, read one processing sequence. Step 103: The processing is executed according to the read sequence to change the unit value or acquire it from the user. Step 104: Whether or not the satisfaction state of the constraint rule stored in the sequence storage unit 15 and the constraint rule satisfaction state are the same is compared by the comparison unit 16, and the process is executed according to the sequence unless the match is broken. Step 105: The satisfaction state of the constraint rule stored in the sequence storage means 15 is compared with the comparison means 16, and if the coincidence is broken, the processing by the sequence stored in the sequence storage means 15 is stopped. Step 106; if the tuple name and the type of addition / deletion are not registered in the sequence storage area, the tuple name and the
Register the types of "add" and "delete". Step 107; subsequently, the operation sequence (satisfaction state of the unit and the constraint rule) instructed by the constraint checking means 13 is stored until the constraint is in the satisfaction state.

【0035】図10は本発明の一実施例のシーケンス記
憶手段15のシーケンス記憶領域を示す。シーケンス記
憶領域はタプル名称、追加・削除の区別、シーケンス、
制約ルールの充足状態等を記憶する。同図の例では、タ
プル名称を「社員」タプル、トリガの種類を「追加」と
している。シーケンスについては、(1) 「社員」タプル
の「住所」の属性を取得し、その場合の制約ルールの充
足状態について( 偽、真偽未確定、偽) 、( 真偽未確
定、真偽未確定、真偽未確定、偽) 、( 偽、真偽未確
定、偽) 等を記憶する。
FIG. 10 shows a sequence storage area of the sequence storage means 15 according to one embodiment of the present invention. Sequence storage area is tuple name, distinction between addition and deletion, sequence,
The satisfaction state of the constraint rule is stored. In the example of the figure, the tuple name is the “employee” tuple and the trigger type is “addition”. Regarding the sequence, (1) Acquire the attribute of the "address" of the "employee" tuple, and check the satisfaction status of the constraint rule in that case (False, True / False undetermined, False) Commit, true / false undetermined, false), (false, true / false undetermined, false), etc. are stored.

【0036】以下、図10に記憶される単身赴任社員に
対してトリガとなる社員タプルの追加が行われた場合の
処理シーケンスを具体的に説明する。なお、制約ルール
の充足状態については、各ルールの充足状態を判断でき
る情報があればよく、制約が充足されているルールのみ
をシーケンス記憶手段15に記憶する。本実施例では、
ルールの真偽値が3値(真、偽、真偽未確定)あること
から制約表の各々のルール充足状態をリスト表現する方
法とする。図4と図6を用いて説明する。図4におい
て、各制約表の右側にそのルールの番号を「1a,3
b」等と示す。
The processing sequence in the case where the employee tuple serving as a trigger is added to the single-employed employee stored in FIG. 10 will be specifically described below. It should be noted that the satisfaction status of the constraint rules only needs to have information that can determine the satisfaction status of each rule, and only the rules satisfying the restrictions are stored in the sequence storage unit 15. In this example,
Since the truth value of the rule has three values (true, false, and true / false), each rule satisfaction state of the constraint table is represented by a list. This will be described with reference to FIGS. 4 and 6. In FIG. 4, the rule number is “1a, 3” on the right side of each constraint table.
b ”and the like.

【0037】先ず、シーケンス記憶手段15の学習動作
について説明する。図6のユニット変数状態に対応した
制約ルールの状態は以下の様なものである。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
真偽未確定、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真偽未確定、真偽未確定、真偽未確定、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) 次に(1) 「社員」タプルの「住所」属性が取得される。
制約ルールの充足状態には変化はない。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
真偽未確定、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真偽未確定、真偽未確定、真偽未確定、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) 次に(2) 「社員」タプルの「住所1」属性が取得され
る。この結果「赴任状況制約」の2つのルール変数「?
x」「?y」の値が確定するため、制約ルールの充足状
態には変化が生じて以下の様になる。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真、偽、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) 次に、(3) 「単身赴任」タプルの値が「有」に書き換え
られる。この結果制約ルールの充足状態は以下の様にな
る。 〔単身赴任届け制約〕 (1a,1b,1c)=(真、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真、偽、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) これにより、「単身赴任届け制約」「赴任状況制約」は
充足された(制約表を構成する複数のルールの中で、少
なくとも1個の制約が「真」となっている必要がある)
ので、残る「扶養申請制約」を満足させる必要がある。
「扶養申請制約」のルール変数の中で、「?y」「?
w」は値が確定しているため、「社員」タプルの「氏名
1」属性が獲得される。これにより以下の充足状態とな
る。 〔単身赴任届け制約〕 (1a,1b,1c)=(真、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真、偽、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、偽、偽) 「扶養申請制約」を満足させるためには、「扶養申請」
タプルの値を「有」とする必要がある。このユニット値
修正により以下の充足状態となる。 〔単身赴任届け制約〕 (1a,1b,1c)=(真、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真、偽、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(真偽未確定、偽、偽) 以下、「?z」のルール変数である「扶養申請」タプル
の「続柄1」属性が取得される。取得後の制約ルール充
足状態は以下の通りとなり、全ての制約表が充足され
る。 〔単身赴任届け制約〕 (1a,1b,1c)=(真、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真、偽、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(真、偽、偽) 上記のシーケンスはシーケンス記憶手段15に記憶され
る。
First, the learning operation of the sequence storage means 15 will be described. The states of the constraint rules corresponding to the unit variable states of FIG. 6 are as follows. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
True / False undecided, False) [Reppointment status constraint] (2a, 2b, 2c, 2d) = (True / False undetermined, True / False undetermined, True / False undetermined, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False) Next, (1) the "address" attribute of the "employee" tuple is acquired.
There is no change in the satisfaction status of the constraint rule. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
True / False undecided, False) [Reppointment status constraint] (2a, 2b, 2c, 2d) = (True / False undetermined, True / False undetermined, True / False undetermined, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False) Next, (2) the "address 1" attribute of the "employee" tuple is acquired. As a result, the two rule variables "?
Since the values of “x” and “? y” are fixed, the satisfaction state of the constraint rule is changed and becomes as follows. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
False, false) [Relocation assignment constraint] (2a, 2b, 2c, 2d) = (True, False, False, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False ) Next, (3) the value of the "single assignment" tuple is rewritten to "present". As a result, the satisfaction state of the constraint rule is as follows. [Restrictions on single-person transfer] (1a, 1b, 1c) = (true,
False, false) [Relocation assignment constraint] (2a, 2b, 2c, 2d) = (True, False, False, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False As a result, the "single assignment report constraint" and "assignment status constraint" are satisfied (at least one constraint must be "true" in the multiple rules that make up the constraint table).
Therefore, it is necessary to satisfy the remaining "restriction application restrictions".
Among the rule variables of "Dependent application restrictions", "? Y" and "?
Since the value of “w” is fixed, the “name 1” attribute of the “employee” tuple is acquired. As a result, the following satisfied state is achieved. [Restrictions on single-person transfer] (1a, 1b, 1c) = (true,
False, false) [Restriction on assignment] (2a, 2b, 2c, 2d) = (True, False, False, False) [Dependent application restriction] (3a, 3b, 3c) = (False, False, False) "Dependent In order to satisfy the “application restrictions”, “supporting application”
The tuple value must be "Yes". By this unit value correction, the following sufficiency will be achieved. [Restrictions on single-person transfer] (1a, 1b, 1c) = (true,
False, false) [Restriction on assignment status] (2a, 2b, 2c, 2d) = (true, false, false, false) [Restriction application restriction] (3a, 3b, 3c) = (true / false undetermined, false, false) ) Hereinafter, the "relationship 1" attribute of the "support application" tuple, which is the rule variable of "? Z", is acquired. The state of satisfaction of the constraint rules after acquisition is as follows, and all constraint tables are satisfied. [Restrictions on single-person transfer] (1a, 1b, 1c) = (true,
False, false) [Restriction on assignment status] (2a, 2b, 2c, 2d) = (true, false, false, false) [Restriction application constraint] (3a, 3b, 3c) = (true, false, false) The sequence is stored in the sequence storage means 15.

【0038】次に、上記のシーケンス記憶手段15の利
用動作について説明する。学習動作を行ったシーケンス
記憶手段15と同一のトリガが生じた場合の動作とし
て、別の社員に対して社員タプルが追加されたとする。
シーケンス記憶手段15(図9、図10)の動作によ
り、同一種類のタプルの追加であるため、シーケンス記
憶手段15より、シーケンスが読み出されて利用され
る。但し、今回は「社員」タプルの「住所」属性と、
「社員」タプルの「住所1」属性には同一の値(即ち、
この社員の奥さんは同居である)を投入することとす
る。
Next, the operation of utilizing the sequence storage means 15 will be described. It is assumed that an employee tuple is added to another employee as an operation when the same trigger as that of the sequence storage unit 15 that has performed the learning operation occurs.
Since the tuples of the same type are added by the operation of the sequence storage means 15 (FIGS. 9 and 10), the sequence is read from the sequence storage means 15 and used. However, this time, with the "address" attribute of the "employee" tuple,
The "address 1" attribute of the "employee" tuple has the same value (that is,
The wife of this employee lives together).

【0039】トリガとなる社員タプルの追加が行われ、
図6のユニット変数状態に対応した制約ルールの充足状
態は、以下の様なものである。この制約ルール充足状態
はシーケンス記憶手段15に記憶されている充足状態と
差異はない。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
真偽未確定、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真偽未確定、真偽未確定、真偽未確定、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) 次に、シーケンス記憶手段15に記憶されているシーケ
ンスに従い、「社員」タプルの「住所」属性が取得され
る。制約ルールの充足状態には変化は無く、これは記憶
されている制約ルールの充足状態と同一である。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
真偽未確定、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(真偽未確定、真偽未確定、真偽未確定、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) 次に、シーケンス記憶手段15に記憶されているシーケ
ンスに従い、「社員」タプルの「住所」属性が取得され
る。この結果、「赴任状況制約」の2つのルール変数
「?x」「?y」の値が確定するために、制約ルールの
充足状態には変化が生じて以下の様になる。 〔単身赴任届け制約〕 (1a,1b,1c)=(偽、
偽、偽) 〔赴任状況制約〕 (2a,2b,2c,2d) =(偽* 、真* 、偽、偽) 〔扶養申請制約〕 (3a,3b,3c) =(偽、真偽未確定、偽) この制約ルールの充足状態は、シーケンス記憶手段15
に記憶しているものとは異なる(異なる部分には*を付
加してある)。
An employee tuple that becomes a trigger is added,
The satisfied state of the constraint rule corresponding to the unit variable state of FIG. 6 is as follows. This constraint rule satisfaction state is not different from the satisfaction state stored in the sequence storage unit 15. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
True / False undecided, False) [Reppointment status constraint] (2a, 2b, 2c, 2d) = (True / False undetermined, True / False undetermined, True / False undetermined, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False) Next, according to the sequence stored in the sequence storage unit 15, the "address" attribute of the "employee" tuple is acquired. There is no change in the satisfaction status of the constraint rule, which is the same as the stored satisfaction status of the constraint rule. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
True / False undecided, False) [Reppointment status constraint] (2a, 2b, 2c, 2d) = (True / False undetermined, True / False undetermined, True / False undetermined, False) [Dependent application constraint] (3a, 3b, 3c) = (False, True / False undetermined, False) Next, according to the sequence stored in the sequence storage unit 15, the "address" attribute of the "employee" tuple is acquired. As a result, since the values of the two rule variables “? X” and “? Y” of the “assignment status constraint” are determined, the satisfaction state of the constraint rule changes and the following occurs. [Restrictions on single-person transfer] (1a, 1b, 1c) = (False,
False, false) [Restriction on assignment status] (2a, 2b, 2c, 2d) = (False * , True * , False, False) [Dependent application restriction] (3a, 3b, 3c) = (False, True / False undetermined) , False) The satisfaction state of this constraint rule is the sequence storage means 15
It is different from the one stored in (the different parts are marked with *).

【0040】図9のフローチャートにおいて比較手段1
6により、この不一致が検出される。その結果、従来の
技術とは異なり、不一致となった段階で、シーケンス記
憶手段15のシーケンスの利用が放棄される。さらに、
制約検査手段13により、複数の修正すべきユニットの
候補が提示され、ユニット選択手段14により、その一
つをユーザに選択させる学習動作に動作が戻る。もし、
比較手段16を用いずに、そのまま処理を続けると本来
は単身赴任でない社員に対して単身赴任届けを提出して
も、その単身赴任先の住所が奥さんの住所と同一である
という矛盾する現象を生じる。
Comparison means 1 in the flow chart of FIG.
This mismatch is detected by 6. As a result, unlike the conventional technique, the use of the sequence in the sequence storage means 15 is abandoned at the stage of mismatch. further,
The constraint checking unit 13 presents a plurality of candidate units to be modified, and the unit selecting unit 14 returns the operation to the learning operation for allowing the user to select one of them. if,
If the processing is continued without using the comparison means 16, even if a single transfer notification is submitted to an employee who is not originally transferred, the inconsistent phenomenon that the address of the single transfer destination is the same as the wife's address. Occurs.

【0041】なお、シーケンス記憶手段15のシーケン
ス記憶領域は通常のRAM領域に確保してもよく、専用
のハードウェアで表現してもよい。
The sequence storage area of the sequence storage means 15 may be secured in a normal RAM area or may be represented by dedicated hardware.

【0042】なお、本実施例ではシーケンス記憶手段1
5に記憶する情報は制約が充足しているルールのみを記
憶する方法を説明したが、その逆として制約が充足され
ていないルールを記憶する方法も考えられる。
In this embodiment, the sequence storage means 1
Although the information stored in 5 stores only the rules satisfying the constraints, a method of storing the rules not satisfying the constraints may be conversely considered.

【0043】[0043]

【発明の効果】上記のように本発明によれば、宣言的に
表現された知識のみを用いて、データベース処理を実現
するため、プログラム作成が簡便であり、しかも、同種
のタプルの追加・更新・削除等が行われた時には、短時
間でのデータベース処理が可能となり、意味的に誤りの
ある処理を防止することができる。
As described above, according to the present invention, the database processing is realized by using only the declaratively expressed knowledge, so that the program creation is simple and the addition / update of the tuples of the same kind is performed. -When deletion or the like is performed, database processing can be performed in a short time, and semantically erroneous processing can be prevented.

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

【図1】本発明の一実施例の学習型データベース処理シ
ステムの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a learning database processing system according to an embodiment of the present invention.

【図2】リレーションの例を示す図である。FIG. 2 is a diagram showing an example of a relation.

【図3】ユニットの例を示す図である。FIG. 3 is a diagram showing an example of a unit.

【図4】制約の例を示す図である。FIG. 4 is a diagram showing an example of constraints.

【図5】初期状態のユニット値を示す図である。FIG. 5 is a diagram showing a unit value in an initial state.

【図6】社員タプル取得後のユニット値を示す図であ
る。
FIG. 6 is a diagram showing a unit value after acquisition of an employee tuple.

【図7】データ取得後のユニット値を示す図である。FIG. 7 is a diagram showing a unit value after data acquisition.

【図8】ユニット選択手段を説明するための図である。FIG. 8 is a diagram for explaining unit selection means.

【図9】本発明の一実施例のシーケンス記憶手段の処理
を示すフローチャートである。
FIG. 9 is a flowchart showing a process of a sequence storage means according to an embodiment of the present invention.

【図10】本発明の一実施例のシーケンス記憶手段のシ
ーケンス記憶領域を示す図である。
FIG. 10 is a diagram showing a sequence storage area of a sequence storage means according to an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 学習型データベース処理システム 11 データベース保持手段 12 制約保持手段 13 制約検査手段 14 ユニット選択手段 15 シーケンス記憶手段 16 比較手段 20 CRT 21 メッセージ領域 22 処理の候補 23 カーソル 24 マウス 1 Learning Type Database Processing System 11 Database Holding Means 12 Constraint Holding Means 13 Constraint Checking Means 14 Unit Selecting Means 15 Sequence Storage Means 16 Comparing Means 20 CRT 21 Message Area 22 Processing Candidate 23 Cursor 24 Mouse

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 リレーショナルデータベースモデルに基
づいてデータベースを記憶するデータベース保持手段
と、 前記データベース保持手段に記憶されているタプルの有
無及び、該タプル毎の属性値をユニット変数とする制約
表現を記憶する制約保持手段と、 前記データベースに対する前記制約表現の関係が充足す
るかを検査して、前記制約表現の関係が非充足の場合
に、1個、又は複数個の修正すべきユニットを提示する
制約検査手段と、 前記制約検査手段で指定された前記修正すべきユニット
が複数個あるときに、該ユニットから1個のユニットを
選択するユニット選択手段と、 前記制約表現の関係が充足していたデータベース状態を
最初に非充足に遷移させた最初のタプルを前記データベ
ース保持手段に追加又は削除を行うトリガに対応させ
て、最終的に前記制約表現の関係が充足するまでの修正
すべきユニット及び、制約中の各制約ルールの充足状態
をシーケンスとして記憶するシーケンス記憶手段と、 前記シーケンス記憶手段に記憶された前記制約ルールの
充足状態のシーケンスと、前記制約検査手段により提示
された制約ルールの充足状態とを比較する比較手段とを
有し、 前記トリガを契機として、前記制約検査手段により修正
すべきユニットを提示させ、該修正すべきユニットが1
つの場合には該ユニットを、修正すべきユニットが複数
の場合には前記ユニット選択手段により選択されたユニ
ットを各制約ルールの充足状態と共に前記シーケンス記
憶手段に記憶し、 前記トリガと同一動作が再度行われたときには、前記比
較手段により比較結果が一致している場合には、前記シ
ーケンス記憶手段に記憶されているユニットシーケンス
に従って前記データベース保持手段を修正することを特
徴とする学習型データベース処理システム。
1. A database holding means for storing a database based on a relational database model, presence / absence of tuples stored in the database holding means, and a constraint expression having an attribute value for each tuple as a unit variable are stored. A constraint check that checks whether the constraint holding unit and the constraint expression with respect to the database are satisfied, and presents one or more units to be modified when the constraint expression has a non-satisfied relationship. Means, a unit selecting means for selecting one unit from the units when there are a plurality of units to be modified designated by the constraint checking means, and a database state satisfying the relation of the constraint expression Is used as a trigger for adding or deleting the first tuple that first transits to unsatisfied Accordingly, a unit to be corrected until the relation of the constraint expressions is finally satisfied, and a sequence storage unit that stores the satisfaction state of each constraint rule in the constraint as a sequence, and the unit stored in the sequence storage unit. A sequence of satisfaction states of the constraint rule and a comparing unit for comparing the satisfaction state of the constraint rules presented by the constraint checking unit are provided, and the unit to be corrected by the constraint checking unit is triggered by the trigger. To be presented and the unit to be modified is 1
If the number of units to be modified is more than one, the unit selected by the unit selection unit is stored in the sequence storage unit together with the satisfaction state of each constraint rule, and the same operation as the trigger is performed again. The learning type database processing system is characterized in that, when the comparison result is matched by the comparing means, the database holding means is modified according to the unit sequence stored in the sequence storing means.
JP3231964A 1991-09-11 1991-09-11 Learning type data base processing system Pending JPH0573623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3231964A JPH0573623A (en) 1991-09-11 1991-09-11 Learning type data base processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3231964A JPH0573623A (en) 1991-09-11 1991-09-11 Learning type data base processing system

Publications (1)

Publication Number Publication Date
JPH0573623A true JPH0573623A (en) 1993-03-26

Family

ID=16931813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3231964A Pending JPH0573623A (en) 1991-09-11 1991-09-11 Learning type data base processing system

Country Status (1)

Country Link
JP (1) JPH0573623A (en)

Similar Documents

Publication Publication Date Title
US7076778B2 (en) Method and apparatus for upgrading a software application in the presence of user modifications
US5717924A (en) Method and apparatus for modifying existing relational database schemas to reflect changes made in a corresponding object model
US7165078B2 (en) Collaborative data cleansing
US7028057B1 (en) Versioned relational database system with an optimistic constraint model
US6185556B1 (en) Method and apparatus for changing temporal database
US7921330B2 (en) Data migration manager
EP0978061B1 (en) Object graph editing context and methods of use
KR940002344B1 (en) Method and apparatus for maintaining referential integrity within a relational data base
JP2710555B2 (en) System and method for automating the enforcement of constraints in a database
JPH0652531B2 (en) Relay database management system
JPS61170842A (en) Updating of snap shot table for related database system
KR20010012305A (en) System and method for storing and manipulating data in an information handling system
US20050010606A1 (en) Data organization for database optimization
WO1997003406A9 (en) Method and apparatus for modifying existing relational database schemas to reflect changes made in a corresponding object model
US20070233925A1 (en) Centralized management of data nodes
US20070156746A1 (en) Information management system and method
JP2009512937A (en) Updating information in the Interlocking Trees data store
US11176022B2 (en) Health diagnostics and analytics for object repositories
US8078550B2 (en) Self learning to support navigation to correct an inconsistent property
JPH0573623A (en) Learning type data base processing system
JPH064383A (en) Method and system for managing data base
JPH0567158A (en) Lerning type data base processing system
JPH1153391A (en) Database access method
JPH07295868A (en) Integrity constraint control method for
JPH05225252A (en) Learning data base processing system