JP2002108669A - Method for processing data base access - Google Patents

Method for processing data base access

Info

Publication number
JP2002108669A
JP2002108669A JP2000297919A JP2000297919A JP2002108669A JP 2002108669 A JP2002108669 A JP 2002108669A JP 2000297919 A JP2000297919 A JP 2000297919A JP 2000297919 A JP2000297919 A JP 2000297919A JP 2002108669 A JP2002108669 A JP 2002108669A
Authority
JP
Japan
Prior art keywords
database
application
data
access
logical structure
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
JP2000297919A
Other languages
Japanese (ja)
Other versions
JP3865197B2 (en
Inventor
Kazumasa Nakajima
千昌 中島
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 JP2000297919A priority Critical patent/JP3865197B2/en
Publication of JP2002108669A publication Critical patent/JP2002108669A/en
Application granted granted Critical
Publication of JP3865197B2 publication Critical patent/JP3865197B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a data base access processing method for managing reference to data from a data base and the addition, update, and erasure processing of the data to the data base in a batch without making it necessary for an application to consider any physical structure defined in the data base. SOLUTION: In a data base access processing method in a system in which a physical structure defined in a data base is different from a logical structure to be used by an application, at the time of referring to or updating the data base from the application, the physical structure defined in the data base is converted into the logical structure to be used by the application, or the logical structure to be used by the application is converted into the physical structure defined in the data base.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、モバイルコンピュ
ータなど小型の携帯端末上で稼動するシステムにおい
て、処理性能を向上させる際に重要な要素となるデータ
ベースの定義方法、及びデータベースへのアクセス処理
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for defining a database, which is an important factor in improving processing performance, and a method for processing access to a database in a system operating on a small portable terminal such as a mobile computer. .

【0002】[0002]

【従来の技術】データベースを使用したシステム開発で
は、システムの処理性能を向上させる過程でデータベー
スへのアクセス処理時間の対策が不可欠となる。例え
ば、画面表示処理及び画面終了処理において、データベ
ースへのアクセスに要する処理時間は、画面表示に要す
る処理時間と比較して比重が大きいといえる。従って、
データベースへのアクセス処理時間を短縮することが、
全体の処理時間の短縮に最も有効な手段となる。
2. Description of the Related Art In the development of a system using a database, it is indispensable to take measures against the processing time for accessing the database in the process of improving the processing performance of the system. For example, in the screen display processing and the screen end processing, it can be said that the processing time required for accessing the database has a greater specific gravity than the processing time required for screen display. Therefore,
Reducing database access processing time
This is the most effective means for reducing the overall processing time.

【0003】また、データベースを使用したシステムに
おいて、使用されるデータベースのモデルは、コンピュ
ータの処理性能の高速化から、クエリの最適化、並列処
理、及びデータの分散化等の高度な機能を備えたリレー
ショナルデータベースが主流となっている。リレーショ
ナルデータベースが広く支持されてきた理由は、データ
ベースの物理的な構造が隠され、アプリケーションは二
次元の単純な表としての論理的な構造のみを意識すれ
ば、SQLという非手続き型の問い合わせ言語により必
要とするデータを容易にアクセスできることにある。
In a system using a database, a database model used has advanced functions such as query optimization, parallel processing, and data distribution, in order to speed up computer processing performance. Relational databases are the mainstream. The reason that relational databases have been widely supported is that the physical structure of the database is hidden, and if the application is only aware of the logical structure as a simple two-dimensional table, SQL can use the non-procedural query language SQL. Easy access to necessary data.

【0004】[0004]

【発明が解決しようとする課題】モバイルコンピュータ
などとして使用する小型の携帯端末は、より持ち歩きや
すくするためにコンピュータ本体の大きさを小型化し、
より長時間のバッテリー駆動を可能にするために低消費
電力のCPUを使用している。その結果、ノート型のコ
ンピュータと比較して、より高い携帯性とより効率的な
パワーマネージメントを実現している。その反面、前記
の低消費電力CPUの処理性能は、ノート型のコンピュ
ータに搭載されるCPUと比較して低速であるという弱
点がある。このような環境で動作するシステム開発にお
いてリレーショナルデータベースを使用する場合、CP
Uの処理性能がネックとなるため、データベースへのア
クセス処理の性能を確保するには、I/O数を抑えるた
めのテーブル構造の見直し、及び項目の統合を行い物理
的なカラム数を最小限にするためのレコード構造の見直
しといったデータベース設計が必要となる。
A small portable terminal used as a mobile computer or the like has a reduced size of a computer main body in order to make it more portable.
A low-power-consumption CPU is used in order to enable longer battery operation. The result is higher portability and more efficient power management than laptop computers. On the other hand, the processing performance of the low power consumption CPU is slower than that of a CPU mounted on a notebook computer. When using a relational database in the development of a system operating in such an environment, the CP
Since the processing performance of U becomes a bottleneck, in order to secure the performance of database access processing, review the table structure to suppress the number of I / Os and integrate the items to minimize the number of physical columns. It is necessary to design a database, such as reviewing the record structure in order to achieve this.

【0005】アプリケーションの製造工程は、データベ
ース設計が完了してから着手するのが一般的だが、携帯
端末上で稼動するシステムの開発では、データベースへ
のアクセス処理性能を常に意識しなければならず、デー
タベースの再設計が随時発生することになり、テーブル
構造の見直しが発生する度に、多大な修正工数が発生す
るという問題がある。
[0005] In general, an application manufacturing process is started after database design is completed. However, in the development of a system that operates on a portable terminal, it is necessary to always consider the performance of database access processing. There is a problem that a redesign of the database occurs at any time, and every time the table structure is reconsidered, a large number of correction man-hours are required.

【0006】また、データベースに定義する性能を考慮
したデータ構造とアプリケーションが使用するのに適し
ているデータ構造とが異なる場合、アプリケーションは
データベースに定義している物理的なデータ構造を意識
することになり、データベースの物理的な構造を隠すこ
とが可能であるというリレーショナルデータベースの長
所を活用できなくなるという問題がある。
If the data structure defined in the database taking into account the performance is different from the data structure suitable for use by the application, the application must be aware of the physical data structure defined in the database. In other words, there is a problem that the advantage of a relational database that the physical structure of the database can be hidden cannot be utilized.

【0007】本発明の目的は、データベースに定義され
た物理的な構造をアプリケーションが意識せずに、デー
タベースからのデータの参照、及びデータベースへのデ
ータの追加、更新、及び削除処理を一括して管理するデ
ータベースアクセス処理方法を提供することである。
An object of the present invention is to refer to data from a database and add, update, and delete data to and from a database in a batch without the application being aware of the physical structure defined in the database. The object is to provide a database access processing method to manage.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、請求項1に係る発明は、データベースに定義された
物理的な構造とアプリケーションが使用する論理的な構
造が異なるシステムにおけるデータベースアクセス処理
方法において、アプリケーションからデータベースを参
照または更新するとき、データベースに定義された物理
的な構造をアプリケーションが使用する論理的な構造へ
変換し、またはアプリケーションが使用する論理的な構
造をデータベースに定義された物理的な構造へ変換する
ステップを備えたことを特徴とする。
According to one aspect of the present invention, there is provided a database access processing in a system in which a physical structure defined in a database differs from a logical structure used by an application. In the method, when referencing or updating the database from the application, the physical structure defined in the database is converted into the logical structure used by the application, or the logical structure used by the application is defined in the database. The method further comprises a step of converting to a physical structure.

【0009】請求項2に係る発明は、データベースに定
義された物理的な構造とアプリケーションが使用する論
理的な構造が異なるシステムにおけるデータベースアク
セス処理方法において、アプリケーションからデータベ
ースを参照するときに、データベースに対してアクセス
するべきデータのアクセス情報として、テーブルID及
びアクセスキーをアプリケーションから取得するステッ
プと、前記テーブルID及びアクセスキーを用いてデー
タベースから対象データを検索するステップと、検索さ
れた対象データを、データベースに定義された物理的な
構造からアプリケーションが使用する論理的な構造へ変
換するステップと、論理的な構造とした対象データをア
プリケーションへ返すステップとを備えたことを特徴と
する。
According to a second aspect of the present invention, there is provided a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different from each other. Acquiring a table ID and an access key from an application as access information of data to be accessed for the application, searching for target data from a database using the table ID and the access key, and The method includes a step of converting a physical structure defined in a database to a logical structure used by an application, and a step of returning target data having the logical structure to the application.

【0010】請求項3に係る発明は、データベースに定
義された物理的な構造とアプリケーションが使用する論
理的な構造が異なるシステムにおけるデータベースアク
セス処理方法において、アプリケーションからデータベ
ースにデータを追加するときに、データベースに対して
アクセスするべきデータのアクセス情報として、テーブ
ルID、アクセスキー、及び追加データをアプリケーシ
ョンから取得するステップと、前記追加データを、アプ
リケーションが使用する論理的な構造からデータベース
に定義された物理的な構造へ変換するステップと、前記
テーブルID及びアクセスキーを用いてデータベースに
対象データを追加するステップとを備えたことを特徴と
する。
According to a third aspect of the present invention, in the database access processing method in a system in which the physical structure defined in the database and the logical structure used by the application are different, when data is added from the application to the database, Obtaining a table ID, an access key, and additional data from the application as access information of data to be accessed to the database; and transmitting the additional data to the physical data defined in the database from a logical structure used by the application. And a step of adding target data to a database using the table ID and the access key.

【0011】請求項4に係る発明は、データベースに定
義された物理的な構造とアプリケーションが使用する論
理的な構造が異なるシステムにおけるデータベースアク
セス処理方法において、アプリケーションからデータベ
ースにデータを更新するときに、データベースに対して
アクセスするべきデータのアクセス情報として、テーブ
ルID、アクセスキー、及び更新データをアプリケーシ
ョンから取得するステップと、前記更新データを、アプ
リケーションが使用する論理的な構造からデータベース
に定義された物理的な構造へ変換するステップと、前記
テーブルID及びアクセスキーを用いて前記更新データ
でデータベースの対象データを更新するステップとを備
えたことを特徴とする。
According to a fourth aspect of the present invention, in the database access processing method in a system in which the physical structure defined in the database and the logical structure used by the application are different, when data is updated from the application to the database, A step of obtaining a table ID, an access key, and update data from the application as access information of data to be accessed to the database; and transmitting the update data to the physical data defined in the database from a logical structure used by the application. And a step of updating target data of a database with the update data using the table ID and the access key.

【0012】請求項5に係る発明は、請求項1から4の
何れか1つに記載のデータベースアクセス処理方法にお
いて、データベースの参照データをアプリケーションに
返すとき、またはアプリケーションから追加/更新デー
タをデータベースに渡すとき、それらのデータの格納場
所を示すポインタを授受することでデータの授受を行う
ことを特徴とする。
According to a fifth aspect of the present invention, there is provided the database access processing method according to any one of the first to fourth aspects, wherein reference data of the database is returned to the application, or additional / updated data is transmitted from the application to the database. When passing the data, the data is transmitted and received by transmitting and receiving a pointer indicating the storage location of the data.

【0013】[0013]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面に従って説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0014】図1は、本発明の実施の形態に係る携帯端
末の構成を示すブロック図である。この携帯端末は、図
1に示すように、CPU105及び内部記憶装置106
を有する処理装置101と、業務データを格納している
データベース107を有する外部記憶装置102と、デ
ータの表示装置として使用するディスプレイ103と、
データの入力装置として使用するタッチペン104とを
備えている。
FIG. 1 is a block diagram showing a configuration of a portable terminal according to an embodiment of the present invention. As shown in FIG. 1, the mobile terminal includes a CPU 105 and an internal storage device 106.
An external storage device 102 having a database 107 storing business data, a display 103 used as a data display device,
A touch pen 104 used as a data input device.

【0015】処理装置101内のCPU105及び内部
記憶装置106は、携帯端末をより持ち歩きやすくする
ために、小型かつ低消費電力のものを使用している。ま
た、ディスプレイ103は、タッチペン104を使用し
たタップ操作による入力を可能としているため、ここで
は入力装置としてキーボードは使用しない。本実施の形
態では、このような携帯端末を例とするが、もちろん一
般的な表示機能のみのディスプレイとキーボードを備え
た携帯端末であってもよい。
The CPU 105 and the internal storage device 106 in the processing device 101 are of small size and have low power consumption in order to make the portable terminal more portable. In addition, since the display 103 enables input by a tap operation using the touch pen 104, a keyboard is not used as an input device here. In the present embodiment, such a mobile terminal is taken as an example, but a mobile terminal having a display and a keyboard having only a general display function may of course be used.

【0016】図2は、データベースアクセスモジュール
とアプリケーションの処理構成図である。図1の携帯端
末において、個々の処理が使用するデータの構造と、個
々の処理に適したデータ構造に変換されている様子を示
している。以下、データベース107に定義された物理
的な構造を物理構造205と、アプリケーションが使用
する論理的な構造を論理構造206と呼ぶ。
FIG. 2 is a processing configuration diagram of the database access module and the application. In the portable terminal shown in FIG. 1, the data structure used by each process and the state where the data is converted into a data structure suitable for each process are shown. Hereinafter, the physical structure defined in the database 107 is called a physical structure 205, and the logical structure used by the application is called a logical structure 206.

【0017】内部記憶装置106には、アプリケーショ
ン201、データ領域202、データベース参照モジュ
ール203、及びデータベース更新モジュール204
が、記憶あるいは確保されている。アプリケーション2
01は、データを操作するための領域としてデータ領域
202を確保している。
The internal storage device 106 includes an application 201, a data area 202, a database reference module 203, and a database update module 204.
Is stored or secured. Application 2
No. 01 secures a data area 202 as an area for operating data.

【0018】個々の処理で使用するデータ構造は、破線
で示したように論理構造206を使用する処理群と物理
構造205を使用する処理群に大別することができる。
つまり、データベース107に対してテーブル定義の見
直し等の原因により物理構造205に変更があった場
合、データベース参照モジュール203の物理定義及び
データベース更新モジュール204の物理定義に対する
改修に絞られるため、データベース107の変更に対す
る極めて柔軟な対応を可能とした処理構成となってい
る。
The data structure used in each process can be broadly divided into a process group using the logical structure 206 and a process group using the physical structure 205 as shown by a broken line.
In other words, if the physical structure 205 is changed due to a review of the table definition or the like in the database 107, the modification is made to the physical definition of the database reference module 203 and the physical definition of the database update module 204. It has a processing configuration that enables extremely flexible response to changes.

【0019】図3は、データベースアクセスモジュール
とアプリケーションの処理内容を示すフローチャートで
ある。データベース107より取得したデータをディス
プレイ103に表示し、入力データをデータベース10
7に反映する更新処理を例として、図2の処理構成図を
用いて説明する。
FIG. 3 is a flowchart showing the processing contents of the database access module and the application. The data obtained from the database 107 is displayed on the display 103, and the input data is
7 will be described using the processing configuration diagram of FIG. 2 as an example.

【0020】まず、アプリケーション201は、データ
ベース参照モジュール203を起動する(ステップ30
1)。この際、アプリケーション201が確保している
データ領域202のポインタを引き渡す。
First, the application 201 starts the database reference module 203 (step 30).
1). At this time, the application 201 passes the pointer of the data area 202 secured.

【0021】起動されたデータベース参照モジュール2
03は、データベース107から対象データを取得し
て、取得したデータをデータ領域202へ格納する(ス
テップ302)。格納処理が終了した時点で、データベ
ース参照モジュール203を終了し、アプリケーション
201の処理を継続する。
The activated database reference module 2
03 acquires the target data from the database 107 and stores the acquired data in the data area 202 (Step 302). When the storage processing ends, the database reference module 203 ends, and the processing of the application 201 continues.

【0022】データをディスプレイ103に表示する場
合、アプリケーション201はデータ領域202に格納
されている論理構造206のデータを使用する(ステッ
プ303)。また、ディスプレイ103においてタッチ
ペン104による入力があった場合、アプリケーション
201は入力されたデータでデータ領域202を更新す
る(ステップ304)。次に、入力データをデータベー
ス107へ反映するために、データベース更新モジュー
ル204を起動する(ステップ305)。この際、入力
データを格納しているデータ領域202のポインタを引
き渡す。
When displaying data on the display 103, the application 201 uses the data of the logical structure 206 stored in the data area 202 (step 303). When an input is made on the display 103 with the touch pen 104, the application 201 updates the data area 202 with the input data (step 304). Next, the database update module 204 is started to reflect the input data on the database 107 (step 305). At this time, the pointer of the data area 202 storing the input data is delivered.

【0023】起動されたデータベース更新モジュール2
04は、データ領域202に格納された対象データを取
得して、取得したデータでデータベース107を更新す
る(ステップ306)。更新処理が終了した時点で、デ
ータベース更新モジュール204を終了し、アプリケー
ション201の処理は完了する。
The activated database update module 2
04 acquires the target data stored in the data area 202 and updates the database 107 with the acquired data (step 306). When the update processing ends, the database update module 204 ends, and the processing of the application 201 ends.

【0024】次に、データベース参照モジュール203
とデータベース更新モジュール204の処理内容の詳細
を、図4及び図5のフローチャートを使用して説明す
る。
Next, the database reference module 203
And the details of the processing contents of the database update module 204 will be described with reference to the flowcharts of FIGS.

【0025】図4は、データベース参照モジュール20
3の処理内容を示すフローチャートである。アプリケー
ション201から起動されたデータベース参照モジュー
ル203は、アプリケーション201から引数としてア
クセス情報408を取得する(ステップ401)。アク
セス情報408には、対象のテーブルID、対象データ
のアクセスキー、アクセス方法、及び、参照データの格
納場所を示すポインタをセットする。ここでは、アクセ
ス方法には「参照」が設定されている。
FIG. 4 shows the database reference module 20.
9 is a flowchart showing the processing contents of Step 3. The database reference module 203 started from the application 201 acquires the access information 408 from the application 201 as an argument (step 401). In the access information 408, a target table ID, an access key of target data, an access method, and a pointer indicating a storage location of reference data are set. Here, “access” is set as the access method.

【0026】次に、テーブルID及びアクセスキーを使
用したSQLを発行して、データベース107から対象
データを検索する(ステップ402)。ここで、データ
ベース107に対象データが存在するか判定する(ステ
ップ403)。対象データが存在しなかった場合は、処
理が失敗したと判断し、ステップ407へジャンプす
る。対象データが存在した場合は、データベース107
から対象データを物理構造205で取得する(ステップ
404)。更に、取得したデータを物理構造205から
論理構造206へ変換する(ステップ405)。そし
て、論理構造206へ変換した取得データを、ポインタ
で指定されたデータ領域202に格納する(ステップ4
06)。
Next, SQL using the table ID and the access key is issued, and the target data is searched from the database 107 (step 402). Here, it is determined whether the target data exists in the database 107 (step 403). If the target data does not exist, it is determined that the processing has failed, and the process jumps to step 407. If the target data exists, the database 107
, The target data is acquired by the physical structure 205 (step 404). Further, the acquired data is converted from the physical structure 205 to the logical structure 206 (Step 405). Then, the acquired data converted into the logical structure 206 is stored in the data area 202 specified by the pointer (step 4).
06).

【0027】最後に、処理結果409を戻り値としてア
プリケーション201へ返す(ステップ407)。処理
結果409には、成功または失敗を示す識別情報をセッ
トする。
Finally, the processing result 409 is returned to the application 201 as a return value (step 407). In the processing result 409, identification information indicating success or failure is set.

【0028】図5は、データベース更新モジュール20
4の処理内容を示すフローチャートである。アプリケー
ション201から起動されたデータベース更新モジュー
ル204は、アプリケーション201から引数としてア
クセス情報514を取得する(ステップ501)。アク
セス情報514には、対象のテーブルID、対象データ
のアクセスキー、アクセス方法、追加/更新データの格
納場所を示すポインタをセットする。アクセス方法に
は、追加、更新、及び削除等の情報が設定される。次
に、アクセス方法の判定結果で処理が分岐する(ステッ
プ502)。アクセス方法が追加の場合はステップ50
3へ、更新の場合はステップ507へ、削除の場合はス
テップ511へ分岐する。
FIG. 5 shows the database update module 20
6 is a flowchart showing the contents of processing 4; The database update module 204 started from the application 201 acquires the access information 514 from the application 201 as an argument (step 501). In the access information 514, a target table ID, an access key of target data, an access method, and a pointer indicating a storage location of added / updated data are set. Information such as addition, update, and deletion is set in the access method. Next, the process branches depending on the determination result of the access method (step 502). Step 50 if the access method is additional
3, the process branches to step 507 in the case of updating, or to step 511 in the case of deletion.

【0029】まず、アクセス方法が追加の場合の処理内
容を説明する。最初に、データベース107に対象デー
タが存在するか判定する(ステップ503)。対象デー
タが存在した場合、キーが重複するため処理が失敗した
と判断し、ステップ513へジャンプする。対象データ
が存在しなかった場合は、ポインタで指定されたデータ
領域202から、論理構造206の追加データを取得す
る(ステップ504)。更に、取得した追加データを論
理構造206から物理構造205へ変換する(ステップ
505)。そして、テーブルID及びアクセスキーを使
用したSQLを発行して、物理構造205へ変換した追
加データをデータベース107へ追加する(ステップ5
06)。
First, the contents of processing when the access method is added will be described. First, it is determined whether the target data exists in the database 107 (step 503). If the target data exists, it is determined that the processing has failed because the key is duplicated, and the process jumps to step 513. If the target data does not exist, additional data of the logical structure 206 is obtained from the data area 202 specified by the pointer (step 504). Further, the acquired additional data is converted from the logical structure 206 to the physical structure 205 (Step 505). Then, an SQL using the table ID and the access key is issued, and the additional data converted into the physical structure 205 is added to the database 107 (step 5).
06).

【0030】次に、アクセス方法が更新の場合の処理内
容を説明する。最初に、データベース107に対象デー
タが存在するか判定する(ステップ507)。対象デー
タが存在しなかった場合、処理が失敗したと判断し、ス
テップ513へジャンプする。対象データが存在した場
合は、ポインタで指定されたデータ領域202から、論
理構造206の更新データを取得する(ステップ50
8)。更に、取得した更新データを論理構造206から
物理構造205へ変換する(ステップ509)。そし
て、テーブルID及びアクセスキーを使用したSQLを
発行して、物理構造205へ変換した更新データでデー
タベース107へ更新する(ステップ510)。
Next, the processing content when the access method is update will be described. First, it is determined whether the target data exists in the database 107 (step 507). If the target data does not exist, it is determined that the processing has failed, and the process jumps to step 513. If the target data exists, the update data of the logical structure 206 is obtained from the data area 202 specified by the pointer (step 50).
8). Further, the acquired update data is converted from the logical structure 206 to the physical structure 205 (Step 509). Then, an SQL using the table ID and the access key is issued, and the database 107 is updated with the update data converted into the physical structure 205 (step 510).

【0031】更に、アクセス方法が削除の場合の処理内
容を説明する。最初に、データベース107に対象デー
タが存在するか判定する(ステップ511)。対象デー
タが存在しなかった場合、処理が失敗したと判断し、ス
テップ513へジャンプする。対象データが存在した場
合はテーブルID及びアクセスキーを使用したSQLを
発行して、データベース107から対象データを削除す
る(ステップ512)。
Further, the processing content when the access method is delete will be described. First, it is determined whether the target data exists in the database 107 (step 511). If the target data does not exist, it is determined that the processing has failed, and the process jumps to step 513. If the target data exists, SQL using the table ID and the access key is issued, and the target data is deleted from the database 107 (step 512).

【0032】最後に、追加、更新、及び削除処理におけ
る処理結果515を戻り値としてアプリケーション20
1へ返す(ステップ513)。処理結果515には、成
功または失敗を示す識別情報をセットする。
Finally, the processing result 515 in the addition, update, and deletion processing is set as a return value, and the
1 is returned (step 513). In the processing result 515, identification information indicating success or failure is set.

【0033】次に、図4のステップ405、図5のステ
ップ505及びステップ509におけるデータ構造の変
換処理の詳細を、図6の説明図を使用して説明する。
Next, the details of the data structure conversion processing in step 405 in FIG. 4 and steps 505 and 509 in FIG. 5 will be described with reference to the explanatory diagram of FIG.

【0034】図6は、物理定義、及び論理定義の概要構
成を説明するための説明図である。データベース参照モ
ジュール203とデータベース更新モジュール204に
は、データベース107に定義されているテーブル群の
構造体が、物理定義603及び論理定義601として定
義してある。それぞれの構造の定義例は、ソースコード
602及びソースコード604に示す。データ構造を変
換する場合、ソースコード602及びソースコード60
4を使用して変換処理を行う。
FIG. 6 is an explanatory diagram for explaining a schematic configuration of the physical definition and the logical definition. In the database reference module 203 and the database update module 204, a structure of a table group defined in the database 107 is defined as a physical definition 603 and a logical definition 601. Examples of definition of each structure are shown in source code 602 and source code 604. When converting the data structure, the source code 602 and the source code 60
4 is used to perform the conversion process.

【0035】次に、テーブル構造の見直しが発生した場
合の改修手順を、図7のフローチャートと図8の説明図
を使用して説明する。
Next, a repair procedure when the table structure is reviewed will be described with reference to the flowchart of FIG. 7 and the explanatory diagram of FIG.

【0036】図7は、テーブル構造の見直しが発生した
場合の改修手順を示すフローチャートである。テーブル
構造の見直しは、性能向上等の対策として発生すると考
えられる(ステップ701)。まず、テーブル構造の見
直し結果を、データベース107のテーブル定義へ反映
させる(ステップ702)。次に、データベース参照モ
ジュール203とデータベース更新モジュール204の
物理定義603を修正する(ステップ703、ステップ
704)。以上の手順で、改修作業は完了する。物理構
造205を使用している部分のみが修正の対象となるた
め、アプリケーション201に対する修正作業は発生し
ない。
FIG. 7 is a flowchart showing a repair procedure when a review of the table structure occurs. The review of the table structure is considered to occur as a measure such as performance improvement (step 701). First, the review result of the table structure is reflected in the table definition of the database 107 (step 702). Next, the physical definition 603 of the database reference module 203 and the database update module 204 is corrected (Step 703, Step 704). The renovation work is completed by the above procedure. Since only the part using the physical structure 205 is to be corrected, no correction work is performed on the application 201.

【0037】図8は、物理定義の変更例を説明するため
の説明図である。例えば、見直し前の項目X801と項
目Y802を、見直し後の項目Z804に統合するとす
る。データベース参照モジュール203とデータベース
更新モジュール204では、見直し前のソースコード8
03及び見直し後のソースコード804に示すように、
構造体に定義している項目名及び桁数をそれぞれ修正す
る。以上が、データベース参照モジュール203とデー
タベース更新モジュール204に対する修正内容であ
る。この物理定義の変更に伴って、アプリケーション2
01に対する修正作業は発生しない。
FIG. 8 is an explanatory diagram for explaining a modification example of the physical definition. For example, assume that the item X801 and the item Y802 before the review are integrated into the item Z804 after the review. In the database reference module 203 and the database update module 204, the source code 8
03 and the revised source code 804,
Correct the item name and the number of digits defined in the structure. The above is the contents of corrections to the database reference module 203 and the database update module 204. With the change of the physical definition, application 2
No correction work is performed on 01.

【0038】[0038]

【発明の効果】以上説明したように、本発明によれば、
アプリケーションからデータベースを参照または更新す
るとき、データベースに定義された物理的な構造をアプ
リケーションが使用する論理的な構造へ変換し、または
アプリケーションが使用する論理的な構造をデータベー
スに定義された物理的な構造へ変換するようにしている
ので、データベースの再設計が随時発生することにより
テーブル構造の見直しが発生した場合、アプリケーショ
ンから独立したデータベース参照モジュールの物理定義
及びデータベース更新モジュールの物理定義に対する改
修に絞ることで、データベースの変更に対する極めて柔
軟な対応を可能としている。また、アプリケーションは
データベースに定義している物理的なデータ構造を意識
する必要がなく、アプリケーションが使用するのに適し
たデータ構造のみを意識すればよいことになり、データ
ベースの物理的な構造を隠すことが可能であるという、
リレーショナルデータベースの長所を活用することを可
能としている。
As described above, according to the present invention,
When referencing or updating a database from an application, the physical structure defined in the database is converted to the logical structure used by the application, or the logical structure used by the application is converted into the physical structure defined in the database. Since the conversion to the structure is performed, if the table structure is reviewed due to the redesign of the database as needed, focus on the modification of the physical definition of the database reference module and the physical definition of the database update module independent of the application. This enables extremely flexible response to database changes. Also, the application does not need to be aware of the physical data structure defined in the database, and only needs to be aware of the data structure that is suitable for use by the application, which hides the physical structure of the database. That it is possible,
It allows you to take advantage of relational databases.

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

【図1】本発明の一実施形態である携帯端末の構成を示
すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a mobile terminal according to an embodiment of the present invention.

【図2】データベースアクセスモジュールとアプリケー
ションの処理構成図である。
FIG. 2 is a processing configuration diagram of a database access module and an application.

【図3】データベースアクセスモジュールとアプリケー
ションの処理内容を示すフローチャート図である。
FIG. 3 is a flowchart showing processing contents of a database access module and an application.

【図4】データベース参照モジュールの処理内容を示す
フローチャート図である。
FIG. 4 is a flowchart showing the processing contents of a database reference module.

【図5】データベース更新モジュールの処理内容を示す
フローチャート図である。
FIG. 5 is a flowchart illustrating processing performed by a database update module.

【図6】物理定義、論理定義の概要構成を説明するため
の説明図である。
FIG. 6 is an explanatory diagram for explaining a schematic configuration of a physical definition and a logical definition.

【図7】テーブル構造の見直しが発生した場合の改修手
順を示すフローチャート図である。
FIG. 7 is a flowchart illustrating a repair procedure when a review of the table structure occurs.

【図8】物理定義の変更例を説明するための説明図であ
る。
FIG. 8 is an explanatory diagram for explaining a modification example of a physical definition.

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

101…処理装置、102…外部記憶装置、103…デ
ィスプレイ、104…タッチペン、105…CPU、1
06…内部記憶装置、107…データベース。
101: processing device, 102: external storage device, 103: display, 104: touch pen, 105: CPU, 1
06: Internal storage device, 107: Database.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】データベースに定義された物理的な構造と
アプリケーションが使用する論理的な構造が異なるシス
テムにおけるデータベースアクセス処理方法において、 アプリケーションからデータベースを参照または更新す
るとき、データベースに定義された物理的な構造をアプ
リケーションが使用する論理的な構造へ変換し、または
アプリケーションが使用する論理的な構造をデータベー
スに定義された物理的な構造へ変換するステップを備え
たことを特徴とするデータベースアクセス処理方法。
In a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, when an application refers to or updates a database, the physical structure defined in the database is changed. Converting a logical structure to a logical structure used by an application, or converting a logical structure used by an application to a physical structure defined in a database. .
【請求項2】データベースに定義された物理的な構造と
アプリケーションが使用する論理的な構造が異なるシス
テムにおけるデータベースアクセス処理方法において、 アプリケーションからデータベースを参照するときに、
データベースに対してアクセスするべきデータのアクセ
ス情報として、テーブルID及びアクセスキーをアプリ
ケーションから取得するステップと、 前記テーブルID及びアクセスキーを用いてデータベー
スから対象データを検索するステップと、 検索された対象データを、データベースに定義された物
理的な構造からアプリケーションが使用する論理的な構
造へ変換するステップと、 論理的な構造とした対象データをアプリケーションへ返
すステップとを備えたことを特徴とするデータベースア
クセス処理方法。
2. A database access processing method in a system in which a physical structure defined in a database differs from a logical structure used by an application.
A step of obtaining a table ID and an access key from an application as access information of data to be accessed to the database; a step of searching for target data from the database using the table ID and the access key; Database access comprising converting a physical structure defined in a database into a logical structure used by an application, and returning the logically structured target data to the application. Processing method.
【請求項3】データベースに定義された物理的な構造と
アプリケーションが使用する論理的な構造が異なるシス
テムにおけるデータベースアクセス処理方法において、 アプリケーションからデータベースにデータを追加する
ときに、データベースに対してアクセスするべきデータ
のアクセス情報として、テーブルID、アクセスキー、
及び追加データをアプリケーションから取得するステッ
プと、 前記追加データを、アプリケーションが使用する論理的
な構造からデータベースに定義された物理的な構造へ変
換するステップと、 前記テーブルID及びアクセスキーを用いてデータベー
スに対象データを追加するステップとを備えたことを特
徴とするデータベースアクセス処理方法。
3. In a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, when data is added from the application to the database, the database is accessed. Table ID, access key,
And obtaining additional data from an application; converting the additional data from a logical structure used by the application to a physical structure defined in the database; and a database using the table ID and the access key. And adding target data to the database.
【請求項4】データベースに定義された物理的な構造と
アプリケーションが使用する論理的な構造が異なるシス
テムにおけるデータベースアクセス処理方法において、 アプリケーションからデータベースにデータを更新する
ときに、データベースに対してアクセスするべきデータ
のアクセス情報として、テーブルID、アクセスキー、
及び更新データをアプリケーションから取得するステッ
プと、 前記更新データを、アプリケーションが使用する論理的
な構造からデータベースに定義された物理的な構造へ変
換するステップと、 前記テーブルID及びアクセスキーを用いて前記更新デ
ータでデータベースの対象データを更新するステップと
を備えたことを特徴とするデータベースアクセス処理方
法。
4. In a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, when the data is updated from the application to the database, the database is accessed. Table ID, access key,
And obtaining update data from an application; converting the update data from a logical structure used by the application to a physical structure defined in a database; and using the table ID and an access key. Updating the target data of the database with the update data.
【請求項5】請求項1から4の何れか1つに記載のデー
タベースアクセス処理方法において、 データベースの参照データをアプリケーションに返すと
き、またはアプリケーションから追加/更新データをデ
ータベースに渡すとき、それらのデータの格納場所を示
すポインタを授受することでデータの授受を行うことを
特徴とするデータベースアクセス処理方法。
5. The database access processing method according to claim 1, wherein when reference data of the database is returned to the application, or when additional / updated data is passed from the application to the database, the data is returned. A database access processing method for exchanging data by exchanging a pointer indicating a storage location of the database.
JP2000297919A 2000-09-29 2000-09-29 Database access processing method Expired - Fee Related JP3865197B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000297919A JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000297919A JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Publications (2)

Publication Number Publication Date
JP2002108669A true JP2002108669A (en) 2002-04-12
JP3865197B2 JP3865197B2 (en) 2007-01-10

Family

ID=18779957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000297919A Expired - Fee Related JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Country Status (1)

Country Link
JP (1) JP3865197B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007279960A (en) * 2006-04-05 2007-10-25 Jfe Systems Inc Electronic slip provision method and electronic slip server device
JP2013196610A (en) * 2012-03-22 2013-09-30 Toshiba Corp Query issuance device, query issuance program, and query issuance method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007279960A (en) * 2006-04-05 2007-10-25 Jfe Systems Inc Electronic slip provision method and electronic slip server device
JP2013196610A (en) * 2012-03-22 2013-09-30 Toshiba Corp Query issuance device, query issuance program, and query issuance method

Also Published As

Publication number Publication date
JP3865197B2 (en) 2007-01-10

Similar Documents

Publication Publication Date Title
US10831753B2 (en) Query plan generation and execution in a relational database management system with a temporal-relational database
US8032544B2 (en) Methods and apparatus for generating dynamic program files based on input queries that facilitate use of persistent query services
CN1647080B (en) Method and computer for accessing data in an environment of multiple data repositories
US8666969B2 (en) Query rewrite for pre-joined tables
US5991765A (en) System and method for storing and manipulating data in an information handling system
US6694305B2 (en) Method, system, and program for processing modifications to data in tables in a database system
US7822775B2 (en) Method and system for managing complex database information
US8478760B2 (en) Techniques of efficient query over text, image, audio, video and other domain specific data in XML using XML table index with integration of text index and other domain specific indexes
US20070050333A1 (en) Archive indexing engine
US20030154216A1 (en) Database optimization apparatus and method
US20060224603A1 (en) System and methods for facilitating a linear grid database with data organization by dimension
US7953749B2 (en) Providing the timing of the last committed change to a row in a database table
CN102955792A (en) Method for implementing transaction processing for real-time full-text search engine
CN101184106A (en) Associated transaction processing method of mobile database
US9171036B2 (en) Batching heterogeneous database commands
US11157466B2 (en) Data templates associated with non-relational database systems
US20050044065A1 (en) Method and apparatus for enabling national language support of a database engine
US8161051B2 (en) Method and apparatus for data processing with index search
WO2019184618A1 (en) Method and device for storing data, server, and storage medium
US20150006478A1 (en) Replicated database using one sided rdma
CN105074696A (en) Unified searchable storage for resource-constrained and other devices
US6856996B2 (en) Method, system, and program for accessing rows in one or more tables satisfying a search criteria
US11327962B1 (en) Real-time analytical database system for querying data of transactional systems
US7890456B2 (en) Sharing of database objects
US7089232B2 (en) Method of synchronizing distributed but interconnected data repositories

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060905

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060928

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060928

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151013

Year of fee payment: 9

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees