JPS6182251A - Storing system of relation type data base - Google Patents

Storing system of relation type data base

Info

Publication number
JPS6182251A
JPS6182251A JP59205039A JP20503984A JPS6182251A JP S6182251 A JPS6182251 A JP S6182251A JP 59205039 A JP59205039 A JP 59205039A JP 20503984 A JP20503984 A JP 20503984A JP S6182251 A JPS6182251 A JP S6182251A
Authority
JP
Japan
Prior art keywords
column
information
stored
null value
row
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
JP59205039A
Other languages
Japanese (ja)
Inventor
Kaoru Fujita
薫 藤田
Kosaku Yamahira
山平 耕作
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP59205039A priority Critical patent/JPS6182251A/en
Publication of JPS6182251A publication Critical patent/JPS6182251A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To make it unnecessary to have information to be a NULL value, even if a column has the NULL value, and to improve the processing of a column unit, by providing an identifier for identifying a column, on column information of a relation type data base. CONSTITUTION:Cn is column information, a column ID for identifying the column information is stored in IDn, length information of data is stored in ln, and an actual data of Cr is stored in Dn. Also, in the row, the column is arranged in an ascending order of ID, therefore, for instance, with respect to the column ID, in case when a column of 3 is stored in the next of a column of 1, the column ID can signify that a column of 2 has a NULL value. Accordingly, by providing the column for identifying the column information, as for the column of the NULL value, the column information becomes unnecessary, and the processing of a column unit can be executed efficiently.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は関係型データベースにおいて、カラムを新しく
追加する等5力ラム単位の処理の効率を向」二せしめる
のに好適なカラム情報格納方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a column information storage method suitable for improving the efficiency of processing in units of five columns, such as adding a new column, in a relational database.

〔発明の背景〕[Background of the invention]

一般に複数の行(ロー)情報と複数の列(カラム)情報
の集合で表現される表形式のファイルを関係型データベ
ースと呼んでいる。従来、このような関係型データベー
スにおいては、カラム情報にカラムを識別するための識
別子を持たせないでローを形成していたため、次のよう
な問題があった。
Generally, a tabular file that is expressed as a set of multiple rows of information and multiple columns of information is called a relational database. Conventionally, in such relational databases, rows were formed without column information having identifiers for identifying the columns, which caused the following problems.

(1)該尚カラムの値がN tJ L L値でも、当該
カラムにN tJ L Lであるという情報を持たせる
必要がある。即ち、テーブルで定着された順に全カラム
情報を、何らかの形で格納しなければならない。
(1) Even if the value of the column is N tJ LL, the column needs to have information that it is N tJ LL. That is, all column information must be stored in some form in the order established in the table.

(2)カラムの追加あるいは削除が生じた場合、処理が
複雑になる。
(2) Processing becomes complicated when columns are added or deleted.

データベースシステムにおけるデータの格納方式を詳り
、 <述べである公知例として特開昭55−f3184
9号公報があるが、これは論理的観点から望まわるデー
タ格納形態と物理的条件の観点から望まれるデータ格納
形態をそれぞれ仮想ファイルと物理ファイルとに対応さ
せて階層構造とするものであり、関係型データベースに
おける一ヒ記問題を解析する手段とけならない。
For a detailed explanation of the data storage method in a database system, please refer to Japanese Unexamined Patent Publication No. 55-F3184.
There is Publication No. 9, which creates a hierarchical structure in which data storage formats desired from a logical perspective and data storage formats desired from a physical condition are associated with virtual files and physical files, respectively. A means to analyze the above-mentioned problems in relational databases is essential.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、関係型データベースにおいて、カラム
を新しく追加するなどのカラム単位の処理、あるいはカ
ラムがN U L L値の場合の処理等を簡易fヒ、高
速化するカラム情報格納方式を提供することにある。
An object of the present invention is to provide a column information storage method that simplifies and speeds up column-by-column processing such as adding a new column, or processing when a column is a NULL value, in a relational database. It's about doing.

〔発明の概要〕[Summary of the invention]

カラム+1)位の処理(例えばカラムの追加)が発生し
た場合、カラl、を識別するための識別子が存在し、で
いれば、その識別子に基づいて処理を実行することがで
きる。また、N U L L値のカラムの場合には、そ
の識別子が存在しないことでN TJ LI、値を表わ
すことができる。本発明は関係型データベースのロー情
報を構成しているカラム情報について、カラムの実デー
タ、及びデータの長さ情報の他に、カラムを識別するた
めの識別子(以下、カラムTDという)を設けることで
、カラム単位の処理の効率を向」ニさせるものである。
When processing for column + 1) (for example, adding a column) occurs, there is an identifier for identifying column l, and if so, the process can be executed based on that identifier. Furthermore, in the case of a NULL value column, the absence of the identifier can represent the N TJ LI value. The present invention provides for column information constituting row information of a relational database to include an identifier for identifying the column (hereinafter referred to as column TD) in addition to column actual data and data length information. This improves the efficiency of column-by-column processing.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を図面により詳細に説明する。 Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings.

関係型データペースのデータは、第4図で示す様な表形
式で表現される。以降、これをテーブルと記述する。R
nは行情報(以降、これをローと記述する)である。C
nけ列情報(以降、これをカラムと記述する)であり、
ローを形成する要素である。
Data in the relational database is expressed in a table format as shown in FIG. Hereafter, this will be referred to as a table. R
n is row information (hereinafter referred to as row). C
This is n-column information (hereinafter referred to as a column),
It is an element that forms a row.

第1図に本発明を適用した場合のデータベース内のロー
の構成図を示す。Cnけ1つのカラム情報であり、第4
図で示した氏名、従業員番号・・・・・のカラ13情報
に相当する。TDn、fl、、、、D、、はカラム情報
を構成する要素である。TD、は木実施例でけ2バイ1
−のエリアからなり、カラム情報を職z11するカラム
TDを格納する。カラムTDIま。
FIG. 1 shows a configuration diagram of rows in a database when the present invention is applied. Cn is one column information, and the fourth
This corresponds to the blank 13 information such as name, employee number, etc. shown in the figure. TDn,fl,...,D, are elements that constitute column information. TD, Haki example ke 2 by 1
It consists of an area of - and stores a column TD that stores column information. Column TDI.

カラムが定義さ才また順に、]、2.3・・・・・・n
と順序番号が付けられる。、anはカラムCnのデータ
の長さ情報を格納する。DnはカラムCnの実際データ
を格納する。
The columns are defined in order of ], 2.3...n
and a sequence number. , an stores length information of data in column Cn. Dn stores the actual data of column Cn.

ロー内では、カラムはカラムTDの−1−昇順に並べら
れる。このため、第1図のフォーマツ1−を用=3− いることにより、第2図で示すように、たとえばカラム
IDが1のカラムの次にカラムIDが3のカラムが格納
されている場合は、カラムIDが2のカラムはN U 
L L値であると意味づけることができる。すなわち、
NULL値のカラムについてはカラム情報を全く持たな
いわけである。このように、カラム情報を識別するため
のカラムIDを設ければ、NULL値のカラムについて
はカラム情報を格納する必要がない。
Within a row, columns are ordered in -1-ascending order of column TD. Therefore, by using the format 1- in Figure 1 = 3-, as shown in Figure 2, for example, if a column with column ID 3 is stored next to a column with column ID 1, , the column with column ID 2 is N U
It can be interpreted as the LL value. That is,
A NULL value column has no column information at all. In this way, if a column ID for identifying column information is provided, there is no need to store column information for columns with NULL values.

初め、第1図のロー構成において、予め指定されたカラ
ムを検知する方法を説明する。第3図は該カラム検知処
理のフローチャートを表わしている。第3図中、Anは
第n番目のカラムのアドレスを示す。Cは指定されたカ
ラムのカラムIDである。まずAnを計算する。これは
、ステップ1では第1カラムのアドレスを求め(A、を
初期設定する)、ステップ6では第nカラムのアドレス
を第n−1カラムのアドレスから求めることで行う。指
定されたカラムのカラムIDと当該カラムのカラムID
(アト1ノスA、lで示されたカラムのカラムIDはI
D、)とを比較し1て、等し、け九ばそのカラムが検知
するカラムとなる(ステップ4゜ステップ8)。■Do
の方が小さい場合は1次のAnを計算し、て1次のカラ
ムのカラムIDと比較する(ステップ5.ステップ6)
。TDnの方が大きい場合は、指定されたカラムTDは
存在し・なかったことになり、NULL値であることが
判明する(ステップ3.ステップ7)。Anがローの最
終位置(Aend)と等しくなった場合は、当該ローに
おけるカラム検知処理は終了となり、結果として等し、
いカラムIDが存在しなかったので、指定されたカラム
はN U L L値であることが判明する(ステップ2
.ステップ7)。
First, a method for detecting a pre-designated column in the row configuration shown in FIG. 1 will be explained. FIG. 3 shows a flowchart of the column detection process. In FIG. 3, An indicates the address of the n-th column. C is the column ID of the specified column. First, calculate An. This is done by finding the address of the first column in step 1 (initializing A), and finding the address of the n-th column from the address of the (n-1)th column in step 6. Column ID of the specified column and column ID of the relevant column
(The column ID of the column indicated by at1 nos A, l is I
D, ) are compared with each other, and if the result is the same, that column becomes the column to be detected (Step 4 - Step 8). ■Do
If is smaller, calculate the first-order An and compare it with the column ID of the first-order column (Step 5. Step 6)
. If TDn is larger, it means that the specified column TD does not exist or does not exist, and it turns out to be a NULL value (Step 3. Step 7). When An becomes equal to the final position (Aend) of the row, the column detection process in that row ends, and as a result, they are equal.
Since no column ID exists, the specified column turns out to be a NULL value (step 2).
.. Step 7).

次にテーブルの定義情報として新しくカラムが追加にな
る場合を説明する。第5図に示すように、第4図で示し
たテーブルに新しく住所というカラムが追加されたとす
る。この場合、データベース内に格納されている当該テ
ーブルの全ロー情報に。
Next, we will explain the case where a new column is added as table definition information. As shown in FIG. 5, suppose that a new column called address has been added to the table shown in FIG. In this case, all row information for the table stored in the database.

新しく追加されたカラムに関する情報を追加する必要が
ある。しかし7.この時点ではテーブルの定帷情報とし
て、新しくカラムは追加されたが、また実際のデータを
追加していない。すなわち、第5図のテーブルの住所カ
ラムのデータは入力されテイナい。この場合、住所カラ
ムの値はN U T−L値である。このような時、本発
明が提供するカラム情報格納方式によれば、N U L
 L値はカラムに関する情報を持たなくてもよい。すな
わち、カラム丁りを設けであるので、テーブルの定義情
報として、カラムを新しく追加した時点ではデータベー
ス内でのロー情報に、N U L L値としてのカラム
情報を追加する処理が不要となるわけである。
I need to add information about newly added columns. But 7. At this point, a new column has been added as standard information for the table, but no actual data has been added. That is, the data in the address column of the table in FIG. 5 is not entered. In this case, the value of the address column is the NUT-L value. In such a case, according to the column information storage method provided by the present invention, N U L
The L value does not have to have any information about the column. In other words, since column definition is provided, when a new column is added as table definition information, there is no need to add the column information as a NULL value to the row information in the database. It is.

カラムTDを設けていないとすると、第5図のテーブル
に関する全ローについて、住所カラムの値がN TJ 
L L値であるという情報を追加する処理が必要となる
Assuming that column TD is not provided, the address column value for all rows in the table in Figure 5 is N TJ
It is necessary to perform processing to add information that the value is LL.

以」二に説明したように、本実施例によれば、カラムが
N U L L値の場合、N U T−L値カラムとし
ての情報を持つ必要がなくなり、カラム単位の操作(カ
ラムの追加処理)を効率良く実行できる。
As explained in Section 2 below, according to this embodiment, when a column is a NULL value column, it is no longer necessary to have information as a NUT-L value column, and column-by-column operations (column additions) processing) can be executed efficiently.

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

一7= 本発明によれば、関係型データベースにおいて、カラム
情報にカラムIDを設けたことにより、カラムをカラム
■Dという識別子で識別することができ、N U L 
L値カラムに関する処理、カラム11位の追加処理等に
ついて、処理効率の向上及び作業の簡略化を図ることが
できる。
17= According to the present invention, by providing a column ID in column information in a relational database, a column can be identified by an identifier called column ■D, and N U L
It is possible to improve the processing efficiency and simplify the work regarding the processing related to the L value column, the additional processing for the 11th column, and the like.

4、図面の筒+4tか説明 第1図は本発明方式によりデータベース内に格納される
ローの一般的構成図、第2図は同じくローの具体的構成
図、第3図は本発明方式によるカラム検知処理のフロー
図、第4図は関係型データベースのデータ例を示した図
、第5図は第4図に新しくカラムを追加することを示す
図である。
4. Explanation of cylinder + 4t in the drawing Figure 1 is a general configuration diagram of a row stored in a database according to the method of the present invention, Figure 2 is a diagram of a concrete configuration of the row, and Figure 3 is a column diagram according to the method of the present invention. FIG. 4 is a flowchart of the detection process, FIG. 4 is a diagram showing an example of data in a relational database, and FIG. 5 is a diagram showing adding a new column to FIG. 4.

Rn・・ロー、 Cn・・・カラム、  ■Dn・・・
カラム、  TD、Qn・・・カラムデータ長、 Dn
・・・カラムデータ長スA・・・カラムアドレス。
Rn...row, Cn...column, ■Dn...
Column, TD, Qn...Column data length, Dn
...Column data length A...Column address.

第3図Figure 3

Claims (1)

【特許請求の範囲】[Claims] (1)表形式で表現される関係型データベースの格納方
式において、各行(ロー)情報を構成している列(カラ
ム)情報について、当該カラムの実データ、該データの
長さ情報の他にカラム識別子を設け、各カラム情報を前
記カラム識別子で識別することを特徴とする関係型デー
タベースの格納方式。
(1) In the storage method of relational databases expressed in table format, column information constituting each row information is stored in columns in addition to the actual data of the column and length information of the data A storage method for a relational database, characterized in that an identifier is provided and each column information is identified by the column identifier.
JP59205039A 1984-09-29 1984-09-29 Storing system of relation type data base Pending JPS6182251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59205039A JPS6182251A (en) 1984-09-29 1984-09-29 Storing system of relation type data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59205039A JPS6182251A (en) 1984-09-29 1984-09-29 Storing system of relation type data base

Publications (1)

Publication Number Publication Date
JPS6182251A true JPS6182251A (en) 1986-04-25

Family

ID=16500431

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59205039A Pending JPS6182251A (en) 1984-09-29 1984-09-29 Storing system of relation type data base

Country Status (1)

Country Link
JP (1) JPS6182251A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02253451A (en) * 1989-03-28 1990-10-12 Hitachi Inf Syst Ltd Data base managing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02253451A (en) * 1989-03-28 1990-10-12 Hitachi Inf Syst Ltd Data base managing system

Similar Documents

Publication Publication Date Title
US20040083117A1 (en) Method for fast searching and analyzing inter-relations between patents from a patent database
JP2002501256A (en) Database device
JP2005135221A (en) Method and device for joining spreadsheet data and program
JPS6182251A (en) Storing system of relation type data base
US20050055331A1 (en) Computer implemented method for retrieving data from a data storage system and according computer program product and data storage system
US5806064A (en) Method for multi-field ordering of data base records with sequence variables
JPS6172333A (en) Merge processing system
US8849866B2 (en) Method and computer program product for creating ordered data structure
JPH10240741A (en) Managing method for tree structure type data
JPS62287350A (en) Index integrally updating system
JP2596332B2 (en) Data combination extraction method and apparatus
US20110314022A9 (en) K engine - process count after build in threads
JP2785966B2 (en) Foreign key dynamic resolution processing method
JPS6339029A (en) Production of data base
JPS61278932A (en) Method of processing data addition
JPH0675254B2 (en) Kaiko database operation system
JPH11306183A (en) Data base retrieval system
JPH01258125A (en) Key sequential retrieving system for record
JPH0652231A (en) Relational data base operation mechanism
JPS6261118A (en) Retrieving system for tree structure index
JPS6358557A (en) Control system for dynamic memory area
JPH0561751A (en) Journal acquiring method
JPS63149728A (en) Index forming device
JPH05165998A (en) Optical character read system
JPH01228022A (en) Tow-dimensional data storing system