JP2008052635A - Database access system and its program - Google Patents

Database access system and its program Download PDF

Info

Publication number
JP2008052635A
JP2008052635A JP2006230632A JP2006230632A JP2008052635A JP 2008052635 A JP2008052635 A JP 2008052635A JP 2006230632 A JP2006230632 A JP 2006230632A JP 2006230632 A JP2006230632 A JP 2006230632A JP 2008052635 A JP2008052635 A JP 2008052635A
Authority
JP
Japan
Prior art keywords
data
database
basic
basic part
database access
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
JP2006230632A
Other languages
Japanese (ja)
Inventor
Itsuro Okada
逸郎 岡田
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
Original Assignee
Hitachi Software Engineering Co 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 filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2006230632A priority Critical patent/JP2008052635A/en
Publication of JP2008052635A publication Critical patent/JP2008052635A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To maintain access performance to a vertically divided database by reducing the probability of displacement processing of data generated at high frequency in association with the addition of data entry. <P>SOLUTION: A database access program provided at a mainframe connected to a network to convergently process access requests to the database vertically divided into a basic section and an extended section, from a plurality of client computers, allows the mainframe to carry out processing which includes processing of determining whether there is a space in the basic section by comparing the effective data number of the basic section with the maximum repetition amount of basic section data in the basic section, and data ejection processing of putting a plurality of data together and displacing it from the basic section to the extended section if there is no space as a result of determination. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明はコンピュータシステムにおけるデータベースへのアクセス手法に関し、特に縦分割されたデータベースに対して円滑にデータ追加するためのデータベースアクセスシステムおよびそのプログラムに関するものである。   The present invention relates to a database access method in a computer system, and more particularly to a database access system and a program for smoothly adding data to a vertically divided database.

データベース管理方式の一種に、リレーショナルデータベース(relational database)があって、キーとなるデータ(管理番号や名前など)を利用して、異なるデータを容易に結合することができるという特徴を有するものである。   One type of database management system is a relational database, which has the feature that different data can be easily combined using key data (management number, name, etc.). .

また、リレーショナルデータベース操作言語の一種にSQL(Structured Query Language)があり、ANSI(米国規格協会American National Standards
Institute)、ISO、JISで仕様が定義されている。このSQLはリレーショナルデータベースシステム用の操作言語であると共に、アクセスするデータベースに対する構造化問い合わせ言語でもある。そして、SQLを表に定義された項目毎に発行することによってデータを取得する。すなわち、リレーショナルデータベースへの一般的なアクセス方式として用いられている。
In addition, there is SQL (Structured Query Language) as a kind of relational database operation language, ANSI (American National Standards American Standards Association).
(Institute), ISO, and JIS. This SQL is an operation language for a relational database system and a structured query language for a database to be accessed. And data is acquired by issuing SQL for every item defined in the table. That is, it is used as a general access method to a relational database.

このSQLを用いることにより、表の定義やデータ操作、関係演算など、リレーショナルデータベースに関するほとんどの操作に関し、機械による読みとりが可能なテキストとして記述できる。そうすると、データベースに対するデータベース管理システムの操作言語をある程度まで標準化することが可能となる。また、SQLに関連して行単位で取得するデータ定義や縦分割するデータ定義も知られている。   By using this SQL, most operations related to the relational database such as table definition, data operation, and relational operation can be described as text that can be read by a machine. Then, it becomes possible to standardize the operation language of the database management system for the database to some extent. In addition, data definitions obtained in units of rows and data definitions for vertical division are also known in connection with SQL.

図7は従来からあるリレーショナルデータベースへのアクセス手法において、行単位取得するデータ定義の説明図である。図7に示すようにデータ量が非常に多い場合、アクセス時間が長引く欠点を除去するため、行単位でデータを取得し、メモリ上で必要な項目を切り分けるという手法がある。しかし、この手法を用いても、データの長さ(量)に応じてアクセス速度がある程度低下することを避けらない。すなわち、行が長いデータに関してはアクセス時間を短縮する効果が低くなるという問題がある。   FIG. 7 is an explanatory diagram of data definition acquired in units of rows in a conventional relational database access method. As shown in FIG. 7, when the amount of data is very large, there is a method in which data is acquired in units of rows and necessary items are separated on the memory in order to eliminate the disadvantage that the access time is prolonged. However, even if this method is used, it is inevitable that the access speed is reduced to some extent according to the length (amount) of data. That is, there is a problem that the effect of shortening the access time is reduced for data with long rows.

なお、図7に示すNULLは、理論上の最大繰り返しまで定義しており、一つのキーについて理論上は大量の繰り返しを有することを意味する。しかし、実際のデータにおいては、理論上の最大値より少ない繰り返し量で足りることがほとんどである。   Note that NULL shown in FIG. 7 is defined up to the theoretical maximum number of repetitions, which means that one key has a large number of repetitions theoretically. However, in actual data, a repetition amount smaller than the theoretical maximum value is usually sufficient.

図8は従来からあるリレーショナルデータベースへのアクセス手法において、縦分割するデータ定義の説明図である。図8に示すように、アクセス対象となるデータを、大半のデータが収まる繰り返しまで定義された量をもつ表(以下、「基本部」という)と、残りの繰り返し量を受け持つように定義された表(以下、「拡張部」という)とに縦分割する。この縦分割するデータ定義によって、データベースをアクセスする際、データ処理の負担を軽減することが可能となる。   FIG. 8 is an explanatory diagram of data definition to be vertically divided in a conventional access method to a relational database. As shown in FIG. 8, the data to be accessed is defined to have a table (hereinafter referred to as “basic part”) having a defined amount until the most data fits, and the remaining repetition amount. It is divided vertically into a table (hereinafter referred to as “extended portion”). With this vertical data definition, it is possible to reduce the burden of data processing when accessing a database.

また、図8に示す拡張部は、取り扱うデータ量が基本部に収容不可能なほど多い場合に必要となるものであり、その拡張部におけるNULLの定義は下記のとおりである。
拡張部NULL = 理論上の最大繰り返し − 基本部の最大繰り返し
The extension unit shown in FIG. 8 is necessary when the amount of data handled is so large that it cannot be accommodated in the basic unit, and the definition of NULL in the extension unit is as follows.
Extension NULL = theoretical maximum repetition-maximum repetition of the basic part

なお、データベースを設計する場合、特に容量に関しては、1回(単位)にエントリされる予定のデータが、データベース中の基本部だけで収容可能な容量に設計されるのが通常である。したがって、エントリするデータの総量はあまり問題にされない。   When designing a database, in particular, regarding the capacity, data that is scheduled to be entered once (unit) is usually designed to have a capacity that can be accommodated only by the basic part in the database. Therefore, the total amount of data to be entered is not a problem.

しかし、データベースへアクセスする回数の増加により、履歴やログなどによってレコードの冗長部分が増えるので、時間の経過(アクセス数の増加)に伴い、データベース自体が肥大してしまうことは周知の通りである。   However, as the number of accesses to the database increases, redundant parts of records increase due to history, logs, etc., so that it is well known that the database itself will grow over time (increase in the number of accesses). .

このような理由により、既に基本部のレコード容量が許容限界に到達しているにもかかわらず、追加のデータエントリを試みても当然に不可能である。その場合は、追加エントリのレコード数分だけ、基本部から拡張部へデータレコードを回避させて対応するという従来技術があった。   For this reason, it is naturally impossible to attempt additional data entry even though the record capacity of the basic part has already reached the allowable limit. In such a case, there has been a conventional technique in which data records are avoided from the basic part to the extended part by the number of additional entry records.

なお、本発明に関連する公知技術文献としては下記特許文献が挙げられる。
特開平06−052231 特開平07−064835 特開2002−108669
In addition, the following patent document is mentioned as a well-known technical document relevant to this invention.
JP-A-06-052231 JP 07-064835 JP 2002-108669 A

しかしながら、このような基本部に対する追加のデータエントリが頻繁に発生する場合、基本部から拡張部へデータを移動する処理に時間を要するため、アクセス速度を高速に維持する目的であった縦分割の長所が生かし難くなるという問題が発生する。すなわち、追加エントリが頻発するデータベースをアクセスする際には、縦分割するデータ定義を用いても、データ処理を軽減することが困難になるという課題があった。   However, when such additional data entries for the basic part frequently occur, it takes time to move data from the basic part to the extension part. There is a problem that it is difficult to take advantage of the advantages. That is, when accessing a database in which additional entries occur frequently, there is a problem that it is difficult to reduce data processing even if a vertically defined data definition is used.

以上の現状に鑑み、本発明は、縦分割されたデータベースに対し、高頻度のデータ追加に伴って発生するデータの移動処理を行う際、アクセス性能を維持できるようにしたデータベースアクセスシステムおよびそのプログロムを提供することを目的とする。   In view of the above situation, the present invention provides a database access system and its program that can maintain access performance when performing data movement processing that occurs with the addition of high-frequency data to a vertically divided database. The purpose is to provide.

前記課題を解決するために、請求項1に係る発明は、ネットワークに接続され複数のクライアントコンピュータからのアクセス要求を集中的に処理するメインフレームを中核に備えたデータベースアクセスシステムにおいて、基本部および拡張部に縦分割されたデータベースと、前記基本部の収容能力を超えるレコード追加があれば基本部から拡張部へ複数まとめてデータ移動を行うデータ追い出し処理手段と、を備えたことを特徴とするデータベースアクセスシステムである。   In order to solve the above problems, the invention according to claim 1 is directed to a database access system having a mainframe as a core, which is connected to a network and centrally processes access requests from a plurality of client computers. A database characterized by comprising: a vertically divided database; and data eviction processing means for moving a plurality of data from the basic part to the extended part if there is a record addition exceeding the capacity of the basic part. Access system.

請求項1に係る発明によれば、基本部の収容能力を1度超えたならば、データ追い出し処理手段において、基本部から拡張部へ複数まとめてデータ移動を行うので、その後はレコード追加の都度に逐一データ移動をするまでもなく、ある程度の空きが確保される。 したがって、高頻度で追加データが発生してもデータ移動が必要となる確率を減らすことができる。すなわち、データ移動に要する時間および処理負担を必要最小限に軽減してアクセス速度を維持することが可能になる。   According to the first aspect of the present invention, if the capacity of the basic part is exceeded once, the data eviction processing means moves a plurality of data from the basic part to the expansion part at a time. A certain amount of space is secured without having to move data one by one. Therefore, even if additional data occurs frequently, the probability that data movement is necessary can be reduced. That is, it is possible to maintain the access speed by reducing the time required for data movement and the processing burden to the minimum necessary.

請求項2に係る発明は、請求項1に記載のデータベースアクセスシステムに加えて、前記データ追い出し処理手段には、前記データ移動の際に指定した数を同時にまとめて実行するためのパラメータファイルを備えたことを特徴とする。   According to a second aspect of the present invention, in addition to the database access system according to the first aspect, the data eviction processing means includes a parameter file for simultaneously executing a specified number at the time of the data movement. It is characterized by that.

請求項2に係る発明によれば、パラメータで指定された移動数によって、データ移動を行う数を最適値に設定できる。   According to the second aspect of the invention, the number of data movements can be set to an optimum value according to the number of movements specified by the parameter.

請求項3に係る発明は、ネットワークに接続され複数のクライアントコンピュータから基本部および拡張部に縦分割されたデータベースへのアクセス要求を集中的に処理するメインフレームに具備されたデータベースアクセスプログラムにおいて、前記基本部における基本部データの最大繰り返し量に対する前記基本部の有効データ数を比較することにより前記基本部に空きが有るか否かを判断する処理と、前記判断により空きがなければ、前記基本部から拡張部に複数まとめてデータを移動させるデータ追い出し処理と、を含む処理を前記メインフレームに実行させることを特徴とするデータベースアクセスプログラムである。   The invention according to claim 3 is a database access program provided in a mainframe for centrally processing access requests to a database vertically divided into a basic part and an extension part from a plurality of client computers connected to a network. A process for determining whether or not there is a vacancy in the basic part by comparing the number of valid data in the basic part with respect to a maximum repetition amount of the basic part data in the basic part; A database access program characterized by causing the mainframe to execute a process including a data eviction process for moving a plurality of data collectively from one to an extension unit.

請求項3に係る発明によれば、請求項1に係る発明とほぼ同等の作用効果がある。   According to the invention of claim 3, there are substantially the same effects as the invention of claim 1.

請求項4に係る発明は、請求項3に記載のデータベースアクセスプログラムに加えて、前記データ追い出し処理には、前記複数まとめてデータを移動させるためにパラメータファイルより移動数を取得する処理を含むことを特徴とする。   According to a fourth aspect of the present invention, in addition to the database access program according to the third aspect, the data eviction process includes a process of acquiring a movement number from a parameter file in order to move the plurality of data collectively. It is characterized by.

請求項4に係る発明によれば、請求項2に係る発明とほぼ同等の作用効果がある。   According to the invention of claim 4, there are substantially the same effects as the invention of claim 2.

請求項1,3に係る発明によれば、データ移動を必要最小限に軽減し、データ移動に要する時間を減らし、アクセス速度を始めとする全体的な性能を維持することが可能になる。   According to the first and third aspects of the invention, data movement can be reduced to the minimum necessary, the time required for data movement can be reduced, and overall performance including access speed can be maintained.

請求項2,4に係る発明によれば、データ移動を行う数を最適値に設定できる。   According to the second and fourth aspects of the invention, the number of data movements can be set to an optimum value.

以下、図に沿って本発明の実施の一形態(以下、「本実施形態」という)を詳細に説明する。図1は、本実施形態に係るデータベースアクセスプログラムを備えたメインフレームのシステム構成図である。図1に示すように、メインフレーム101は、データベースアクセスプログラム102と、データベース(基本部)103と、データベース(拡張部)104と、パラメータファイル(以下、単に「パラメータ」という)107と、データベースアクセスプログラム102を使用する業務プログラム108とを備えたコンピュータシステム(以下、「本システム」ともいう)である。メインフレーム101に対しては、作業指示を与える業務端末109が接続されている。
なお、データベース内のデータ構成については図2に沿って後述する。
Hereinafter, an embodiment of the present invention (hereinafter referred to as “the present embodiment”) will be described in detail with reference to the drawings. FIG. 1 is a system configuration diagram of a mainframe provided with a database access program according to the present embodiment. As shown in FIG. 1, the mainframe 101 includes a database access program 102, a database (basic unit) 103, a database (extended unit) 104, a parameter file (hereinafter simply referred to as “parameter”) 107, and a database access. A computer system (hereinafter also referred to as “this system”) including a business program 108 that uses the program 102. A business terminal 109 for giving work instructions is connected to the main frame 101.
The data structure in the database will be described later with reference to FIG.

また、前記メインフレーム(mainframe)とは、高速、大容量のコンピュータの総称であって、個人レベルでの所有を基本とするパーソナルコンピュータに対し、複数のクライアントコンピュータからの要求を集中的に処理する大型コンピュータを意味する。
なお、メインフレームとほぼ同一に定義されるホストコンピュータ(host computer)があり、広義には、ネットワーク環境において、サービスを提供する側のコンピュータを意味する。
これらメインフレームおよびホストコンピュータは高速の演算処理サービス、データベースサービスを提供することが典型的な用途である。
The mainframe is a general term for high-speed, large-capacity computers, and processes requests from a plurality of client computers in a centralized manner with respect to personal computers that are basically owned on an individual level. Means a large computer.
Note that there is a host computer that is defined almost the same as the mainframe, which broadly means a computer that provides a service in a network environment.
These mainframes and host computers typically provide high-speed arithmetic processing services and database services.

また、データベース基本部(以下、「基本部」と略す)103には縦分割されたデータの基本部である基本部データ105が格納され、データベース拡張部(以下、「拡張部」と略す)104には縦分割されたデータの拡張部である拡張部データ106が格納されている。これらリレーショナルデータベースに対するSQLを用いたアクセス方式に関して説明を続ける。   A database basic part (hereinafter abbreviated as “basic part”) 103 stores basic part data 105 that is a basic part of vertically divided data, and a database expansion part (hereinafter abbreviated as “expansion part”) 104. Stores extension part data 106 which is an extension part of vertically divided data. The description of the access method using SQL for these relational databases will be continued.

図2は本システムに係るデータ構成図であり、(a)基本部データと、(b)拡張部データである。これらは、図1にも示した基本部データ105と拡張部データ106の構成例であって、ここではデータの繰り返し量の理論値は1000で基本部データを10、拡張部データを990に分割した場合の例を示す。   FIG. 2 is a data configuration diagram according to the present system, wherein (a) basic part data and (b) extension part data. These are the configuration examples of the basic part data 105 and the extended part data 106 shown in FIG. 1. Here, the theoretical value of the data repetition amount is 1000, the basic part data is divided into 10, and the extended part data is divided into 990. An example is shown below.

基本部データ105は、主キーであるD201と、その主キーD201のデータに対して拡張部データ106の先頭の副キーを格納する拡張部先頭キーD202と、基本部データ105中の有効データ数を示す有効データ数D203と、データ項目D204とにより構成されている。さらに、データ項目D204は副キーD205とデータ内容D206とにより構成されている。   The basic part data 105 includes a primary key D201, an extended part head key D202 that stores the first subkey of the extended part data 106 for the data of the primary key D201, and the number of valid data in the basic part data 105. Is composed of a valid data count D203 and a data item D204. Further, the data item D204 is composed of a sub key D205 and a data content D206.

データ項目D204は副キーD205の昇順(または降順)に並んでおり、前詰めで格納される。基本部データ105の繰り返し量は最大10と仮定しているためデータ項目D204はD20001〜D20010まで存在する。   The data items D204 are arranged in the ascending order (or descending order) of the subkey D205, and are stored in a left-justified manner. Since the repetition amount of the basic part data 105 is assumed to be 10 at the maximum, the data item D204 exists from D20001 to D20010.

拡張部データ106は、主キーであるD211と、拡張部データ106中の有効データ数を示す有効データ数D213と、データ項目D214とにより構成されている。さらにデータ項目D214は、副キーD215と、データ内容D216とにより構成されている。   The extension part data 106 is composed of D211 which is a primary key, a valid data number D213 indicating the number of valid data in the extension part data 106, and a data item D214. Further, the data item D214 includes a sub key D215 and a data content D216.

データ項目D214は、副キーD215の昇順(または降順)に並んでおり、前詰めで格納される。ここでは昇順の場合の例とする。拡張部104には基本部103に収容不能となって溢れたデータが格納される。拡張部データ106の繰り返し量は最大990と仮定しているためデータ項目D214はD21001〜D21990まで存在する。   The data items D214 are arranged in the ascending order (or descending order) of the subkey D215, and are stored in the left-justified order. Here, it is an example in the ascending order. The expansion unit 104 stores data that cannot be accommodated in the basic unit 103 and overflows. Since the maximum repetition amount of the extension data 106 is assumed to be 990, there are data items D214 from D21001 to D21990.

ここで、図1に示した業務端末109をユーザ(不図示)が操作し、業務プログラム108を起動してアクセス要求すると、データベースアクセスプログラム102がデータベースに対してアクセス動作する。このようなアクセス動作全般において、操作はユーザであり、実行主体はコンピュータである。   Here, when a user (not shown) operates the business terminal 109 shown in FIG. 1 to start the business program 108 and make an access request, the database access program 102 accesses the database. In such an access operation as a whole, the operation is a user and the execution subject is a computer.

しかし、「ユーザの端末操作」および「コンピュータによるプログラムの実行」という自明の説明を省略する代わりに、各プログラム自体が意思を持った実行主体であるかのように擬人化した表現にすることがある。これは説明の便宜上のことであり、前述の場合は「業務プログラム108からデータベースアクセスプログラム102に対してアクセス要求する」と簡略に説明することもできる。   However, instead of omitting the obvious explanations of "user terminal operation" and "execution of program by computer", each program itself may be anthropomorphic as if it were an intentional execution subject. is there. This is for convenience of explanation, and in the case described above, it can be simply described as “access request from the business program 108 to the database access program 102”.

図1に示した業務プログラム108の実行によるアクセス要求に応じて、データベースアクセスプログラム102からデータベースに対してアクセス動作するようにと要求があれば、図2に示すように、データ項目D204、D214の単位でアクセス処理が実行される。この時、主キーD201、D211、および副キーD205、D215を指定し、データベースアクセスプログラム102を実行することにより、基本部データ105または拡張部データ106の中から該当するデータを探してアクセス処理を行う。   If there is a request from the database access program 102 to access the database in response to an access request resulting from the execution of the business program 108 shown in FIG. 1, the data items D204 and D214 shown in FIG. Access processing is executed in units. At this time, by specifying the primary keys D201 and D211 and the secondary keys D205 and D215 and executing the database access program 102, the corresponding data is searched from the basic part data 105 or the extended part data 106, and the access process is performed. Do.

図3はデータ追加要求の実行を示すフローチャートである。図1、図2も併せて参照しながら図3に沿って、業務プログラム108からデータベースアクセスプログラム102に対してデータ追加要求が行われた場合を説明する。   FIG. 3 is a flowchart showing execution of a data addition request. A case where a data addition request is made from the business program 108 to the database access program 102 will be described along FIG. 3 with reference to FIGS.

図1、図2、図3に示すように、業務プログラム108からデータベースアクセスプログラム102への入力データとして、主キーD201、D211、副キーD205、D215、追加のデータ項目D204、D214が入力される。(D301)   As shown in FIGS. 1, 2, and 3, primary data D201 and D211, secondary keys D205 and D215, and additional data items D204 and D214 are input as input data from the business program 108 to the database access program 102. . (D301)

まず、主キーD201を用いてデータベースより基本部データ105を取得する(S301)。この時、取得すべき対象データがあるかないかを判断(S302)する。この判断(S302)がNoであり、データが存在しなければ、主キーD201、追加のデータ項目により基本部データ105を新規作成してデータ追加要求を終了する(S308)。   First, the basic part data 105 is acquired from the database using the primary key D201 (S301). At this time, it is determined whether there is target data to be acquired (S302). If this determination (S302) is No and data does not exist, the basic part data 105 is newly created with the primary key D201 and the additional data item, and the data addition request is terminated (S308).

判断(S302)がYesでありデータが存在すれば、追加しようとする副キーが、取得した基本部データ105中の最後のデータ項目の副キーよりも小さいか否かを比較して判断する(S303)。この判断(S303)がYesであり追加しようとする副キーが基本部103の最後の副キーよりも小さければ、この追加データを基本部103中に追加することとなり、次の判断(S309)へ移行し、基本部データ105中に空きがあるか否かを調べて判断する。   If the determination (S302) is Yes and data exists, it is determined by comparing whether or not the subkey to be added is smaller than the subkey of the last data item in the acquired basic data 105 ( S303). If this determination (S303) is Yes and the subkey to be added is smaller than the last subkey of the basic unit 103, this additional data is added to the basic unit 103, and the next determination (S309) is performed. It is determined whether or not there is a space in the basic part data 105.

判断(S309)では、有効データ数D203と、基本部データ105の最大繰り返し量(ここでは10)を比較することにより空きが有るか否かを判断(S309)する。この判断(S309)がNoであり空きがなければ、基本部データ105から拡張部データ106へと複数まとめてデータ項目を移動させるデータ追い出し処理(S310)を行う。データ追い出し処理(S310)の詳細については後述する。   In the determination (S309), it is determined whether there is a vacancy by comparing the number of valid data D203 with the maximum repetition amount (here, 10) of the basic data 105 (S309). If this determination (S309) is No and there is no free space, a data eviction process (S310) is performed in which a plurality of data items are moved collectively from the basic data 105 to the extended data 106. Details of the data eviction process (S310) will be described later.

判断(S309)がYesであり空きが有れば、基本部データ105中の該当の場所に追加のデータ項目D204を挿入して終了する(S311)。   If the determination (S309) is Yes and there is a vacancy, an additional data item D204 is inserted at the corresponding location in the basic data 105, and the process ends (S311).

判断(S303)がNoであり追加しようとする副キーが基本部103の最後の副キーよりも大きければ、拡張部先頭キーD202がNULLか否か(拡張部データが存在する否か)を判断する(S304)。この判断(S304)がYesでありNULLならば、この基本部データ105には拡張部104が存在しない。そこで基本部データ105中に空きがあるか否かを調べて判断する(S312)。   If the determination (S303) is No and the subkey to be added is larger than the last subkey of the basic unit 103, it is determined whether or not the expansion unit head key D202 is NULL (whether or not the expansion unit data exists). (S304). If this determination (S304) is Yes and NULL, the extension unit 104 does not exist in the basic unit data 105. Therefore, it is determined whether or not there is a space in the basic part data 105 (S312).

判断(S312)がYesであり空きが有れば、そのまま基本部データ105中の該当の場所に追加のデータ項目を挿入して終了する(S313)。一方、判断(S312)がNoであり空きが無ければ、主キーD211、追加のデータ項目D214より拡張部データ106を新規作成して終了する(S314)。   If the determination (S312) is Yes and there is a vacancy, an additional data item is inserted into the corresponding location in the basic part data 105 as it is, and the process ends (S313). On the other hand, if the determination (S312) is No and there is no free space, the expanded portion data 106 is newly created from the primary key D211 and the additional data item D214, and the process ends (S314).

判断(S304)がNoであり拡張部先頭キーD202がNULLでなければ、この基本部データ105には拡張部104が存在する。そこで、追加しようとする副キーが拡張部先頭キーD202よりも小さいか否かを比較して判断する(S305)。   If the determination (S304) is No and the extension part head key D202 is not NULL, the extension part 104 exists in the basic part data 105. Therefore, it is determined by comparing whether or not the subkey to be added is smaller than the extension head key D202 (S305).

判断(S305)がNoであり追加しようとする副キーが拡張部先頭キーD202以上であれば、このデータは拡張部104中に追加することになる。したがって、主キーD211より拡張部データ106を取得(S306)し、拡張部データ106中で該当する場所に追加のデータ項目D214を挿入して終了する(S307)。   If the determination (S305) is No and the subkey to be added is greater than or equal to the extension head key D202, this data is added to the extension 104. Therefore, the extension part data 106 is acquired from the primary key D211 (S306), and an additional data item D214 is inserted at the corresponding place in the extension part data 106, and the process is terminated (S307).

判断(S305)がYesであり追加しようとする副キーが拡張部先頭キーD202よりも小さければ、基本部データ105中に空きが有るか否かを調べて判断する(S315)。   If the determination (S305) is Yes and the subkey to be added is smaller than the expanded portion head key D202, it is determined by checking whether or not there is a free space in the basic portion data 105 (S315).

判断(S315)がYesであり空きが有れば、そのまま基本部データ105中で該当する場所に追加のデータ項目D204を挿入して終了する(S316)。判断(S315)がNoであり空きが無ければ、主キーD211より拡張部データ106を取得し(S317)、先頭に追加のデータ項目D214を挿入して終了する(S318)。   If the determination (S315) is Yes and there is a vacancy, the additional data item D204 is inserted into the corresponding location in the basic part data 105 as it is, and the process ends (S316). If the determination (S315) is No and there is no space, the extension part data 106 is acquired from the primary key D211 (S317), and an additional data item D214 is inserted at the head and the process ends (S318).

図3におけるデータ追い出し処理(S310)について図4、図5、図6を順に用いて詳細に説明する。
図4はデータ追い出し処理を示すフローチャートである。図4に示すように、最初にパラメータ107(図1)より移動数を取得する(S401)。移動数とは基本部103から拡張部104に一度に移動させるデータ項目の数であり、同時に複数のデータ項目をまとめて移動させる。次に主キーD211を用いて拡張部104より拡張部データ106を取得する(S402)。
The data eviction process (S310) in FIG. 3 will be described in detail using FIGS. 4, 5, and 6 in order.
FIG. 4 is a flowchart showing the data eviction process. As shown in FIG. 4, first, the number of movements is obtained from the parameter 107 (FIG. 1) (S401). The number of movements is the number of data items moved from the basic unit 103 to the expansion unit 104 at a time, and a plurality of data items are moved together at the same time. Next, the extension part data 106 is acquired from the extension part 104 using the primary key D211 (S402).

次に拡張部104のデータ項目を移動数分だけ後方へ移動させる(S403)。これにより基本部103から移動してきたデータ項目の格納場所を確保する。   Next, the data item of the extension unit 104 is moved backward by the number of movements (S403). As a result, the storage location of the data item moved from the basic unit 103 is secured.

次に副キーD205を用いて基本部103への挿入位置を求める(S404)。ここで挿入位置が基準値よりも大きいか否かを判断する(S405)。この判断(S405)がYesであり、挿入位置が基準(基本部103の最大繰り返し量−移動数+1)値より大きければ、追加するデータよりも後方に移動数以上のデータ項目が存在する。   Next, the insertion position into the basic unit 103 is obtained using the sub key D205 (S404). Here, it is determined whether or not the insertion position is larger than the reference value (S405). If this determination (S405) is Yes and the insertion position is larger than the reference value (maximum repetition amount of basic unit 103−movement number + 1), there are data items greater than or equal to the movement number behind the data to be added.

判断(S405)がYesの場合は、基本部103のデータ項目D204を最後尾から移動数分だけ拡張部104の先頭へ移動させる(S406)。ついで、基本部103へ追加データを挿入する(S407)。   If the determination (S405) is Yes, the data item D204 of the basic unit 103 is moved from the end to the top of the expansion unit 104 by the number of movements (S406). Next, additional data is inserted into the basic unit 103 (S407).

一方、判断(S405)がNoであり、挿入位置が基準(基本部103の最大繰り返し量−移動数+1)値よりも小さいならば、追加するデータは移動する基本部103のデータ項目D204に含まれる。   On the other hand, if the determination (S405) is No and the insertion position is smaller than the reference value (maximum repetition amount of basic unit 103−number of movements + 1), the data to be added is included in data item D204 of basic unit 103 to be moved. It is.

よって、判断(S405)がNoの場合は、基本部103のデータ項目D204を最後尾から移動数−1分、拡張部104の先頭へ移動させる(S408)。その後、拡張部104へ追加のデータ項目D214を追加する。   Therefore, if the determination (S405) is No, the data item D204 of the basic unit 103 is moved from the end to the beginning of the expansion unit 104 by the number of movements minus one (S408). Thereafter, an additional data item D214 is added to the extension unit 104.

図5は図4に示すデータ追い出し処理のうち(S405)から(S406)に至るデータの説明図であり、(a)基本部データと、(b)拡張部データを示している。図5に示すように、図2で示したデータに対してデータを追加した時、判断(S405)がYesであり、挿入位置(8)が基準(基本部103の最大繰り返し量−移動数+1)値(8)以下の場合の例を示す。ここでは移動数を3と仮定するので、拡張部104のデータ項目D214を後方へ3移動する(D51004〜D51006)。   FIG. 5 is an explanatory diagram of data from (S405) to (S406) in the data eviction process shown in FIG. 4, and shows (a) basic data and (b) extended data. As shown in FIG. 5, when data is added to the data shown in FIG. 2, the determination (S <b> 405) is Yes, and the insertion position (8) is the reference (maximum repetition amount of the basic unit 103 −number of movements + 1). ) An example in the case of value (8) or less is shown. Here, since the number of movements is assumed to be 3, the data item D214 of the expansion unit 104 is moved backward 3 (D51004 to D51006).

追加しようとするデータの副キーが20050075とすると、このデータの挿入位置は副キー20050070の次であるので8となる。判断(S405)において、基準(基本部103の最大繰り返し量−移動数+1)値=10−3+1=8と、挿入位置8とを比較すると挿入位置8≦基準値8となるためYesである。よって、処理(S406)により基本部103のデータ項目の後方から移動数3だけ拡張部104に移動させる(D51001〜D51003)。その後、処理(S407)により追加データを基本部103の該当する位置へ挿入して終了する(D50008)。   If the subkey of the data to be added is 20050075, the insertion position of this data is next to the subkey 2005007 and is 8. In the determination (S405), when the reference position (maximum repetition amount of the basic unit 103−movement number + 1) value = 10−3 + 1 = 8 and the insertion position 8 are compared, the insertion position 8 ≦ the reference value 8 is satisfied, and therefore, “Yes”. Therefore, the process (S406) causes the extension unit 104 to move from the back of the data item of the basic unit 103 by the number of movements 3 (D51001 to D51003). Thereafter, additional data is inserted into the corresponding position of the basic unit 103 by the process (S407), and the process ends (D50008).

図6は図4に示すデータ追い出し処理のうち(S405)から(S408)に至るデータの説明図であり、(a)基本部データと、(b)拡張部データを示している。図6に示すように、図2で示したデータに対してデータを追加した時、判断(S405)がNoであり、挿入位置(10)が基準(基本部103の最大繰り返し量−移動数+1)値(8)より大きい場合の例を示す。ここでは移動数を3と仮定するので、拡張部104のデータ項目D214を後方へ3だけ移動する(D61004〜D61006)。   FIG. 6 is an explanatory diagram of data from (S405) to (S408) in the data eviction process shown in FIG. 4, and shows (a) basic part data and (b) extension part data. As shown in FIG. 6, when data is added to the data shown in FIG. 2, the determination (S405) is No, and the insertion position (10) is the reference (maximum repetition amount of basic unit 103−number of movements + 1). ) An example in which the value is greater than (8) is shown. Here, since the number of movements is assumed to be 3, the data item D214 of the expansion unit 104 is moved backward by 3 (D61004 to D61006).

追加しようとするデータの副キーが20050095とすると、このデータの挿入位置は副キー20050090の次であるので10となる。判断(S405)において、基準(基本部103の最大繰り返し量−移動数+1)値=10−3+1=8と、挿入位置10とを比較すると挿入位置10>基準値8となるためNoである。よって、処理(S408)により基本部103のデータ項目の後方から移動数3−1=2だけ拡張部104に移動させる(D61001、D61003)。その後、処理(S409)により追加データを拡張部104の該当する位置へ挿入して終了する(D61002)。   Assuming that the subkey of the data to be added is 20050095, the insertion position of this data is next to the subkey 2005090, so it is 10. In the determination (S405), when the insertion position 10 is compared with the reference (the maximum repetition amount of the basic unit 103−the number of movements + 1) value = 10−3 + 1 = 8 and the insertion position 10, the result is No. Therefore, the processing unit (S408) moves the extension unit 104 from the rear of the data item of the basic unit 103 by the number of movements 3-1 = 2 (D61001, D61003). Thereafter, the additional data is inserted into the corresponding position of the extension unit 104 through the process (S409), and the process ends (D61002).

以上により、基本部103の許容限度を超えてデータを追加しようとした場合、複数のデータをまとめて基本部103から拡張部104へ移動する。このことによって基本部103に空きを設けるので、その後、高頻度で追加データが発生してもデータ移動が必要となる確率を減らすことができる。   As described above, when data is to be added exceeding the allowable limit of the basic unit 103, a plurality of data is collectively moved from the basic unit 103 to the expansion unit 104. As a result, an empty space is provided in the basic unit 103, so that it is possible to reduce the probability that data movement is necessary even if additional data is frequently generated thereafter.

特に、基本部103が一旦許容限度に到達したならば、基本部103にデータを追加しようとする度にデータ移動を行わなければならない。したがって、本発明により基本部103の空きを作ることが、データ移動の処理負担を軽減するのに有効である。また、移動数を外部のパラメータ107で与えることにより、表毎に最適値を設定することができる。   In particular, once the basic unit 103 reaches the allowable limit, data must be moved every time data is added to the basic unit 103. Therefore, making the basic unit 103 empty according to the present invention is effective in reducing the processing load of data movement. Also, by giving the number of movements with an external parameter 107, an optimum value can be set for each table.

本実施形態に係るデータベースアクセスプログラムを備えたメインフレームのシステム構成図である。It is a system configuration figure of the mainframe provided with the database access program concerning this embodiment. 本システムに係るデータ構成図であり、(a)基本部データと、(b)拡張部データである。It is a data block diagram concerning this system, and is (a) basic part data and (b) expansion part data. データ追加要求の実行を示すフローチャートである。It is a flowchart which shows execution of a data addition request. データ追い出し処理を示すフローチャートである。It is a flowchart which shows a data eviction process. 図4に示すデータ追い出し処理のうち(S405)から(S406)に至るデータの説明図であり、(a)基本部データと、(b)拡張部データを示している。It is explanatory drawing of the data from (S405) to (S406) among the data eviction processes shown in FIG. 4, (a) Basic part data and (b) Extended part data are shown. 図4に示すデータ追い出し処理のうち(S405)から(S408)に至るデータの説明図であり、(a)基本部データと、(b)拡張部データを示している。It is explanatory drawing of the data from (S405) to (S408) among the data eviction processes shown in FIG. 4, (a) Basic part data and (b) Extended part data are shown. 従来からあるリレーショナルデータベースへのアクセス手法において行単位取得するデータ定義の説明図である。It is explanatory drawing of the data definition acquired per line in the conventional access method to a relational database. 従来からあるリレーショナルデータベースへのアクセス手法において縦分割するデータ定義の説明図である。It is explanatory drawing of the data definition divided | segmented vertically in the conventional access method to the relational database.

符号の説明Explanation of symbols

101 メインフレーム
102 データベースアクセスプログラム
103 データベース(基本部)
104 データベース(拡張部)
107 パラメータ(ファイル)
108 業務プログラム
105 基本部データ
106 拡張部データ
D201、D211 主キー
D202 拡張部先頭キー
D203 有効データ数
D204 データ項目
D205、D215 副キー
D206、D216 データ内容
D213 有効データ数
D214 データ項目

101 Mainframe 102 Database access program 103 Database (basic part)
104 Database (extended part)
107 Parameters (file)
108 Business Program 105 Basic Data 106 Extended Data D201, D211 Primary Key D202 Extended Data Head Key D203 Number of Valid Data D204 Data Item D205, D215 Subkey D206, D216 Data Contents D213 Valid Data Number D214 Data Item

Claims (4)

ネットワークに接続され複数のクライアントコンピュータからのアクセス要求を集中的に処理するメインフレームを中核に備えたデータベースアクセスシステムにおいて、
基本部および拡張部に縦分割されたデータベースと、
前記基本部の収容能力を超えるレコード追加があれば基本部から拡張部へ複数まとめてデータ移動を行うデータ追い出し処理手段と、を備えたことを特徴とするデータベースアクセスシステム。
In a database access system having a mainframe connected to a network and centrally processing access requests from a plurality of client computers,
A database divided vertically into a basic part and an extended part;
A database access system comprising: data eviction processing means for moving a plurality of data from the basic part to the extension part if there is a record addition exceeding the capacity of the basic part.
前記データ追い出し処理手段には、
前記データ移動の際に指定した数を同時にまとめて実行するためのパラメータファイルを備えたことを特徴とする請求項1に記載のデータベースアクセスシステム。
The data eviction processing means includes
2. The database access system according to claim 1, further comprising a parameter file for collectively executing the number designated at the time of data movement.
ネットワークに接続され複数のクライアントコンピュータから基本部および拡張部に縦分割されたデータベースへのアクセス要求を集中的に処理するメインフレームに具備されたデータベースアクセスプログラムにおいて、
前記基本部における基本部データの最大繰り返し量に対する前記基本部の有効データ数を比較することにより前記基本部に空きが有るか否かを判断する処理と、
前記判断により空きがなければ、前記基本部から拡張部に複数まとめてデータを移動させるデータ追い出し処理と、を含む処理を前記メインフレームに実行させることを特徴とするデータベースアクセスプログラム。
In a database access program provided in a mainframe that centrally processes access requests to a database vertically divided into a basic part and an extension part from a plurality of client computers connected to a network,
A process of determining whether or not there is a vacancy in the basic part by comparing the number of valid data of the basic part with respect to a maximum repetition amount of the basic part data in the basic part;
A database access program for causing the mainframe to execute a process including a data eviction process for moving a plurality of data collectively from the basic unit to the expansion unit if there is no free space by the determination.
前記データ追い出し処理には、
前記複数まとめてデータを移動させるためにパラメータファイルより移動数を取得する処理を含むことを特徴とする請求項3に記載のデータベースアクセスプログラム。

In the data eviction process,
4. The database access program according to claim 3, further comprising a process of acquiring a movement number from a parameter file in order to move the plurality of data collectively.

JP2006230632A 2006-08-28 2006-08-28 Database access system and its program Pending JP2008052635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006230632A JP2008052635A (en) 2006-08-28 2006-08-28 Database access system and its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006230632A JP2008052635A (en) 2006-08-28 2006-08-28 Database access system and its program

Publications (1)

Publication Number Publication Date
JP2008052635A true JP2008052635A (en) 2008-03-06

Family

ID=39236611

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006230632A Pending JP2008052635A (en) 2006-08-28 2006-08-28 Database access system and its program

Country Status (1)

Country Link
JP (1) JP2008052635A (en)

Similar Documents

Publication Publication Date Title
JP4611830B2 (en) Database management system and method
CN107273522B (en) Multi-application-oriented data storage system and data calling method
US9063982B2 (en) Dynamically associating different query execution strategies with selective portions of a database table
US7162693B2 (en) Process for managing data in which existing data item is moved to neighbor page before insertion or after deletion of another data item
US9177019B2 (en) Computer system for optimizing the processing of a query
US20020116364A1 (en) Database management program, a database managing method and an apparatus therefor
EP2608071A1 (en) Hybrid database table stored as both row and column store
EP2608072A1 (en) Hybrid database table stored as both row and column store
EP2608070A1 (en) Hybrid database table stored as both row and column store
CN106557578B (en) Historical data query method and system
US20080040406A1 (en) System and method for controlling free space distribution by key range within a database
JP5567967B2 (en) Cache control method, system and program in database
JP2008225575A (en) Computer load estimation system and method
US20180349422A1 (en) Database management system, database server, and database management method
CN101414295A (en) Method for upgrading database
JP5790755B2 (en) Database management apparatus and database management method
JP5287071B2 (en) Database management system and program
US6269359B1 (en) Relational data base system and method for rapidly realizing a query to a database
CN109725852B (en) Current-limiting counting optimization method and terminal
WO2012081165A1 (en) Database management device and database management method
JP2008052635A (en) Database access system and its program
KR20190129474A (en) Apparatus and method for retrieving data
US7565217B2 (en) Traversal of empty regions in a searchable data structure
US7617249B2 (en) Method and system of handling document operation requests on documents having large collections with constrained memory
JP4951326B2 (en) Computer program for optimizing the processing order of I / O requests