JPS63172334A - Data processing system for data base system - Google Patents

Data processing system for data base system

Info

Publication number
JPS63172334A
JPS63172334A JP427387A JP427387A JPS63172334A JP S63172334 A JPS63172334 A JP S63172334A JP 427387 A JP427387 A JP 427387A JP 427387 A JP427387 A JP 427387A JP S63172334 A JPS63172334 A JP S63172334A
Authority
JP
Japan
Prior art keywords
record
child
stored
key value
child 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
JP427387A
Other languages
Japanese (ja)
Inventor
Shunji Ishii
石井 俊次
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP427387A priority Critical patent/JPS63172334A/en
Publication of JPS63172334A publication Critical patent/JPS63172334A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To search the storing position of a relevant slave record in a short time by starting storage of slave records at and after the record that is stored previously by a step when new slave records and stored. CONSTITUTION:The slave records 2-5 belonging to a master record 1 are stored in a data base in accordance with the order of keys of the records 2-5. When a slave record 6 having key value 250 is stored, a data pointer 7 is first produced in a memory and the key value of the slave record stored previously by a step is recorded to the pointer 7. Then it is decided whether the record 6 belongs or not to the master record 1 to which the slave record stored previously by a step belongs. If so, the value of the pointer 7 is compared with the key value of the record 6. The storage of slave data is started at and after the one stored previously by a step based on the result of said comparison. Thus the storing position of the record 6 is searched.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は計算機のソフトウェアのネットワーク型デー
タベースシステムのデータ処理方式、特に格納管理方式
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing method of a network type database system for computer software, and particularly to a storage management method.

〔従来の技術〕[Conventional technology]

一般に、データベースにおいて、親子築台型は、親の一
つのレコードに別の任意個数の子のレコードを関連づけ
て実体集合群を形成している。子のレコードはその属性
に対応したレコードキーを備えているが、記憶装置内で
はレコードキーの順番に並んでいるわけではない。従っ
であるレコードキーの値を指定して、その「次の」とい
っても意味がない。これが意味をもつためにはレコード
キーに順序も指定して、レコード順序キーにしなければ
ならない。そうすると、子レコードは、あたかも物理的
にこのレコード順序キーの値の順番に並んでいるかのよ
うに呼び出される。順序は昇順。
Generally, in a database, a parent-child building block forms an entity set group by associating one parent record with an arbitrary number of child records. Child records have record keys corresponding to their attributes, but they are not arranged in the order of record keys in the storage device. Therefore, there is no meaning in specifying a record key value and calling it "next." For this to have any meaning, the record key must also specify an order, making it a record order key. Then, the child records are called as if they were physically arranged in the order of the values of this record order key. The order is ascending.

値の大きいもの順と降順、値の小さなもの順があり、こ
れは記憶装置内での論理的な順番を定めるものである。
There is an order of large values, a descending order, and an order of small values, and these determine the logical order within the storage device.

このように、J1算機の記憶装置に昇順に子レコードを
格納する方法には、従来以下に示す方法があった。
As described above, there are conventional methods for storing child records in ascending order in the storage device of the J1 computer as described below.

第3図は親レコードlに子レコードの最小データアイテ
ムの昇順に子レコードを格納しているネットワーク型デ
ータベースを示す。このデータベースには親レコード1
に属するキー値100を持つ子レコード2、キー値20
0を持つ子レコード3、キー値300を持つ子レコー1
” 4及びキー値400を持つ子レコード5が夫々レコ
ード順序キーに従ってずでに格納されており、新たにキ
ー値250を持つ子レコード6を格納しようとするとき
の図である。
FIG. 3 shows a network type database in which child records are stored in a parent record l in ascending order of the smallest data item of the child records. This database has parent record 1
Child record 2 with key value 100 belonging to , key value 20
Child record 3 with 0, child record 1 with key value 300
4 and a child record 5 having a key value of 400 have already been stored according to the record order keys, and a new child record 6 having a key value of 250 is to be stored.

以下の動作はデータベースを管理する計算機によって処
理されている。子レコード6を格納する論理的な位置を
見つけるために、最初に所属する親レコード1を見つけ
、jJlレコードから最初の子レコード2を見つける。
The following operations are processed by the computer that manages the database. In order to find the logical position to store the child record 6, first find the parent record 1 to which it belongs, and then find the first child record 2 from the jJl record.

そしてそのレコードのキーの値100と格納しようとす
る子レコード6のキーの値250とを比較し、子レコー
ド6が親レコード1と最初の子レコード2の間に入るか
調べる。子レコード2のキー値より大きいので、次に子
レコード2から3を見つけ、子レコード3のキー値20
0と子レコード6のキー値250とを比較し、子レコー
ド2と3の間に入るか調べる。子レコード3のキー値よ
り大きいので、その次に子レコード3から4を見つけ、
子レコード4のキー値300と6のキー値250とを比
較し、子レコード3と4の間に入ることを調べる。子レ
コード4のキー値より小さいので格納位置を見つけたこ
とになり、子レコード3の次にキー値250の子レコー
ド6を格納する。
Then, the key value 100 of that record is compared with the key value 250 of the child record 6 to be stored, and it is determined whether the child record 6 falls between the parent record 1 and the first child record 2. Since it is larger than the key value of child record 2, next find child records 2 to 3 and set the key value of child record 3 to 20.
0 and the key value 250 of child record 6 to see if it falls between child records 2 and 3. Since it is larger than the key value of child record 3, next find child records 3 to 4,
The key value 300 of child record 4 is compared with the key value 250 of child record 6, and it is determined that the key value is between child records 3 and 4. Since the key value is smaller than the key value of child record 4, a storage position has been found, and child record 6 with key value 250 is stored next to child record 3.

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

従来の子レコードの格納方式では以上のように行われて
いたので、常に親レコードから順にサーチして行き、格
納する論理的な位置を見つけなければならなかった。こ
のため順に子レコードをサーチするのに要する時間が長
くかかるという問題点があった。
In the conventional storage method for child records, as described above, it was necessary to always search in order starting from the parent record to find the logical position to store it. Therefore, there is a problem in that it takes a long time to sequentially search child records.

この発明は上記のような問題点を解消するためになされ
たもので、格納する論理的な位置を見つけるための子レ
コードのサーチ方法を最適化し、短時間で格納位置を見
つけることができることを目的とする。
This invention was made to solve the above-mentioned problems, and the purpose is to optimize the search method for child records to find a logical storage location, so that the storage location can be found in a short time. shall be.

C問題点を解決するための手段〕 この発明においては、同一親レコードに属する複数の子
レコードをレコード順序キーの昇順又は降順に記憶装置
に格納するデータベースシステムに8いて、記憶装置に
データポインタ7を生成する段階(ステップSl)と、
このデータポインタ7に一つ前に格納した子レコードの
キー値を記録する段階(ステップS2)と、一つ前に格
納した子レコードと今格納しようとする子レコードとが
同一親レコードに属するかどうか判断する段階(ステッ
プS3)と、該一つ前の子レコードのキー値と今格納し
ようとする子レコードのキー値とを比較する段階(ステ
ップS6)と、該一つ前の子レコードから開始して今格
納しようとする子レコードの位置をサーチする段階(ス
テップS7)とを備えた。
Means for Solving Problem C] In the present invention, a database system 8 stores a plurality of child records belonging to the same parent record in a storage device in ascending or descending order of record order keys, and a data pointer 7 is provided in the storage device. a step of generating (step Sl);
The step of recording the key value of the previously stored child record in this data pointer 7 (step S2), and whether the previously stored child record and the child record to be stored now belong to the same parent record. a step of determining whether or not to store the data (step S3), a step of comparing the key value of the previous child record with the key value of the child record to be stored now (step S6), and a step of comparing the key value of the previous child record with the key value of the child record to be stored now and a step of searching for the position of the child record to be stored now (step S7).

〔作用〕[Effect]

一つ前に格納した子レコード3と今格納しようとする子
レコード6とか同一23Lレコード1に属し、かつ一つ
前に格納した子レコード3のキー値よりも今格納しよう
とする子レコード6のキー値が大きい場合は、一つ前に
格納した子レコード3から開始して格納位置をサーチす
る。従ってサーチに要する時間を最小にすることができ
る。
Child record 3 stored before and child record 6 to be stored now belong to the same 23L record 1, and the key value of child record 6 to be stored now is higher than the key value of child record 3 stored before. If the key value is large, the storage position is searched starting from the child record 3 that was stored immediately before. Therefore, the time required for searching can be minimized.

以下、この発明の一実施例を図について説明する。第1
図において、データベースには、親レコード1に属する
キーの値100の子レコード2、キーの値200の子レ
コード3、キーの値300の子レコード4、キーの値4
00の子レコード5が夫々レコード順序キーに従ってす
でに格納されている。而して今、一つ前に格納された子
レコードを3とし、現在格納しようとしているキー値2
50を持つ子レコードを6とする。又計算機はそのメモ
リ空間上にデータポインタ7を作成し、一つ前に格納さ
れた子レコード3のキー値、200を記憶するようにす
る。
An embodiment of the present invention will be described below with reference to the drawings. 1st
In the figure, the database includes child record 2 with a key value of 100 belonging to parent record 1, child record 3 with a key value of 200, child record 4 with a key value of 300, and child record 4 with a key value of 4.
Child records 5 of 00 have already been stored according to their respective record order keys. So now, the child record that was stored before is set to 3, and the key value that is currently being stored is set to 2.
Let the child record with 50 be 6. The computer also creates a data pointer 7 in the memory space, and stores the key value 200 of the child record 3 stored immediately before.

第3図のフローチャートに示ずようにネットワーク型デ
ータベースにおいて、データけん索のため新しくデータ
を格納するとき、そのデータが関係する1つの親レコー
ドに関係づけられているすべての子レコードを子レコー
ドのアイテムの値の昇順または降順にならべるものとす
る。
As shown in the flowchart in Figure 3, when new data is stored for data retrieval in a network type database, all child records related to one parent record to which the data is related are The items shall be arranged in ascending or descending order of value.

動作フローは計算機に今から格納する子レコード6のキ
ー値250を人力してスタートすめテップSlでは記憶
装置内にデータポインタ7を生成し、ステップS2では
一つ前に格納した子レコード3のキー値300をデータ
ポインタ7に記録する。ステップS3ではこの子レコー
ド6が一つ前に格納した子レコード3と同じ親レコード
lに属するかどうか判断する。別の親レコードに属する
ならステップS4に進み、該別の親レコードを見つけそ
こに位置づける。この場合はデータポインタ7の値は参
照されないのでステップS5に進み親レコードから順に
子レコードをサーチして行き、格納する論理的な位置を
見つける。
The operation flow starts by manually inputting the key value 250 of the child record 6 to be stored in the computer.In step SL, a data pointer 7 is generated in the storage device, and in step S2, the key value of the child record 3 stored previously is generated. Record the value 300 in data pointer 7. In step S3, it is determined whether this child record 6 belongs to the same parent record l as the previously stored child record 3. If it belongs to another parent record, the process advances to step S4, where the other parent record is found and positioned there. In this case, since the value of the data pointer 7 is not referenced, the process proceeds to step S5, and child records are searched in order from the parent record to find a logical storage location.

一方、ステップS3で一つ前に格納した子レコード3と
同じ親レコード1に属する場合はステップS6に進む。
On the other hand, if it belongs to the same parent record 1 as the previously stored child record 3 in step S3, the process advances to step S6.

ここではデータポインタ7の値200と子レコード6の
キー値250とを比較し、格納する子レコード6のキー
値が大きいので、子レコード3の後に位置することを判
断し、ステプ7”S7に進む。ここでは一つ前の子レコ
ード3と子レコード4との間に子レコード6が入るかど
うか調べ子レコード6の位置を捜す。子レコード6のキ
ー値250は、キー値200より大きく、キー 値30
0より小さいので子レコード3と4の間が格納位置であ
る。子レコード6が格納位置に格納されると、データポ
インタ7の値が250に更新される。
Here, the value 200 of the data pointer 7 and the key value 250 of the child record 6 are compared, and since the key value of the child record 6 to be stored is large, it is determined that it will be located after the child record 3, and the process proceeds to step 7''S7. Proceed. Here, the position of child record 6 is searched to see if child record 6 is between the previous child record 3 and child record 4. The key value 250 of child record 6 is greater than the key value 200, key value 30
Since it is smaller than 0, the storage position is between child records 3 and 4. When the child record 6 is stored in the storage position, the value of the data pointer 7 is updated to 250.

一方ステップS6で、たまたまデータポインタ7の値が
、格納しようとする子レコードのキー値より小さい場合
は、一つ前に格納された子レコードより前の位置なので
ステップS5に進む。ここでは、少なくとも格納位置は
親レコード1と一つ前に格納された子レコードとの間に
あることが判別されるので、親レコード1から開始して
一つ前に格納した子レコードまでの間を順にサーチする
On the other hand, in step S6, if the value of the data pointer 7 happens to be smaller than the key value of the child record to be stored, the process proceeds to step S5 since the position is before the child record stored immediately before. Here, it is determined that at least the storage position is between parent record 1 and the previously stored child record, so the range from parent record 1 to the previously stored child record is Search in order.

このようにして、その格納する論理的な位置を見つける
ために、一つ前に格納した子レコードの属している親レ
コードと、データポインタにより一つ前に格納した子レ
コードのキーの値を利用することによって、常に親レコ
ードから捜す必要は無く、一つ前に格納された子レコー
ドより捜すことが可能となった。かつ高速化できる場合
は一つ前に格納された子レコードの論理的な位置を利用
するようにした。
In this way, in order to find the logical location to store it, we use the parent record to which the previously stored child record belongs and the key value of the previously stored child record using the data pointer. By doing this, it is no longer necessary to always search from the parent record, but it is now possible to search from the previously stored child record. And if it can be done faster, the logical position of the previously stored child record is used.

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

以上説明してきたように、この発明によれば、記憶装置
にデータポインタを生成する段階と、このデータポイン
タに一つ前に格納した子レコードのキー値を記録する段
階と、一つ前に格納した子レコードと今格納しようとす
る子レコードとが同一親レコードに属するかどうか判断
する段階と、該一つ前の子レコードのキー値と今格納し
ようとする子レコードのキー値とを比較する段階と、該
一つ前の子レコードから開始して今格納しようとする子
レコードの位置をサーチする段階とを備えたので、論理
的な格納位置を見つけるために一つ前に格納されたデー
タを可能な限り使用することができ、レコードの格納処
理を最適化すると共に高速化する効果がある。
As explained above, according to the present invention, there are a step of generating a data pointer in a storage device, a step of recording the key value of a previously stored child record in this data pointer, and a step of recording a key value of a previously stored child record in this data pointer. The step of determining whether the child record that was created and the child record that is about to be stored belongs to the same parent record, and the key value of the previous child record and the key value of the child record that is about to be stored are compared. step, and a step of searching for the position of the child record to be stored now, starting from the previous child record, so in order to find the logical storage position, the previously stored data is searched. can be used as much as possible, which has the effect of optimizing and speeding up the record storage process.

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

第1図は本発明が実施されるファイルの構成図、第2図
はその動作を説明するフローチャート、第3図は従来の
ファイルの構成図である。 1・・・親レコード、2〜6・・・子レコード、7・・
・データポインタ。
FIG. 1 is a configuration diagram of a file in which the present invention is implemented, FIG. 2 is a flowchart explaining its operation, and FIG. 3 is a configuration diagram of a conventional file. 1...Parent record, 2-6...Child record, 7...
・Data pointer.

Claims (1)

【特許請求の範囲】 同一親レコードに属する複数の子レコードをレコード順
序キーの昇順又は降順に記憶装置に格納するデータベー
スシステムにおいて、 前記記憶装置にデータポインタを生成する段階と、この
データポインタに一つ前に格納した子レコードのキー値
を記録する段階と、前記一つ前に格納した子レコードと
今格納しようとする子レコードとが前記同一親レコード
に属するかどうか判断する段階と、該一つ前の子レコー
ドのキー値と今格納しようとする子レコードのキー値と
を比較する段階と、該一つ前の子レコードから開始して
今格納しようとする子レコードの位置をサーチする段階
とを備えたことを特徴とするデータベースシステムのデ
ータ処理方式。
[Scope of Claims] A database system in which a plurality of child records belonging to the same parent record are stored in a storage device in ascending or descending order of record order keys, comprising the steps of: generating a data pointer in the storage device; recording the key value of the most recently stored child record; determining whether the previously stored child record and the child record to be stored now belong to the same parent record; A step of comparing the key value of the previous child record with the key value of the child record to be stored now, and a step of searching for the position of the child record to be stored now starting from the previous child record. A data processing method for a database system, characterized by comprising:
JP427387A 1987-01-12 1987-01-12 Data processing system for data base system Pending JPS63172334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP427387A JPS63172334A (en) 1987-01-12 1987-01-12 Data processing system for data base system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP427387A JPS63172334A (en) 1987-01-12 1987-01-12 Data processing system for data base system

Publications (1)

Publication Number Publication Date
JPS63172334A true JPS63172334A (en) 1988-07-16

Family

ID=11579931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP427387A Pending JPS63172334A (en) 1987-01-12 1987-01-12 Data processing system for data base system

Country Status (1)

Country Link
JP (1) JPS63172334A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62157937A (en) * 1985-12-28 1987-07-13 Usac Electronics Ind Co Ltd Color printing control system
JPS62204949A (en) * 1986-03-06 1987-09-09 Casio Comput Co Ltd Word processor with multicolor printing function
JPS62221564A (en) * 1986-03-24 1987-09-29 Canon Inc Information output device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62157937A (en) * 1985-12-28 1987-07-13 Usac Electronics Ind Co Ltd Color printing control system
JPS62204949A (en) * 1986-03-06 1987-09-09 Casio Comput Co Ltd Word processor with multicolor printing function
JPS62221564A (en) * 1986-03-24 1987-09-29 Canon Inc Information output device

Similar Documents

Publication Publication Date Title
EP1393206B1 (en) Data structure for information systems
JP3552339B2 (en) Database system
JPH06215037A (en) Automatic updating device for index
JPS63172334A (en) Data processing system for data base system
JPH04340163A (en) Keyword retrieval system
JPH0782429B2 (en) How to merge multiple files
JPH07152615A (en) Data base reorganization system
JPH10240741A (en) Managing method for tree structure type data
JPH113354A (en) Data cube control system
JPH0934906A (en) Book management device
JPH0456344B2 (en)
JPH06149635A (en) Method for additional processing of record
JPH11306183A (en) Data base retrieval system
JPH01248233A (en) Data base retrieving device
JP2003330957A (en) Set attribute retrieval system, method, and program
JP3085251B2 (en) Database device, search method therefor, and recording medium recording search program for searching database device by computer
JP2785966B2 (en) Foreign key dynamic resolution processing method
CN116263793A (en) Reverse order retrieval method, device, equipment and storage medium
JPH02259942A (en) Data base generation management processing system
JPH06214849A (en) Data base system
JPH04230576A (en) Method for retrieving record
JP2002304403A (en) Method and system for managing database, process program thereof and recording medium for storing process program thereof
JPH117402A (en) Method for processing data
JPH09330322A (en) Data retrieval device
JPH04199338A (en) Data base management system