[go: up one dir, main page]

JPS63318628A - Horizontally dividing system for data base - Google Patents

Horizontally dividing system for data base

Info

Publication number
JPS63318628A
JPS63318628A JP62155731A JP15573187A JPS63318628A JP S63318628 A JPS63318628 A JP S63318628A JP 62155731 A JP62155731 A JP 62155731A JP 15573187 A JP15573187 A JP 15573187A JP S63318628 A JPS63318628 A JP S63318628A
Authority
JP
Japan
Prior art keywords
page
stored
tuple
relation
disk device
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.)
Granted
Application number
JP62155731A
Other languages
Japanese (ja)
Other versions
JPH0782451B2 (en
Inventor
Tatsuo Minohara
箕原 辰夫
Shunichiro Nakamura
俊一郎 中村
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 JP62155731A priority Critical patent/JPH0782451B2/en
Priority to US07/206,324 priority patent/US5058002A/en
Priority to GB08814848A priority patent/GB2207264A/en
Priority to DE3821551A priority patent/DE3821551C2/en
Publication of JPS63318628A publication Critical patent/JPS63318628A/en
Publication of JPH0782451B2 publication Critical patent/JPH0782451B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To contrive the equalization of the number of tuples stored in a disk device automatically, by dividing a page into two, when tapple storing pages are full, storing the tuple in one of them, and sending one page to the disk device having the smallest number of pages. CONSTITUTION:It is assumed that a tuple in which key values of an integer value are between 1-100 is stored in a page 3c in a disk device 2e. In case of storing the tuple having a key value of the key values between 1-100, in this page 3c, since the page in full, it is divided into two. Subsequently, the tuple having a key value between 1-50 is stored in the original page 3c, and the tuple having a key value between 51-100 is stored in the other page 3d. A disk 2f is constituted of the tuple of a relation to which its tuple selected in order to store a page 3d belongs, and its number of pages is the smallest. After the page has been divided, a clustered index is reorganized, an operation for determining the disk device to be stored, and the page is repeated, and unless the page is full, the tuple is stored in the determined page.

Description

【発明の詳細な説明】 r産業上の利用分野〕 この発明ハ、リレーショナルデータベース管理システム
におけるデータベースの格納方式に関する本のである。
[Detailed Description of the Invention] r Industrial Application Field] This invention is a book related to a database storage method in a relational database management system.

(従来の技術〕 リレーシロナルデータベース管理システムにおいて、デ
ータベースは第3図に示したような表の集まりである。
(Prior Art) In a relay serial database management system, a database is a collection of tables as shown in FIG.

個々の表はリレーション(5)と呼ばれ9表の各項目は
アトIJビュート(6)、各アトリビユートに実際にデ
ータが入った1つのレコードはダブル(7)と呼ばれる
Each table is called a relation (5), each item in the nine tables is called an atto IJ butte (6), and one record that actually contains data in each attribute is called a double (7).

次に、第4図に示すような複数のデータ処理装置i 1
8al〜(8d)がネッ°トワーク(9)を介して、複
数のディスク装置12g)〜(2j)に接続されている
ようなシステム上で動作するリレーシロナルデータベー
ス管理システムにおいて、1つのりレーションを複数の
ディスク装置(2g)〜(2J)に分割して格納してお
けば、複数のデータ処理装置t8aJ 〜18d) J
’t 、並列にディスク装置12g) 〜12j)に格
納されているリレーションのデータにアクセスすること
ができる。このとき、リレーシヲンをダブル単位で横に
分割1.ていくことを水平分割化と呼ぶ。
Next, a plurality of data processing devices i 1 as shown in FIG.
In a relay serial database management system that operates on a system in which disk devices 8al to 8d are connected to a plurality of disk devices 12g) to 2j via a network (9), one By dividing and storing data in multiple disk devices (2g) to (2J), multiple data processing devices t8aJ to 18d) J
't, relation data stored in the disk devices 12g) to 12j) can be accessed in parallel. At this time, divide the relation horizontally into double units.1. This process is called horizontal partitioning.

この水平分割化において、格納するりレーションがクラ
スタードインデックスを有していない場合は、各ダブル
を挿入する際、その時点で一番少ない量のダブルを保持
しているディスク装置へそのダブルを格納すれば、その
リレーションに対して各ディスク装置が持つダブルの量
がほぼ均等になるような形でリレーションを格納してお
くことができる。
In this horizontal partitioning, if the storage partition does not have a clustered index, when each double is inserted, it is stored in the disk device that holds the least amount of doubles at that time. Then, the relation can be stored in such a way that the amount of doubles that each disk device has for that relation is approximately equal.

このように均等にリレーションを分割すると、複数のデ
ータ処理装置(8a)〜(8d)が、各ディスク装置(
2g)〜(2j)から、 11は等しい時間でデータを
読み込むことができるので、あるデータ処理装置がデー
タを既に読み終ってしまったのに、他のデータ処理装置
がまだデータを読み終わっていないということがなくな
り、処理速度が向上できる。
If the relations are divided equally in this way, a plurality of data processing devices (8a) to (8d) will be divided into each disk device (8a) to (8d).
From 2g) to (2j), 11 can read data in equal time, so even if one data processing device has already finished reading the data, another data processing device has not finished reading the data yet. This eliminates this problem, and the processing speed can be improved.

r発明が解決しようとする問題点〕 従来の水平分割化方式は以上のように構成されているが
、これはクラスタードインデックスを持っていないリレ
ーションに対する分割化方式なので、クラスタードイン
デックスを持つリレーションを分割化することができず
、クラスタードインデックスを利用することによって。
Problems to be Solved by the Invention] The conventional horizontal partitioning method is configured as described above, but since this is a partitioning method for relations that do not have a clustered index, By using a clustered index, which cannot be partitioned.

リレーション内のダブルに高速にアクセスすることがで
きるような処理を実現することができないという問題点
があった。
There is a problem in that it is not possible to implement processing that allows high-speed access to doubles within a relation.

この発明は、上記のような問題点を解消するためになさ
れたもので、クラスタードインデックスを持つリレーシ
ョンを、均等に分割できるようなデータベースの水平分
割化方式を得ることを目的としている。
This invention was made to solve the above-mentioned problems, and aims to provide a horizontal database partitioning method that can evenly partition relations with clustered indexes.

(問題点を解決するための手段〕 この発明に係るデータベースの水平分割化方式は、B−
treeで構成されるクラスタードインデックスを持つ
リレーションを、複数のディスク装置に格納するとき罠
、ディスク装置内の物理的なページがそのリレーション
のダブルによって酒杯になったとき、そのページを2つ
に分割させて9分割したページのうち片方のページヲ、
ソのリレーションに対するダブルを保持するページが一
番少ないディスク装置に格納することによって、データ
ベースの水平分割を均等に行なえるようにしたものであ
る。
(Means for Solving the Problems) The database horizontal partitioning method according to the present invention is B-
This is a trap when storing a relation with a clustered index consisting of a tree on multiple disk devices, and when a physical page in the disk device becomes a cup due to the double of that relation, the page is divided into two. One of the pages divided into 9 parts,
The database can be evenly divided horizontally by storing the pages that hold doubles for each relation in the disk device that has the least number of pages.

〔作用〕[Effect]

この発明におけるデータベースの水平分割化方式は、ク
ラスタードインデックスを持つリレーションのダブルを
ディスク装置に格納する際、そのダブルを格納するペー
ジが満杯のとき。
In the horizontal database partitioning method of this invention, when a double of a relation with a clustered index is stored in a disk device, the page storing the double is full.

ページを2分割し、そのいずれかにそのダブルを格納し
た後1片方のページを一番少ないページを持つディスク
装置へ送ることにより、自動的にディスク装置に格納さ
れるダブルの数がほぼ均等である分割状態を維持する。
By dividing a page into two, storing the double in one of them, and then sending one page to the disk device with the least number of pages, the number of doubles automatically stored in the disk device is approximately equal. Maintain a certain division state.

C発明の実施例〕 以下、この発明の一実施例を図について説明する。@1
図において、(1)はクラスタードインデックスである
。クラスタードインデックスは* Computer 
5cience Press Inc、社が版権を持つ
J、r)、 Ul 1manが著した” Pr1nei
ple of DatabaseSystems ’ 
を邦訳 日本コンビエータ協会版権、国井利泰訳「デー
タベース・システムの原理」)の第2.4節で説明され
ている。B−treeで構成されているインデックスで
、かつ、クラスタードインデックスを持つリレーション
の各ダブルは、クラスタードインデックスが指定されて
いるア) +7ピエートの値に基いて、物理的に格納さ
れている状態においてもソートされている。
C Embodiment of the Invention] Hereinafter, an embodiment of the invention will be described with reference to the drawings. @1
In the figure, (1) is a clustered index. Clustered index is * Computer
Copyrighted by 5science Press Inc.
ple of Database Systems'
It is explained in Section 2.4 of ``Principles of Database Systems'' (Japanese translation, copyright of the Japan Combiator Association, translated by Toshiyasu Kunii). In an index composed of a B-tree, each double of a relation with a clustered index is physically stored based on the value of a) +7 pietes, where the clustered index is specified. are also sorted.

各ダブルは、ディスク装K 12a)〜(2d)の物理
的な記憶単位であるページ(3a)〜(3e)の中に。
Each double is in a page (3a) to (3e) which is a physical storage unit of the disk drive K 12a) to (2d).

ノートされた順番で格納されている。第1図では、l−
1000の範囲の整数値を持つアトIJビエートに、ク
ラスタードインデックスが付いているときの格納例を示
t7たものであるが1例えばキー傳が73よシも小さい
値を持つダブルは、ディスク装置(2a)のページ(3
a)に、73から186の間のキー値金持つダブルは、
ディスク装@ t2blのページ(コ市)に格納されて
いる。このように、ダブルのキー値を指定すれば゛、ク
ラスタードインデックスの持つポインタ(41によって
、ディスク装置とページが決定される。
They are stored in the order they were noted. In Figure 1, l-
t7 shows an example of storage when a clustered index is attached to an integer value in the range of 1000. Page (2a) (3
In a), a double with a key value between 73 and 186 is
It is stored on the disk installation @ t2bl page (Ko City). In this way, if a double key value is specified, the disk device and page are determined by the pointer (41) of the clustered index.

クラスタードインデックスを持つリレーションのダブル
をディスク装置に格納するときは。
When storing doubles of a relation with a clustered index on a disk device.

第5図のフローチャートに示すように、ダブルのキー値
によυ、クラスタードインデックスを参照して格納すべ
きディスク装置及びページを決め+101)、決定さh
たページにそのダブルを格納したら、ページがあふれる
かどうか調査する(102)、この調査により、あふれ
るようならばページの内容を2分する。2分されたうち
の片方のページは、一番少ないダブル数を持つディスク
装置へ転送される+103)。!2図は、この様子を示
したもので、ディスク装@ 12e)中のページ(3c
)の中に、整数値のキー値が1〜1000間のダブルが
格納されているとき、1〜100間の値を持つダブルを
このページ(3c)に格納しようとした場合、ページが
満杯なので、2分され1元のページ13c) K Fi
1〜50間のキー値を持つダブルが、もう一方のページ
(3d)には、51〜100間のキー値を持つダブルが
格納されるようになったことを示している。ディスク装
置(2f)は、ページ(3d)を格納するために選ばれ
た、そのダブルが属するリレーションのダブルから構成
されるページの数が一番少ないものである。ページを分
割後は、クラスタードインデックスを再編成しく104
)、ステップ+1011からの動作を繰シ返す。ステッ
プ(1021で、ページがあふれないという結果が検出
されれば、ダブルをステップ(101)において決定さ
れたページに格納する。
As shown in the flowchart in Figure 5, the disk device and page to be stored are determined by referring to the clustered index by the double key value υ+101), and the
After storing the double in the page, it is investigated whether the page overflows (102).If the double is stored in the page, the contents of the page are divided into two if the page overflows. One of the divided pages is transferred to the disk device with the smallest number of doubles +103). ! Figure 2 shows this situation, and the page (3c
) stores a double with an integer key value between 1 and 1000, and if you try to store a double with a value between 1 and 100 on this page (3c), the page is full, so , 2 parts and 1 original page 13c) K Fi
This shows that doubles with key values between 1 and 50 are now stored in the other page (3d), and doubles with key values between 51 and 100 are now stored. The disk device (2f) is selected to store the page (3d) and has the least number of pages composed of doubles of the relation to which the double belongs. After dividing the page, reorganize the clustered index104
), the operations from step +1011 are repeated. In step (1021), if it is detected that the page does not overflow, the double is stored in the page determined in step (101).

なお、上記の実施例では、第4図に示す如くネットワー
ク(9)によって、ディスク装置(2g)〜(2j)と
データ処理装置18a)〜(8d)を結んでいるという
システム構成について説明したが、このネットワーク(
9)の形WAは9例えばリング型や単一バス型等でもよ
く、一般にこれらに類したものであれば上記実施例と同
様の効果1[する。
In the above embodiment, a system configuration was described in which the disk devices (2g) to (2j) and the data processing devices 18a) to (8d) are connected by a network (9) as shown in FIG. , this network (
The shape WA of 9) may be, for example, a ring type or a single bus type, and in general, if it is similar to these, it will have the same effect as the above embodiment.

(発明の効果〕 以上のように、この発明によれば、クラスタードインデ
ックスを有する場合にも、リレーションの水平分割を均
等に行なうことができるようKしたので、複数のデータ
処理装置が複数のディスク装置を同時にアクセスできる
ようなシステムにおいて、クラスターインデックスを利
用した高速処理の他に、レコードの全件サーチ処理等に
おいても各データ処理装置が等しい時間でデータを読み
込むことができ、全体として最小の時間でデータを読み
込むことができるという効果がある。
(Effects of the Invention) As described above, according to the present invention, relations can be horizontally divided evenly even when a clustered index is provided, so that multiple data processing devices can process multiple disks. In a system that allows devices to be accessed simultaneously, in addition to high-speed processing using cluster indexes, each data processing device can read data in the same amount of time during all-record search processing, reducing the overall time to a minimum. This has the effect of being able to read data with .

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

第1図はこの発明の一実施例によるクラスタードインデ
ックスを持つリレーションの分割状態の例會示す説明図
、第2図はこの発明の一実施例によるページの分割の例
を示す説明図、第3図はりレーシッナルデータベースに
おけるリレーションの例を示す説明図、第4図はこの発
明を実施するために必要なシステム構成の例を示す説明
図、第5図はこの発明の一実施例によるプログラムのフ
ローチャートを示す説明図である。、(1+1iクラス
タートインデツクス、  (2aJ〜(2f)はディス
ク装置、  13a) 〜(3e)はページ、(4)は
インデックスのポインタ、(5)はリレーション、(6
)社アトリビエート、(7]はダブル、  (8al〜
(8d)はデータ処理装置、(9)はネットワークであ
る。 なお9図中同一符号は、各々同−又は相当部分を示す。
FIG. 1 is an explanatory diagram showing an example of how a relation with a clustered index is divided according to an embodiment of the present invention, FIG. 2 is an explanatory diagram showing an example of page division according to an embodiment of the present invention, and FIG. FIG. 4 is an explanatory diagram showing an example of a relation in a relational database, FIG. 4 is an explanatory diagram showing an example of a system configuration necessary to implement this invention, and FIG. 5 is a flowchart of a program according to an embodiment of this invention. FIG. , (1+1i cluster index, (2aJ to (2f) are disk devices, 13a) to (3e) are pages, (4) is an index pointer, (5) is a relation, (6
) Company Attribute, (7] is double, (8al~
(8d) is a data processing device, and (9) is a network. Note that the same reference numerals in Figure 9 indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] データベース中の1つのリレーションをダブル単位で水
平に分割した形で複数のディスク装置に格納するように
したリレーショナルデータベース管理システムにおいて
、クラスタードインデックスを有するリレーションを複
数のディスク装置に格納するときに、ディスク装置内の
物理的なページがそのリレーションのダブルによって満
杯になったとき、そのページを2つに分割させて、分割
したページのうち、片方のページを、そのリレーション
に対するダブルを保持するページが一番少ないディスク
装置に格納することによって、各ディスク装置に格納さ
れるダブルの量がほぼ均等になるようにしたことを特徴
とするデータベースの水平分割化方式。
In a relational database management system in which one relation in a database is horizontally divided into double units and stored on multiple disk devices, when a relation with a clustered index is stored on multiple disk devices, the disk When a physical page in the device becomes full with doubles for that relation, the page is split into two, and one of the pages is used as the page that holds the double for that relation. A database horizontal partitioning method characterized in that the amount of doubles stored in each disk device is made almost equal by storing data in the smallest disk device.
JP62155731A 1987-06-23 1987-06-23 Database management system Expired - Lifetime JPH0782451B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP62155731A JPH0782451B2 (en) 1987-06-23 1987-06-23 Database management system
US07/206,324 US5058002A (en) 1987-06-23 1988-06-13 Page splitting method and apparatus for a database stored in a plurality of memory storage units
GB08814848A GB2207264A (en) 1987-06-23 1988-06-22 Data processing system
DE3821551A DE3821551C2 (en) 1987-06-23 1988-06-22 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62155731A JPH0782451B2 (en) 1987-06-23 1987-06-23 Database management system

Publications (2)

Publication Number Publication Date
JPS63318628A true JPS63318628A (en) 1988-12-27
JPH0782451B2 JPH0782451B2 (en) 1995-09-06

Family

ID=15612220

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62155731A Expired - Lifetime JPH0782451B2 (en) 1987-06-23 1987-06-23 Database management system

Country Status (1)

Country Link
JP (1) JPH0782451B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06119214A (en) * 1992-10-09 1994-04-28 Fujitsu Ltd Relational database system
JPH11154155A (en) * 1997-11-20 1999-06-08 Mitsubishi Electric Corp File managing method
US6192359B1 (en) 1993-11-16 2001-02-20 Hitachi, Ltd. Method and system of database divisional management for parallel database system
US6510428B2 (en) 1993-11-16 2003-01-21 Hitachi, Ltd. Method and system of database divisional management for parallel database system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58217046A (en) * 1982-06-11 1983-12-16 Hitachi Ltd Term editing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58217046A (en) * 1982-06-11 1983-12-16 Hitachi Ltd Term editing device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06119214A (en) * 1992-10-09 1994-04-28 Fujitsu Ltd Relational database system
US6192359B1 (en) 1993-11-16 2001-02-20 Hitachi, Ltd. Method and system of database divisional management for parallel database system
US6510428B2 (en) 1993-11-16 2003-01-21 Hitachi, Ltd. Method and system of database divisional management for parallel database system
US7599910B1 (en) 1993-11-16 2009-10-06 Hitachi, Ltd. Method and system of database divisional management for parallel database system
JPH11154155A (en) * 1997-11-20 1999-06-08 Mitsubishi Electric Corp File managing method

Also Published As

Publication number Publication date
JPH0782451B2 (en) 1995-09-06

Similar Documents

Publication Publication Date Title
US5649181A (en) Method and apparatus for indexing database columns with bit vectors
US5752243A (en) Computer method and storage structure for storing and accessing multidimensional data
US10114908B2 (en) Hybrid table implementation by using buffer pool as permanent in-memory storage for memory-resident data
Bercken et al. An evaluation of generic bulk loading techniques
GB2207264A (en) Data processing system
WO2014067449A1 (en) System and method for flexible distributed massively parallel processing (mpp) database
US20240378194A1 (en) Method and system for data query
CN106682042A (en) Relational data cache and inquiry method and device
Nodine et al. Greed sort: Optimal deterministic sorting on parallel disks
JPS63318628A (en) Horizontally dividing system for data base
JP6006740B2 (en) Index management device
Valduriez et al. A multikey hashing scheme using predicate trees
CN111221814A (en) Secondary index construction method, device and equipment
Kvet Database Block Management using Master Index
Salzberg Access methods
CN103019951B (en) The recording method and device of ordered data, the access method of ordered data and device
Matsliach et al. Distributing a B+-tree in a loosely coupled environment
EP0170442A2 (en) A method for searching sparse databases using an associative technique
JPS62287350A (en) Index integrally updating system
JPH0267648A (en) Tree structure database record addition method
Omiecinski Concurrent file reorganization: Clustering, conversion and maintenance
JPH04112253A (en) Data accessing method using multilayer buffer
JPS61251941A (en) Database management method
Xu et al. Efficiently Update Disk-Resident Interval Tree
Crotzer Efficacy of B-trees in an Information Storage and Retrieval Environment